Hi,
How do I hide the default prices (the one with the strikethrough) from frontend and display only the special/discounted prices?
I know I can change the color to white but the specials is aligned to the right and does not look good.
Hope someone can help me.
Thank you.
there is a lot more such locations but here is example of what you should do:
======================================================
IN catalog/theme/default/template/product/product.tpl FIND:
======================================================
<?php } else { ?>
<li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li>
<li>
<h2><?php echo $special; ?></h2>
</li>
<?php } ?>
=============
REPLACE WITH:
=============
<?php } else { ?>
<h2><?php echo $special; ?></h2>
<?php } ?>
So it will show normal price on product details page if there is no special set and special price if there is special price set all you have to do is remove in all view files the striked trough price variable. i could create the vqmod or ocmod for all files on the stock opencart if you interested PM me:)
======================================================
IN catalog/theme/default/template/product/product.tpl FIND:
======================================================
<?php } else { ?>
<li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li>
<li>
<h2><?php echo $special; ?></h2>
</li>
<?php } ?>
=============
REPLACE WITH:
=============
<?php } else { ?>
<h2><?php echo $special; ?></h2>
<?php } ?>
So it will show normal price on product details page if there is no special set and special price if there is special price set all you have to do is remove in all view files the striked trough price variable. i could create the vqmod or ocmod for all files on the stock opencart if you interested PM me:)
Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace
Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT
Thank you..I will test this out.D3MO wrote:there is a lot more such locations but here is example of what you should do:
======================================================
IN catalog/theme/default/template/product/product.tpl FIND:
======================================================
<?php } else { ?>
<li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li>
<li>
<h2><?php echo $special; ?></h2>
</li>
<?php } ?>
=============
REPLACE WITH:
=============
<?php } else { ?>
<h2><?php echo $special; ?></h2>
<?php } ?>
So it will show normal price on product details page if there is no special set and special price if there is special price set all you have to do is remove in all view files the striked trough price variable. i could create the vqmod or ocmod for all files on the stock opencart if you interested PM me:)
You should be able to do that by adding some CSS to your theme's main stylesheet:
/catalog/view/theme/YOURTHEME/stylesheet/stylesheet.css
You'd add some lines like this at the bottom, and it should hide all the non-special prices if a product is on special:
/catalog/view/theme/YOURTHEME/stylesheet/stylesheet.css
You'd add some lines like this at the bottom, and it should hide all the non-special prices if a product is on special:
Code: Select all
.price-old {
display: none;
}
Who is online
Users browsing this forum: No registered users and 282 guests