- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Related products showing prices for the product it is related to
Most, not all, of our related products are showing as the same price as the main product that is related to. For example, The main product is $248, the related product is $14. But the related product is showing as $248. The admin is configured properly and shows the correct prices. Any ideas what may be going on?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Related products showing prices for the product it is related to
All I can tell so far is the price is being overridden by jquery. The price is correct at first and the add-to-cart function has the correct price.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Related products showing prices for the product it is related to
The problem turn out to be with our \templates\product\list\items.phtml file. It was calling the price of the product instead of the price of the related product.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Related products showing prices for the product it is related to
Hey,
/module-catalog/view/frontend/templates/product/view/form.phtml
Changed
var priceBoxes = $('[data-role=priceBox]');
To
var priceBoxes = $('.product-info-price [data-role=priceBox]');
If solved then mark as solution.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Related products showing prices for the product it is related to
It solved the price issue on product view page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content