Post by sunbyte » Tue Jul 31, 2018 8:04 pm

Hi,
I was able to modify /catalog/view/theme/fastor/template/product/product.tpl to display 'BUY NOW' if the price of the product is set to 0.
Works everywhere expect related products tab... In related products tab the price is displayed as 0.
OpenCart 3.0.2.0

Thanks.

Newbie

Posts

Joined
Mon Feb 26, 2018 11:50 pm

Post by straightlight » Tue Jul 31, 2018 9:35 pm

sunbyte wrote:
Tue Jul 31, 2018 8:04 pm
Hi,
I was able to modify /catalog/view/theme/fastor/template/product/product.tpl to display 'BUY NOW' if the price of the product is set to 0.
Works everywhere expect related products tab... In related products tab the price is displayed as 0.
OpenCart 3.0.2.0

Thanks.
While the OC version has been posted, unprovided details of those modifications in order to assist with the related product prices request. More information is needed. Forum rules.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sunbyte » Wed Aug 01, 2018 6:27 am

Check out the screenshot

Image

Newbie

Posts

Joined
Mon Feb 26, 2018 11:50 pm

Post by ostechnologies » Thu Aug 02, 2018 3:35 pm

Firstly oc3.0.2.0 view files do not have .tpl extension instead .twig
Now, to make changes to the related products price navigate to the same file you mentioned above and search for “<?php echo $product['price']; ?>”, now make similar changes as you have done above.(validate price to zero and echo “Buy Now”).

Opencart Expert | sales[at]ost.agency
Skype - manish.osuniverse | Gtalk - manishmt

Extensions for Opencart @ https://www.ost.agency/product/product- ... extensions
ost.agency - ecommerce website design, development and digital company


User avatar
Active Member

Posts

Joined
Mon Apr 06, 2015 1:30 pm

Post by sunbyte » Thu Aug 02, 2018 7:34 pm

ostechnologies wrote:
Thu Aug 02, 2018 3:35 pm
Firstly oc3.0.2.0 view files do not have .tpl extension instead .twig
Now, to make changes to the related products price navigate to the same file you mentioned above and search for “<?php echo $product['price']; ?>”, now make similar changes as you have done above.(validate price to zero and echo “Buy Now”).
Can't find this code in product.tpl
You can check the full source code of product.tpl here: https://pastebin.com/ZvyEDTKL

Newbie

Posts

Joined
Mon Feb 26, 2018 11:50 pm

Post by opencartboost » Fri Aug 03, 2018 3:10 pm

Check module section, may be fastor theme use related module to display related product.

Active Member

Posts

Joined
Thu Jul 09, 2015 5:59 am

Post by sunbyte » Fri Aug 03, 2018 7:09 pm

I figured out how to edit the price of the related products.
You must edit the /catalog/view/theme/fastor/template/new_elements/product.tpl file:

Image

Newbie

Posts

Joined
Mon Feb 26, 2018 11:50 pm

Post by straightlight » Fri Aug 03, 2018 8:11 pm

Request was about a custom theme edition.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Bing [Bot] and 25 guests