Post by warisaha » Wed Nov 08, 2017 1:55 pm

hello,
I'm using opencart 2.x at http:ddplus.us/clone. I just want to know which file to edit in order show a button with value "Select options" rather than the price label ($0.00) for the products which carry options (variable products) Please find the attachment by which i hope you can understand and please let me know which file & code snippet do i edit in order to get the desired appearance.
Thanks in Advance

Attachments

price-label.jpg

price-label.jpg (55.18 KiB) Viewed 188 times


Newbie

Posts

Joined
Tue Sep 19, 2017 2:31 pm

Post by kestas » Thu Nov 09, 2017 4:42 pm

Hi,

Can you please explain more details what do you want? According your attached picture you want that if price is 0.00 this price should be placed to the red bordered box? Or this 0.00 price should be change to some button with the link to options?

Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by warisaha » Sat Nov 11, 2017 12:30 pm

Thanks for your response Kestas!

Absolutely the second one you described. I just want to replace the 0.00 with custom text and would like to link it to the respective product.

Newbie

Posts

Joined
Tue Sep 19, 2017 2:31 pm

Post by kestas » Sat Nov 11, 2017 4:39 pm

Ok

You can try
find in file:
catalog/view/theme/YOUR THEME/template/product/category.tpl

Code: Select all

<?php echo $product['price']; ?>
replace it if you currency € and it placed in right (formatted like this: 0.00€):

Code: Select all

   <?php if ($product['price'] == "0.00€" ) { ?>
            <a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?> <!--this string your prefered url-->
             <?php  } else { ?>
            echo $product['price'];               
             <?php  } ?>
I have not tried, but it can put you, on the right way.
Good Luck

Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am
Who is online

Users browsing this forum: No registered users and 11 guests