Post by kaoolo » Wed Apr 12, 2017 1:39 am

Hi guys. Where do I go to modify the Product Page. I want to access the HTML version of it, if possible

Thank you.

www.kaoolo.com


User avatar
New member

Posts

Joined
Mon Sep 01, 2014 11:27 pm

Post by oc-extensions » Wed Apr 12, 2017 3:03 am

Hi,

To edit product page (template file) you have to go to catalog/view/theme/[your_theme_name]/template/product/product.tpl

Please notice that if file is modified via ocmod you have to rebuild ocmod cache after you make chnages you need.

Have a nice day
Last edited by oc-extensions on Thu Apr 13, 2017 6:22 am, edited 1 time in total.

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by IP_CAM » Wed Apr 12, 2017 3:05 am

Well, there is no such things as a 'regular' HTML Page in Opencart, OC is a Framework,
meaning, that it 'generates' each Page, according to Viewer Selection.
---
The
theme/template/product/product.tpl
is the Product file, containing HTML.
It there uses
$Variables
and
<div class="whatever"> ...... </div>
CSS Sections, to place the $Variable Content into the selected Stylesheet-Formats,
and so 'produces', in conjunction with it's 'Partner-files', placed in the corresponding
/controller/... , /language/... , model/ ...
Subdirectories, the OUTPUT, with data, taken from the Dadabase.

The RESULT is an HTML Output File, it will then (usually) be either used by OcMod and/or VqMod,
again, to create their modified 'final' Output Cache File, either placed in the OcMod Modification
Sub, or in the VqCache Sub. And this File is then sent to the Visitor, who was calling the Page.
If OcMod and VqMod are actively involved, in building an output file, both CACHE Routines/Subs are
used, and the FINAL OutPut Subdirectory is (usually) the VqCache/... Sub. (Exept for the integrated VqMod2!)
It then will be served, from one of the CACHE Section mentioned above, as long as it has NOT been
changed, from the 'last' place, where it has been stored, meaning, that, if OcMod + VqMod has been
doing some work in the file, it would be served from the VqCache-Directory to the Visitor. But as soon
as the slightest difference exist's, it will be built again, in order to serve latest data.
---
You therefore have to know CSS, besides of HTML, to be able, to understand, how CSS builds
'Sections'. It's no longer Tables only, exept for Listings, most everything is done by HTML5 +
Stylesheet Commands, and placed inside of
<DIV> .... and </div>
and/or
<SPAN> ... and </SPAN>
Sections, and CLASSES are used, to define the 'kind', 'look' and 'Function' of such
Sections. So, if you understand the meaning of a Variable-Content, like:
---
<?php foreach ($option['option_value'] as $option_value) { ?>
---
then, you'll have a good chance, to play around on the Product Page, as you like. At least, as
long as you don't ignore
---
<div class="form-group" - class="form-control" - class="form-control date"
---
Sections, possibly so disabling Buttons or Options from further doing their Job! :D
Just to give you a very 'loose' Idea on this ...
Just make a copy of the default file, and start, you cannot BREAK much... ;)
Good Luck !
Ernie

PS: Just found out, you possibly still use a NON Responsive Theme. Then,
you possibly won't have so much STYLE Code, as mentioned above.

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ameem » Wed Oct 21, 2020 6:21 pm

oc-extensions wrote:
Wed Apr 12, 2017 3:03 am
Hi,

To edit product page (template file) you have to go to catalog/view/theme/[your_theme_name]/template/product/product.tpl

Please notice that if file is modified via ocmod you have to rebuild ocmod cache after you make chnages you need.

Have a nice day
To edit product page (template file) i went to: catalog/view/theme/[your_theme_name]/template/product/product.tpl
1) What is the difference between Product.tpl and Product.twig? Are they both the same? I wanted to find Stepper (input for quantity) and I added a class MYSTEPPERHIDE, but, neither it appeared in Inspect element nor my function worked as it is not reading my class that I made.
2) And how & where to Rebuild OCMOD Cache? Is it risky or not?

Newbie

Posts

Joined
Wed Sep 11, 2019 4:37 pm

Post by by mona » Wed Oct 21, 2020 7:40 pm

What is the difference between Product.tpl and Product.twig?
You posted in OC1.5+ so that is .tpl
OC 3 is .twig

tpl is php twig is twig

Please post your OC version when posting and in the correct forum might help reduce confusion.

Rebuilding your cache is standard.
You go to EXTENSION => MODIFICATIONS and top right cog
(now this makes a difference which OC version, but OC3.0.3.6 before you do the above you need to go into the modifications tab and at the bottom clear [ red button ] and then do the above step) There is a fix on github someone will post after me.

In addition in dashboard top right cog (here you can put this into development mode)
Also clear your browser cache

and other cache is dependant on various factors that we can not know without you telling us - for example theme - speed extensions - server set up

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Domingo_k » Wed Nov 04, 2020 6:19 pm

Thanks for the information, it helps me a lot

Newbie

Posts

Joined
Wed Nov 04, 2020 6:17 pm
Who is online

Users browsing this forum: No registered users and 71 guests