In the template I am using, once you add an item to the cart a popup displays that says "you have added *PRODUCT* to your cart!" I want to show that products related products in this pop up with it. Can someone help me out? Im new to magento.
Solved! Go to Solution.
@brett_nelson you can use the below block and use the "getItems()" for getting the collection of related products.
Block :- \Magento\Catalog\Block\Product\ProductList\Related
Thanks
Hello @brett_nelson
If your theme is doesn't have that functionality and if you don't know how to customize, then i would suggest to use the extension.
https://www.tigren.com/magento-2-extensions/magento-2-ajax-add-to-cart/
https://bsscommerce.com/magento-2-ajax-add-to-cart-extension.html
I would prefer to code it myself. I already have the functionality of adding everything to my cart. However I just need to be able to access that products information and I will be able to take care of the rest.
thanks
@brett_nelson you can use the below block and use the "getItems()" for getting the collection of related products.
Block :- \Magento\Catalog\Block\Product\ProductList\Related
Thanks
Is it possible to have more details ?
Thanks