Post by Sourov » Wed May 20, 2020 3:42 am

Hello,
I have developed a custom module. After installing this module, a script should be added in every pages. But after installing from opencart admin panel, script doesn't load in all pages. Just loads in 1/2 pages. Can any one give me any suggestion please?
Thanks in advance.
Last edited by Sourov on Sun May 24, 2020 12:51 am, edited 3 times in total.

Newbie

Posts

Joined
Wed May 20, 2020 3:36 am

Post by johnp » Sat May 23, 2020 7:36 pm

You mean a module? What's the module and 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 Sourov » Sun May 24, 2020 12:39 am

I have edited my question. Yes a module. Sorry! I am updating code & testing from local server. So can't share here. After installing this custom module I need to put a script code to all the pages in store front. But script is adding in 1 or 2 pages only. That's the problem.

Newbie

Posts

Joined
Wed May 20, 2020 3:36 am

Post by johnp » Sun May 24, 2020 2:33 am

Is this a top secret project? You're not giving much info away. :)

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 Sourov » Wed May 27, 2020 10:42 am

No, the module name is revechat. You can download previous versions from this link.
https://www.revechat.com/integrations/opencart/

After some research I found that, for loading banner in every page, the script should be loaded inside the header/footer section of the page. But in our opencart 1.5 & 2 module, the script is loading inside the body. That's why causing the problem. Probably this is the code problem.

In my code it is mentioned to add it inside the header/footer. But unfortunately it is not adding in header/footer.

$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');

If we add script inside the header/footer manually then the banner is visible to every page.

Newbie

Posts

Joined
Wed May 20, 2020 3:36 am

Post by johnp » Wed May 27, 2020 5:36 pm

I use Tawk. Same thing. You need to add the code to the header.

So are you sorted now? If not, I would suggest writing a VQMOD to insert the code in the header or footer.

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 » Wed May 27, 2020 5:40 pm

For OC2 you could use this extension;

https://www.opencart.com/index.php?rout ... load_id=41

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 57 guests