Page 1 of 1

Insert html-code on every page

Posted: Fri Dec 15, 2017 4:37 am
by LeonidUkrainets
I have OpenCart version 2.0.3.1. And I have some html-code that I want to insert on every page of the site. What is the best way to do it if I have no access to admin panel? I can modify php and other files on web-server.

Re: Insert html-code on every page

Posted: Fri Dec 15, 2017 4:46 am
by IP_CAM
Well, if you have no Access to the Shop Admin Panel, then, you are not
the authorized Administrator of this Shop, otherwise, you would, and it would
be relatively easy, to achieve such, at least by use of some Mod. ::)
Ernie

Re: Insert html-code on every page

Posted: Fri Dec 15, 2017 5:10 am
by LeonidUkrainets
Admin panel is broken now. Developer will restore it after sometime. But I should make advertising tomorrow. Just to repeat some code on every page. What mod can I use without OpenCart admin panel?

Re: Insert html-code on every page

Posted: Fri Dec 15, 2017 7:38 am
by IP_CAM
Well, you could read this posting, linked below and use it's content and Code,
and then upload the VqMod into the yourshop/vqmod/xml/... Subdirectory,
to show a Banner on top of every page. And this Banner contains your Information ! ;)
Ernie
viewtopic.php?f=10&t=200416#p706956

Re: Insert html-code on every page

Posted: Sat Dec 16, 2017 2:43 am
by LeonidUkrainets
This is not exactly that I need but thank you for advise.

Re: Insert html-code on every page

Posted: Sat Dec 16, 2017 2:52 am
by LeonidUkrainets
How OpenCart generate its pages? For example can I find some php-file in /catalog/controller/product that make pages for products only and can I insert my code there? So it shoud be div-block in a proper place of page, not banner.

Re: Insert html-code on every page

Posted: Mon Dec 18, 2017 2:00 pm
by IP_CAM
This would display something below the little Product Thumbs and above the Description Section.
The VqMod comes into the vqmod/xml/... Directory, and the OcMod could be placed
in the system/... Directory, but ONLY, if you have no VqMod installed, since only one of
those two Mods can be used at once! :D
But if you need it even more in detail, better request commercial support!
Good Luck!
Ernie
UNTESTED!
---
add_something_to_product.vqmod.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?> 
<modification>
<id><![CDATA[Show something on product page]]></id>
<version><![CDATA[OC v.2.0.3.1]]></version>
<vqmver><![CDATA[2.5.1]]></vqmver>
<author><![CDATA[whoever]]></author>	
<file name="catalog/view/theme/*/template/product/product.tpl">
<operation error="log">
<search position="before"><![CDATA[<ul class="nav nav-tabs">]]></search>
<add><![CDATA[
	<div>Whatever you want to add here</div>
]]></add>
</operation>
</file>
</modification>
---
add_something_to_product.ocmod.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?> 
<modification>
<name><![CDATA[Show something on product page]]></name>
<code><![CDATA[show_something_on_product_page]]></code>
<version><![CDATA[OC v.2.0.3.1]]></version>
<author><![CDATA[whoever]]></author>	
<file path="catalog/view/theme/*/template/product/product.tpl">
<operation>
<search><![CDATA[<ul class="nav nav-tabs">]]></search>
<add position="before"><![CDATA[
	<div>Whatever you want to add here</div>
]]></add>
</operation>
</file>
</modification>