Hello Shopify Community,
I’m working on a product table for my Shopify store where I display products and their variants along with an Add to Cart functionality. I want to implement a feature where some variants have a sale price shown, with the original price crossed out (e.g., 130 → 120) and automatically revert back to the original price once the sale ends.
Here’s what I’m trying to achieve:
- Sale Price Display: I want to display a “sale” price for certain variants of my products, and show the original price as “Compare at price” (crossed out) next to it, like:
- 130 → 120
- Automatic Date-Based Price Change:
I want to be able to set a start date and end date for the sale price. After the end date, the product should automatically revert to the regular price. For example:- Sale start date: January 15, 2025
- Sale end date: January 20, 2025
- Dynamic Price Switching:
I want the sale price to automatically be shown within the date range and be hidden after the sale ends, without manual intervention. I would like the system to automatically switch the prices back to the regular prices after the sale period is over.
Is there a way to implement this?
also the default way (compare at price) doesn’t work since i have coded the table in. Attaching image for reference
https://drive.google.com/file/d/1VR8rCUr5zK8P1XbwsJ0Wge8WCidRLfiM/view?usp=sharing