All things Shopify and commerce
My site is running on the pipeline theme 6.2.1 and I would like to change the compare at price from displaying as "sale $xxx off" to "compare at $xxx" with the compare price using strikethrough.
Any help appreciated!
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hey @bicyclebiz.
You will need to go into the code and edit the text and change what price should be rendered there.
I'm not sure how the file is called in the Pipeline theme, but you'll need to find the relevant product-template file and find the section with the prices.
Then, search for this class:
class="product__price--off"
Change the content in the <span></span> tag and also change what price should be rendered there.
Hope this helps!
Thanks for your response @Niki_K I had found that, but am not sure what parameter to swap in to change it to compare at. Where wouldI be able to find the variable that I need to enter to replace "data-price-off-type" and "data-price-off-amount"
Hey @bicyclebiz,
alright, please follow these steps.
Just to make sure we're on the same page – you would like to display the sale as follows (the price is just for example purposes):
If yes, please do these changes to your code. You can get rid of the "Sale" text at the beginning and the center dot as well.
HTML/LIQUID
<span data-price-off class="product__price--off hide">
{{'products.product.compare' | t }} <!-- you'll need to add this translation or just use 'Compare at' instead. -->
<span data-price-off-amount class="strike-through">
{{ current_variant.compare_at_price | money }}
</span>
</span>
CSS
.strike-through {
text-decoration: line-through;
}
I think this could be working – since I don't have access to the theme's source code, I can't test it first before sharing the piece of code with you. I'll be happy to help you further if there are any issues (I suspect some CSS issues might show up).
Hope this helps!
Hi, could you help me with a similar problem?
I would like to change my compare at price wording. It says 'sale' and I'd like it to say 'Pre-Launch Discount"
Hi @EmilyLoftman,
will you share the store's URL, please?
Thanks!
Hey, I have emailed you with the password as the store is locked. Thanks!
Hey @EmilyLoftman,
thanks! I think the easiest no-code way how to change the text from "Sale" to "Pre-launch discount" is to do it via translations:
1. Go to your Shopify admin.
2. Next to the theme, you would like to make the changes for, click the three dots.
3. A dropdown menu opens, select "Edit default theme content".
4. Choose "Products" from the top bar menu.
5. There is a list of short phrases that can be translated. Find the "On sale".
6. Rewrite the content to "Pre-launch discount".
7. Save the changes, open you store (refresh it if needed). You should see the content changed.
Here are some screenshots:
Let me know if it works.
Hi Niki,
That's worked perfectly! Can't believe the solution was so simple!
Thank you!!
i have a similar problem to this however I want to change the text SALE into the discount percentage= anyone know how to do that
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024