Page 1 of 1

Version 2.2 hide zero price

Posted: Thu May 05, 2016 11:48 pm
by naxp
Hello,
is their a way to hide The zero price £0.00 that shows on the product page with price options,
I have product options so i have left the product price at zero
I have tried editing the product tpl code from if (price) to if (price >=0.00) , but that just hides all product prices in the store, Also tried numerous mods but still no success
Version 2.2
any help would be much appreciated
Thanks

Re: Version 2.2 hide zero price

Posted: Tue May 10, 2016 2:20 pm
by impairedspook
Hi naxp,

Did you get this sorted yet? If not follow the link below and see if this setup is how you are trying to do yours? I have changed product price to $0.00 and have hidden this zero price along with the tax. I think this may be what you are trying to do :)

http://impairedspook.thats.im/index.php ... duct_id=40

Let me know and I will either uploaded a VQmod extension if you have this installed or will advise what code you need to remove.

Hope this helps.

Cheers

Re: Version 2.2 hide zero price

Posted: Tue May 10, 2016 2:51 pm
by opencartboost
Try,
1. Open file product.php at catalog/controller/product/product.php
2. Find :

Code: Select all

if ((float)$product_info['special']) {
3. Add before:

Code: Select all

$data['zero_price'] = $product_info['price'];
4. Open file product.tpl at catalog/view/theme/your_theme/template/product/product.tpl
5. Find :

Code: Select all

<?php if ($price) { ?>
6. Replace with :

Code: Select all

<?php if ($zero_price > 0) { ?>