Product-Recommendations | Product Recommendations solution | Recommender System library
kandi X-RAY | Product-Recommendations Summary
kandi X-RAY | Product-Recommendations Summary
This solution enables you to create product recommendations predictive models based on historical transaction data and information on the product catalog.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Product-Recommendations
Product-Recommendations Key Features
Product-Recommendations Examples and Code Snippets
Community Discussions
Trending Discussions on Product-Recommendations
QUESTION
I want to add product recommendations on my shopify cart page.
I have added:
{% section 'product-recommendations' %}
in the cart.liquid
file.
This file consists of:
...ANSWER
Answered 2020-Sep-22 at 14:06The reason why it did not work was same that you concluded, that it was not a product page. However, given the product ID we can get the recommendations of any product. The Shopify Docs for Recommendations object state
The recommendations object returns products only if it's used in a theme section that's rendered through an HTTP request to ?section_id=&product_id=. section_id is the ID of the section where the recommendations object is being used, and product_id is the ID of the product you want to show recommended products for. To determine the base_url, use the routes.product_recommendations_url attribute. Using the routes object rather than a hardcoded URL ensures that the product recommendations load in the correct locale.
So, unlike Shopify product page, where product object is globally available, you have to pass product ID from Shopify cart items. To do so, add a new section named product-recommendations-cart and include it in your cart template.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Product-Recommendations
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page