Post by jonesbrair » Tue May 05, 2020 10:02 pm

Hello everyone, I am new to opencart and i have been trying a few things but i got stuck on this one too. Please someone help me and tell me how i can change the product price to bold and increase its font size. I am using opencart 3.0.3.3. Thank you

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Wed May 06, 2020 2:17 am

Would this be on the product page or on a module such as the featured products module?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Wed May 06, 2020 5:19 pm

I would like it to appear on both the featured products module and the product pages. Thanks

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Wed May 06, 2020 7:31 pm

For the product page, assuming you're using the default theme a quick way is to hard code it. Download the product page twig file:

/catalog/view/theme/default/template/product/product.twig

Go to line 138 and change: <h2>{{ price }}</h2>

To: <h2 style="font-size:40px;font-weight:bold;">{{ price }}</h2> (or whatever font size you want).

If you want to do it with extensions so you can add some custom css from the admin panel let me know.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Wed May 06, 2020 9:28 pm

Thanks so much for the response. I have changed the code as guided above but after saving the changes, nothing changed at the product prices in the front end. Maybe help with how to do it via the custom css. Thank you.

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by cyclops12 » Wed May 06, 2020 11:38 pm

Be sure to clear ALL caches to see changes

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by johnp » Thu May 07, 2020 7:35 am

jonesbrair wrote:
Wed May 06, 2020 9:28 pm
Thanks so much for the response. I have changed the code as guided above but after saving the changes, nothing changed at the product prices in the front end. Maybe help with how to do it via the custom css. Thank you.
Download this file:
catalog/view/theme/default/template/extension/module/featured.twig

Line 22 replace: <p class="price">

With: <p class="price" style="font-size:40px;font-weight:bold;">

Clear your caches and it should work. If it doesn't let me know and I'll have a rethink. :)

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Thu May 07, 2020 6:31 pm

Thanks so much for your help. I have changed the code for the featured products page and i cleared cache and the changes were effected on the website just like i wanted. Thanks for that, however the changes on the product pages were not effected even after changing the code on line 138 in the product.twig as earlier directed. I even cleared cache and changes were not effected. What could be the problem .

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Thu May 07, 2020 7:54 pm

What's your site URL?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by johnp » Thu May 07, 2020 8:21 pm

jonesbrair wrote:
Thu May 07, 2020 6:31 pm
Thanks so much for your help. I have changed the code for the featured products page and i cleared cache and the changes were effected on the website just like i wanted. Thanks for that, however the changes on the product pages were not effected even after changing the code on line 138 in the product.twig as earlier directed. I even cleared cache and changes were not effected. What could be the problem .
From the admin dashboard try turning off the Theme and SASS caches. Then, visit the product page where you should see the font change. Go back to the admin dashboard and turn the Theme and SASS caches back on.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by johnp » Thu May 07, 2020 8:45 pm

It makes sense to clone your default theme, call is something like "design-1" and set that live. Make all your changes on that so when you come to upgrade you won't lose them.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Fri May 08, 2020 2:13 am

My sites URL is sylinebuilds.com

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Fri May 08, 2020 3:20 am

There's no site on that URL.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Fri May 08, 2020 4:27 am

oh sorry, this is the URL https://skylinebuilds.com/

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Fri May 08, 2020 4:50 pm

Looks like the change is working fine on the product page.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Sat May 09, 2020 12:14 am

sorry for the late reply. I actually meant the prices on this type of pages https://skylinebuilds.com/index.php?rou ... path=63_73 Those are the pages i called product pages.

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Sat May 09, 2020 2:10 am

Use the same principle on the category.twig template file on line 137.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by jonesbrair » Sat May 09, 2020 4:02 am

Thank very much for all the help. I have managed to solve all my issues following your guidance. Thanks alot.

Newbie

Posts

Joined
Tue Apr 28, 2020 3:34 pm

Post by johnp » Sat May 09, 2020 4:30 am

Perfect. :)

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK
Who is online

Users browsing this forum: No registered users and 7 guests