Fixing messed up Debut theme - original price gone

I’ve made a change to the debut theme to make a discount percentage appear and it worked well. Only later I noticed that the the original prices are gone. I’m assuming I must have accidentaly deleted one line too many. Could someone please tell me how to fix it? Attached a screenshot.

What I would like to have is the original price, compare at price and the discount percentage.

The last theme backup was 3 years ago so I’d rather not use that way as there have been other changes too.

Thank you.

When editing code in the Code Editor, there’s an option to revert it back to certain time in the past.

Shopify Help Center | Editing theme code

Thank you. I know but as I wrote I don’t want to do it because the latest point I can revert it to is 2021.

Hey @buzaty
Here is the liquid code for the original price, compare at price and the discount percentage.
Make sure that you’re adding on the product template

{% if product.compare_at_price > product.price %}
  

    Original Price: {{ product.compare_at_price | money }}

    Discounted Price: {{ product.price | money }}

    {% assign discount = 100.0 * (product.compare_at_price | minus: product.price) / product.compare_at_price %}
    Discount: {{ discount | round: 2 }}%
  

{% else %}
  

Price: {{ product.price | money }}

{% endif %}

.

Oh, that makes sense. I thought the latest point you’ll be able to revert to was when you’ve made the change.

Anyway, to fix it, you can hire someone or you’ll need to share the code for others to help you. I’m not sure why but I don’t see the screenshot you mentioned on both my phone and computer

1 Like

Hi @buzaty

Could you share your store URL so I can send a collab request to access your theme so I can check?

Hi @buzaty ,

Please send me the whole code, I will check it for you

Thank you very much. It worked!

1 Like

Thank you but the earlier solution worked so all is good:)

Thank you but the earlier solution worked so all is good:)