Issue:
The module should not depend on the product. I can not add the product id manually, it should be dynamical.
For example, If I want the customer also Bought / View widget slider on the cart and home page, then on which base we can add the product ID?
Can you please look and make it dynamic, without any dependencies of product ID?
Solution:
Hence, when a customer visits another page of which is different from with product page, it needs to have something to base to list also bought/also viewed products.
Hence, we choose the product ID as the basis for listing bought/also viewed products.
In case, if you do not want to enter the product ID, we would like to give you a solution of which is without any dependencies of the product ID and it allows showing the list the bestseller products/most viewed products.
We have updated and edited two files
app/code/Bss/CabavCustom/Controller/Alsobought/Product.php
app/code/Bss/CabavCustom/Controller/Alsoview/Product.php
Please check and add them to your site and then flush the cache.
If you have any issues, please feel free to contact us.
We are more than happy to support you.
Get to know about us
BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.
Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust. Here are our most powerful extensions might help you drive your sales and get the best user experience:
- BSS Commerce’s Magento 2 B2B Extension delivers a complete solution for scalable and efficient wholesale management.
- BSS Commerce’s Magento 2 SEO Extension empowers your store to rank higher and grow organic traffic faster.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article