getTotals(); $getTotalValue = static function (string $code) use ($totals): float { return isset($totals[$code]) ? (float)$totals[$code]->getValue() : 0.0; }; $formatPrice = static function (float $amount) use ($block): string { return $block->getQuote()->getStore()->getCurrentCurrency()->format($amount, [], false); }; $rewardPointsUsed = (int)$block->getQuote()->getData('reward_points_used'); ?>
escapeHtml(__('Subtotal')) ?> escapeHtml($formatPrice($getTotalValue('subtotal'))) ?>
escapeHtml(__('Discount')) ?> escapeHtml($formatPrice($getTotalValue('discount'))) ?>
escapeHtml(__('Points Discount (%1 points)', $rewardPointsUsed)) ?> escapeHtml($formatPrice($getTotalValue('reward_discount'))) ?>
escapeHtml(__('Estimated Shipping')) ?> escapeHtml($formatPrice($getTotalValue('shipping'))) ?>
escapeHtml(__('Total')) ?> escapeHtml($formatPrice($getTotalValue('grand_total'))) ?>