Hello Everyone,
I'm trying to place a Welcome popup box on my website on page load but can seem to find the place (or file) to insert the popup box code, I have tried placing it on the header.twig but it did not work. I'm using OC version 3.0.2.0
Would anyone know where to place the popup box code?
Thank you
I'm trying to place a Welcome popup box on my website on page load but can seem to find the place (or file) to insert the popup box code, I have tried placing it on the header.twig but it did not work. I'm using OC version 3.0.2.0
Would anyone know where to place the popup box code?
Thank you
Last edited by porter943 on Mon Feb 24, 2025 2:41 am, edited 1 time in total.
Probably the common/footer.twig would be the place to add your JQuery/javascript code for the popup, using an OpenCart event handler.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
You don't need the <?php ... ?> tags.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
An easy way is to install an extension that lets you add custom JS to the the site header. You just need to add this:
Code: Select all
<script type="text/javascript">
window.onload = function () { alert("Welcome!."); }</script>
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
No .. really .. ?nonnedelectari wrote: ↑Sun Feb 23, 2025 7:56 pmA welcome alert on every page load, that's going to be annoying.
Remembers me back in the end of the '90s

And javascript?
No, flash would be much better ..

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 21 guests