Post by Gaspar » Fri Feb 07, 2020 5:22 pm

I can not figure it out. The documentation says (http://docs.opencart.com/en-gb/extension/modifications/):
You can apply modifications either by uploading a single modification file or a compressed file containing XML, PHP and SQL scripts. Both of these approaches use the Extension Installer as a way to be imported into an OpenCart system.

OpenCart modification files follow a strict naming rules. In order for your modification to be accepted by the installer and uploaded to the system it should have a file extension of .ocmod.xml. Here is an example yourmodifcation.ocmod.xml
But the installer doesn't allow no other than '.ocmod.zip' extensions (line 138):

Code: Select all

if (substr($this->request->files['file']['name'], -10) != '.ocmod.zip') {
What am i missing here?
Last edited by Gaspar on Fri Feb 07, 2020 7:09 pm, edited 2 times in total.

Newbie

Posts

Joined
Wed Dec 02, 2015 4:29 pm

Post by thekrotek » Fri Feb 07, 2020 5:28 pm

.ocmod.xml is for uploading to "system" folder.
.ocmod.zip is for installing via Extension Installer.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Gaspar » Fri Feb 07, 2020 5:45 pm

Thanks for clarification.

So:
1) the modification should be structured: mymod/install.xml (actual ocmod file)
2) zip it together by name mymod.ocmod.zip
3) upload it with installer
4) it get's inserted into oc_extension_install table

How does it go to oc_modification table?

Newbie

Posts

Joined
Wed Dec 02, 2015 4:29 pm

Post by thekrotek » Fri Feb 07, 2020 5:52 pm

Gaspar wrote:
Fri Feb 07, 2020 5:45 pm
How does it go to oc_modification table?
When modification cache is refreshed.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Gaspar » Fri Feb 07, 2020 7:07 pm

Found it!
Do not zip together directory BUT file!
So NOT mymod/install.xml BUT ONLY the file install.xml and RENAME it as mymod.ocmod.zip

Newbie

Posts

Joined
Wed Dec 02, 2015 4:29 pm
Who is online

Users browsing this forum: No registered users and 74 guests