- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 21.06.21, 13:15
- Opened by: Mazuelas Martin
- Closed by: Anonymous Submitter
- Closed on:
- Reason: Not a bug
Ticket #21779 - Show original price if the discounted price is higher than the original price
We need to adapt the following code in amp template so that when the discount is greater than or equal to the sale price, I only show the sale price and hide the price with the discount that appears crossed out (attached capture)
The path to the file is:
/themes/alysum/templates/mobile/checkout/cart.tpl
The code that corresponds to the functionality that we want to adapt is:
{if !$configuration.is_catalog}
<strong class="db m15 product-price price"> {literal}{{#reduction}}{/literal}<del>{literal}{{price}}{/literal}</del> {literal}{{/reduction}}{/literal}{literal}{{price}}{/literal}<span> (✕{literal}{{cart_quantity}}{/literal})</span> </strong>
Comments
Is that correct now? https://take.ms/boJ6S
Is not correct for amp. I give you an example product code so that you can put it in the search engine and add it to the cart. Once this is done, when you go to the cart you will see what I describe in the screenshot that I have attached to the incident.
The product code for testing is 1500320100010
Thanks!!
you have complicated discount system.
Could you please explain a bit how it works? Do you use some module to manage product discounts?
For what we want to do we have modified the code with which I add you below:
{if $product.has_discount && $product.regular_price_amount >= $product.price}
With this code if the $product.regular_price_amount is greater than or equal to the price of the product $product.price, the tpl shows us only the price of the product. On the contrary, it would show us the price of the crossed-out product and the discount in bold
We want to do the same in the amp file /themes/alysum/templates/mobile/checkout/cart.tpl that we see that it has a different code and we do not know how to adapt it to the one I expose you. The current code of this file is as follows and we want it to perform the functionality that I have mentioned above:
<strong class=”db m15 product-price price”>
It’s possible?
Thanks!!
I think it’s possible. But we currently don’t have time to provide customization service. Too much tickets these days
You can tackle the task when you see fit. If these days you have too many tickets, it can be postponed to following weeks
Thanks!!
Ok, I’ll let you know if we will have free time