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');
?>
= $block->escapeHtml(__('Subtotal')) ?>
= $block->escapeHtml($formatPrice($getTotalValue('subtotal'))) ?>
= $block->escapeHtml(__('Discount')) ?>
= $block->escapeHtml($formatPrice($getTotalValue('discount'))) ?>
= $block->escapeHtml(__('Points Discount (%1 points)', $rewardPointsUsed)) ?>
= $block->escapeHtml($formatPrice($getTotalValue('reward_discount'))) ?>
= $block->escapeHtml(__('Estimated Shipping')) ?>
= $block->escapeHtml($formatPrice($getTotalValue('shipping'))) ?>
= $block->escapeHtml(__('Total')) ?>
= $block->escapeHtml($formatPrice($getTotalValue('grand_total'))) ?>