Created
May 9, 2022 11:44
-
-
Save magevision/3d06a4b22c92395daa5860a5701642f5 to your computer and use it in GitHub Desktop.
DisplayRecentlyViewedProductsProgrammatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceContainer name="content"> | |
<block class="Magento\Catalog\Block\Widget\RecentlyViewed" name="recently_viewed" | |
template="Magento_Catalog::product/widget/viewed/grid.phtml" after="-"> | |
<arguments> | |
<argument name="uiComponent" xsi:type="string">widget_recently_viewed</argument> | |
<argument name="page_size" xsi:type="number">4</argument> | |
<argument name="show_attributes" xsi:type="string">name,image,price,learn_more</argument> | |
<argument name="show_buttons" xsi:type="string">add_to_cart,add_to_compare,add_to_wishlist</argument> | |
</arguments> | |
</block> | |
</referenceContainer> | |
</body> | |
</page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment