PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
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 1.3.19 All 49 releases
← All changes | app/Services/Renderer/CartSummaryRender.php +46 -2 1.3.21 → 1.6.6 View file →
@@ -142,10 +142,8 @@
142 142 <li data-fluent-cart-checkout-page-applied-coupon>
143 143 <?php $this->showCouponApplied(); ?>
144 144 </li>
145 145
146 - <?php $this->showManualDiscount(); ?>
147 -
148 146 <?php if (!$hideCouponField): ?>
149 147 <li>
150 148 <?php $this->showCouponField(); ?>
151 149 </li>
@@ -152,8 +150,12 @@
152 150 <?php endif ?>
153 151
154 152 <?php do_action('fluent_cart/checkout/before_summary_total', [ 'cart' => $this->cart ]); ?>
155 153
154 + <?php $this->showUpgradeDiscount(); ?>
155 + <?php $this->showProrateCredit(); ?>
156 + <?php $this->showManualDiscount(); ?>
157 +
156 158 <?php
157 159 $this->renderTotal();
158 160 ?>
159 161 </ul>
@@ -336,8 +338,50 @@
336 338 ?>
337 339 <li>
338 340 <span class="fct_summary_label" aria-label="<?php echo esc_attr($title); ?>"> <?php echo esc_html($title); ?></span>
339 341 <span class="fct_summary_value" data-fluent-cart-checkout-manual-discount aria-label="<?php echo esc_attr($formattedAmount); ?>">
342 + -<?php echo esc_html($formattedAmount); ?>
343 + </span>
344 + </li>
345 + <?php
346 + }
347 +
348 + public function showUpgradeDiscount($atts = '')
349 + {
350 + $upgradeDiscount = Arr::get($this->cart->checkout_data, 'upgrade_discount', []);
351 +
352 + if (!$upgradeDiscount || !Arr::get($upgradeDiscount, 'amount', 0)) {
353 + return;
354 + }
355 +
356 + $title = Arr::get($upgradeDiscount, 'title', __('Upgrade Discount', 'fluent-cart'));
357 + $amount = Arr::get($upgradeDiscount, 'amount', 0);
358 + $formattedAmount = Helper::toDecimal($amount);
359 + ?>
360 + <li>
361 + <span class="fct_summary_label" aria-label="<?php echo esc_attr($title); ?>"> <?php echo esc_html($title); ?></span>
362 + <span class="fct_summary_value" data-fluent-cart-checkout-upgrade-discount aria-label="<?php echo esc_attr($formattedAmount); ?>">
363 + -<?php echo esc_html($formattedAmount); ?>
364 + </span>
365 + </li>
366 + <?php
367 + }
368 +
369 + public function showProrateCredit($atts = '')
370 + {
371 + $prorateCredit = Arr::get($this->cart->checkout_data, 'prorate_credit', []);
372 +
373 + if (!$prorateCredit || !Arr::get($prorateCredit, 'amount', 0)) {
374 + return;
375 + }
376 +
377 + $title = Arr::get($prorateCredit, 'title', __('Prorate Credit', 'fluent-cart'));
378 + $amount = Arr::get($prorateCredit, 'amount', 0);
379 + $formattedAmount = Helper::toDecimal($amount);
380 + ?>
381 + <li>
382 + <span class="fct_summary_label" aria-label="<?php echo esc_attr($title); ?>"> <?php echo esc_html($title); ?></span>
383 + <span class="fct_summary_value" data-fluent-cart-checkout-prorate-credit aria-label="<?php echo esc_attr($formattedAmount); ?>">
340 384 -<?php echo esc_html($formattedAmount); ?>
341 385 </span>
342 386 </li>
343 387 <?php