PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 All 50 releases
← All changes | app/Services/Renderer/CartRenderer.php +24 -8 1.4.2 → 1.7.0 View file →
@@ -3,9 +3,8 @@
3 3 namespace FluentCart\App\Services\Renderer;
4 4
5 5 use FluentCart\Api\StoreSettings;
6 6 use FluentCart\Framework\Support\Arr;
7 -use FluentCart\App\Vite;
8 7 use FluentCart\App\Helpers\Helper;
9 8 use FluentCart\App\Helpers\CartCheckoutHelper;
10 9 use FluentCart\App\Models\Product;
11 10
@@ -142,11 +141,10 @@
142 141 {
143 142 $image = Arr::get($this->currentCartItem, 'featured_media');
144 143 $title = Arr::get($this->currentCartItem, 'title', __('Product Image', 'fluent-cart'));
145 144
146 - if (!$image) {
147 - $image = Vite::getAssetUrl('images/placeholder.svg');
148 - }
145 + // Also maps the old generic icon a pre-existing cart row may still store.
146 + $image = Helper::productImageOrPlaceholder($image);
149 147
150 148 ?>
151 149
152 150 <div class="fct-cart-item-image">
@@ -196,9 +194,11 @@
196 194
197 195 public function renderTitles()
198 196 {
199 197 $postTitle = Arr::get($this->currentCartItem, 'post_title', '');
200 - $variationTitle = Arr::get($this->currentCartItem, 'title', '');
198 + // The Cart model already resolves & appends variation_display_title on
199 + // every cart item (Cart::getCartDataAttribute), so just read it.
200 + $variationTitle = (string) Arr::get($this->currentCartItem, 'variation_display_title', Arr::get($this->currentCartItem, 'title', ''));
201 201 $variationType = Arr::get($this->currentCartItem, 'variation_type', 'simple');
202 202
203 203 $aria_label = sprintf(
204 204 /* translators: 1: Post or product title */
@@ -401,9 +401,17 @@
401 401 class="fct-cart-total-wrapper"
402 402 role="region"
403 403 aria-label="<?php esc_attr_e('Cart Total', 'fluent-cart'); ?>"
404 404 >
405 - <span><?php echo esc_html__('Total', 'fluent-cart'); ?>:</span>
405 + <span><?php
406 + /**
407 + * Filters the cart total label. Lets a caller relabel it without
408 + * reimplementing this markup; the default renders exactly as before.
409 + *
410 + * @param string $label
411 + */
412 + echo esc_html(apply_filters('fluent_cart/cart/total_label', __('Total', 'fluent-cart')));
413 + ?></span>
406 414 <span
407 415 data-fluent-cart-cart-total-price
408 416 aria-live="polite"
409 417 aria-label="<?php echo esc_attr($aria_label); ?>"
@@ -446,13 +454,21 @@
446 454 public function renderCheckoutButton()
447 455 {
448 456 ?>
449 457
450 - <a class="checkout-button"
458 + <a class="checkout-button fct-primary-btn"
451 459 href="<?php echo esc_attr($this->storeSettings->getCheckoutPage()); ?>"
452 460 role="button"
453 461 aria-label="<?php esc_attr_e('Go to checkout page', 'fluent-cart'); ?>">
454 - <?php esc_html_e('Go to Checkout', 'fluent-cart'); ?>
462 + <?php
463 + /**
464 + * Filters the cart checkout button text. Lets a caller relabel it
465 + * without reimplementing this markup; the default is unchanged.
466 + *
467 + * @param string $text
468 + */
469 + echo esc_html(apply_filters('fluent_cart/cart/checkout_button_text', __('Go to Checkout', 'fluent-cart')));
470 + ?>
455 471 </a>
456 472
457 473 <?php
458 474