0

I am doing some calculation for final sale in cart page which is phtml, and I have show final sale in checkout page as well for each item.

app/design/frontend/Mgs/yx_theme/Magento_Weee/templates/item/price/unit.phtml

The code in cart page

<?php if (((($item->getPrice()*$cartQty) - $item->getDiscountAmount()) / ($item->getProduct()->getPrice()*$cartQty)) < 0.5): ?>
<?php endif;?>

and I want to send this logic to my checkout page. The issue is the checkout where we show data is HTML.

app/design/frontend/Mgs/yx_theme/Magento_Checkout/web/template/summary/item/details.html

And checkout is knockoutjs. how can i send this logic data to html of checkout for each item.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.