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.


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.


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.