Post by Asad141 » Thu Dec 24, 2020 5:50 pm

Hi I want to add this code to every page of my open cart store version 3.x and I am using journal theme
Thanks.
<!-- GetButton.io widget -->

(function() {
var options = {
whatsapp: "923084530238", // WhatsApp number
call: "923084530238", // Call phone number
call_to_action: "Message us", // Call to action
button_color: "#FF6550", // Color of button
position: "right", // Position may be 'right' or 'left'
order: "call,whatsapp", // Order of buttons
};
var proto = document.location.protocol,
host = "getbutton.io",
url = proto + "//static." + host;
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = url +
'/widget-send-button/js/init.js';
s.onload = function() {
WhWidgetSendButton.init(host, proto, options);
};
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
<!-- /GetButton.io widget -->

Newbie

Posts

Joined
Fri Dec 18, 2020 6:01 pm

Post by straightlight » Fri Dec 25, 2020 5:22 am

Journal is not supported on the forum. However, you could use an Event to accomplish this. You could also follow the e.g of the catalog/controller/extension/advertise folder on how to launch JS or TWIG files with an /after event.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 11 guests