Post by ameliaa » Wed Jun 03, 2015 11:09 am

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.

New member

Posts

Joined
Fri Jan 29, 2010 6:31 pm

Post by D3MO » Wed Jun 03, 2015 5:10 pm

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:)

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


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by ameliaa » Fri Jun 05, 2015 12:23 pm

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:)
Thank you..I will test this out.

New member

Posts

Joined
Fri Jan 29, 2010 6:31 pm

Post by hotris » Tue May 18, 2021 4:15 am

What about opencart3. I have the same question but for opencart3?

Newbie

Posts

Joined
Tue Dec 13, 2011 5:50 am

Post by Johnathan » Tue May 18, 2021 9:33 pm

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:

Code: Select all

.price-old {
     display: none;
 }

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: Google [Bot] and 60 guests