Code Error - to show price reduction label on product and category page

occs
New Member
6 0 0

Hi,

 

I am working on Dawn 12.0.

I edited the liquid code to change the price reduction lable on the product detail-page. It worked out nicely. Unfortunately, I got an error on the category page - see screenshots.

I don't know, what's wrong. The price-points are managed under products and I think the category page receives those price points from the same source, so I don't understand why I get an error.

 

Can someone help me?

Productpage

occs_0-1700748643989.png

Category page

occs_1-1700748668719.png

 

 

Code

occs_2-1700748685526.png

 

 

Replies 6 (6)

Dan-From-Ryviu
Shopify Partner
7538 1454 1452

Hi @occs 

On the Category page, you must change product.  in your code to card_product.

Screenshot_6.jpg

 

 

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

occs
New Member
6 0 0

Hi Dan, ok. and where exactly do I need to add that?

Dan-From-Ryviu
Shopify Partner
7538 1454 1452

Open card-product.liquid, find this line of code

{{- 'products.product.on_sale' | t -}}

Replace this code with your code

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

occs
New Member
6 0 0

Hi Dan,

I have exchanged the code, but it still didn't work out. Did I oversee anything?

occs_1-1700750492747.png

 

occs_2-1700750509186.png

 

 

Dan-From-Ryviu
Shopify Partner
7538 1454 1452

Are you still calling reload-saving.liquid file to your card-product.liquid file?

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

occs
New Member
6 0 0

Hi Dan,

so reload-savings is containing this code

occs_0-1700753978656.png

and in card_product.lliquid I have added the same code with card_product instead of product.

occs_1-1700754034395.png