AbanteCart Community
Shopping Cart Operations => Support => Topic started by: cookie on January 06, 2014, 12:23:17 PM
-
Hi,
I have an other question...
I am setting up a product where the price is given based on options and combinations only, so the initial product price is actually zero...
How can I hide that price tag that appears near the image on the top part of the product layout if the price is zero?
Even better would be to have the final price show there, the way it us bui,t with one price on the top one at bottom is confusing for the users who may not know anymore which is what...
Thank you!
-
Look at the template file: storefront/view/default_html5/template/pages/product/product_listing.tpl
Assuming you use HTML5 template
here:
<?php if ($display_price) { ?>
<div class="pricetag">
You can add to if condition for check the price of 0
-
Thanks a lot for the tip !
I tried, but I don't really know how to actually use the conditional ...
I tried this:
<?php if ($display_price == "0,00EUR") { ?> ...
but than the price vanishes for all products, not only those with a zero price tag ...
Can you help?
THx
-
<?php if ($display_price || $product['price'] == 0) { ?>
-
Thank you!
Actually after playing around a bit got it working with smth. like:
<?php if ($price == 0) {
echo "olala";
} else {
echo $price;
} ?>
-
Thank you!
Actually after playing around a bit got it working with smth. like:
<?php if ($price == 0) {
echo "olala";
} else {
echo $price;
} ?>
Very interest i like to use in my shop to
Can we have more details
-
Thank you!
Actually after playing around a bit got it working with smth. like:
<?php if ($price == 0) {
echo "olala";
} else {
echo $price;
} ?>
It can be $price variable or $product['price'] array. All depends on the template you look at. You need to read code above in the template you edit.
-
I've used the above code in the product.tpl file.
-
:'(Not working for me, I just add the code you provide to hide price if zero, price is still there any idea?
-
Hello,welcome aboard.Have you cleared the cache?
http://docs.abantecart.com/pages/tips/cache.html
-
For the Product page in the Default Template for 1.2.13 in the
storefront/view/default/template/pages/product/product.tpl
FIND
<div class="productfilneprice">
<?php echo $price . $tax_message; ?>
</div>
REPLACE WITH
<div class="productfilneprice">
<?php if ($displayprice == 0) {
echo "Call for Price";
} else {
echo $price . $tax_message;
} ?>
</div>
AND
For the Product listing page in the Default Template for 1.2.13
product_listing.tpl
FIND
<div class="oneprice"><?php echo $product['price'] . $tax_message; ?></div>
REPLACE WITH
<div class="oneprice">
<?php if ($displayprice == 0) {
echo "Call for Price";
} else {
echo $price . $tax_message;
} ?>
</div>
Featured and latest is done essentially the same way just change it from a div class to a span class. For the featured and lates on the home page change the product_list all in the block section
-
thank you, shawnlg777
-
Glad I could help. Its nice when I can give back a little. Many of you have been great when I needed help!
Shawn Larson
-
I am trying to do this with bootstrap template but I can't seem to get it to work. Any ideas?