Post by nsteele11 » Mon Mar 03, 2025 5:34 am

I am using the correct directories as far as I know, using a install.json in the same directory as the admin folder. using .twig to be in line with 4.1

Is anyone able to see why my modules files are not recognized in open cart 4.1? Is there anything obvious I am missing to start making modules work for me, for context yes I had claude help with some coding, I do have a bit background in coding but very minimal.

This is a simple pop up 'age verification' module. Claude did tell me an alternate way to do it without a module, however I wanted to be able to share this after.

Newbie

Posts

Joined
Mon Mar 03, 2025 5:26 am

Post by paulfeakins » Mon Mar 03, 2025 8:54 pm

nsteele11 wrote:
Mon Mar 03, 2025 5:34 am
Is anyone able to see why my modules files are not recognized in open cart 4.1?
No such version?

However, most developers recommend you do not use any version of OpenCart 4 yet.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Tue Mar 04, 2025 12:24 am

You should take a look at the opencart sample module extensions, to get an idea how to write an extension module.
The worst part is that OpenCart extensions don't use proper path-based namespaces, so this is always something to watch out for.

Anyway, try attached modified ageverification.ocmod.zip which seems to work fine on OC 4.1.0.0. Don't use OC 4.1.0.0 yet on a live website, wait for until OC 4.1.0.1 has been released with needed bugfixes.

Attachments

Age Verification Popup Module


Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: paulfeakins and 4 guests