Magento Asked by Wajahat - Banyo on November 25, 2021
How to we can add upsell products on checkout cart page as crossell products in Magento 2.3.5 ?
Thanks
You can show Upsell products on checkout page by add below code to checkout_index_index.xml
Try this code :-
app/design/frontend/YourVendorName/YourTheme/Magento_Checkout
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="content">
<block class="MagentoCheckoutBlockCartUpsell" name="checkout.cart.upsell" template="Magento_Catalog::product/list/items.phtml" after="-">
<arguments>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="upsell.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="upsell.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/></block>
</referenceBlock>
</body>
</page>
After change you run command :-
php bin/magento c:c
php bin/magento c:f
THANKS.
Answered by Mohit Patel on November 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP