Hi,
please advise me how and where exactly to add code related to adding H1 tag to the page title (class="title page-title") on OC 2.0.2.0:
- what should be the code in PHP (something that should look similar to the first picture attached after pressing F12)
- where exactly I should add the code (directory->file->line)- the second picture is where I assume the code should be placed (in the product.tpl file in ...catalog/view/theme/theme_name/template/product) but I might be wrong.
I also use VQmod if this matters.
Thanks for helping me!
please advise me how and where exactly to add code related to adding H1 tag to the page title (class="title page-title") on OC 2.0.2.0:
- what should be the code in PHP (something that should look similar to the first picture attached after pressing F12)
- where exactly I should add the code (directory->file->line)- the second picture is where I assume the code should be placed (in the product.tpl file in ...catalog/view/theme/theme_name/template/product) but I might be wrong.
I also use VQmod if this matters.
Thanks for helping me!
Attachments
this is where I assime the could should be placed - image3.jpg (94.58 KiB) Viewed 2147 times
how it looks after pressing F12
Last edited by elitza85 on Wed Dec 20, 2023 10:04 pm, edited 1 time in total.
Custom job / service request.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The file and location will different for each page. For a product page and in the default theme in will be catalog/view/theme/default/template/product/product.tpl at line 136.
It will be on a different line in a different theme. You should be able to search for h1 in your text editor.
Code: Select all
<h1><?php echo $heading_title; ?></h1>
As above if you want someone to do free work for you, you might be lucky here, but if not you'll have to pay a developer from Commercial Support.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
To add you classes to the h1 tag, you would change.
To.
This would be for the default theme, a third party theme may be different.
Code: Select all
<h1><?php echo $heading_title; ?></h1>
Code: Select all
<h1 class="title page-title"><?php echo $heading_title; ?></h1>
Thanks,
this seems to work BUT now the problem is that the heading title becomes visible on the product page two times: at the front-end at the top of the product page I see the product name (heading_title) two times on two separate lines.
Thanks,
this seems to work BUT now the problem is that the heading title becomes visible on the product page two times: at the front-end at the top of the product page I see the product name (heading_title) two times on two separate lines.
Thanks,
ADD Creative wrote: ↑Fri Dec 15, 2023 5:41 pmTo add you classes to the h1 tag, you would change.To.Code: Select all
<h1><?php echo $heading_title; ?></h1>
This would be for the default theme, a third party theme may be different.Code: Select all
<h1 class="title page-title"><?php echo $heading_title; ?></h1>
Are you using the default theme? I seen some themes that use JavaScript to move headers about the page for some reason.
Make sure your product.tpl only contains one <?php echo $heading_title; ?>.
Make sure your product.tpl only contains one <?php echo $heading_title; ?>.
Hi,
you are right I`m really lucky because two people already helped me for FREE! And yes, I pay developers BUT for something that is special, unique, and difficult to do by myself
For a line of code- I rely on myself, not on a developer 
Good Luck!
you are right I`m really lucky because two people already helped me for FREE! And yes, I pay developers BUT for something that is special, unique, and difficult to do by myself


Good Luck!
paulfeakins wrote: ↑Thu Dec 14, 2023 8:40 pmAs above if you want someone to do free work for you, you might be lucky here, but if not you'll have to pay a developer from Commercial Support.
Thank you for your help, seems to work 

ADD Creative wrote: ↑Fri Dec 15, 2023 10:46 pmAre you using the default theme? I seen some themes that use JavaScript to move headers about the page for some reason.
Make sure your product.tpl only contains one <?php echo $heading_title; ?>.
Great, so please now add [SOLVED] to the start of the post title.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: No registered users and 10 guests