Problems with 'price from' in the 'ButtonBuyModal' control
Marketing & Merchandising
•
ID:
Backlog
Published on10/5/2018
•
Last updated on12/22/2022
1 min read
Summary
The $product.ButtonBuyModal(true,true) control is used on shelves to add the product to the cart. If there is more than one possible SKU, a modal is displayed for the user to choose the desired variation.
In cases where the product only has "price for" (bestPrice), the "price from" (listPrice) is always $0,00, but that in turn should not be displayed in the layout.
Simulation
To simulate this scenario you should implement this viewpart in the shelf and follow its behavior with products that have multiple SKUs.
Workaround
You can work around this behavior by hiding the "price from" element using Javascript whenever its content is "0.00", or rebuild this feature (which is limited to the store frontend) based on VTEX APIs (such as "vtexjs.catalog").