Page 1 of 2

Module Manager

Posted: Thu Oct 28, 2010 12:13 am
by readyman
I'm working on a new module manager with an uploader/installer & a module positions manager.

Image

At present, it uploads to a new folder in the admin section called "uploads".
It takes a zip that has the folder "upload" in it's root directory, and when unzipped it simply extracts all files to the opencart root folder recursively. It doesn't matter whether the file is uploading into the catalog or admin folders, just anywhere in the opencart installation.
Cons: At present, it overwrites everything when you upload a new file, so I need to add more granular control over whether it overwrites files automatically or skips files that already exist just in case, but it's actually working as a uploader & file extraction tool right now.

I will do the same for themes ie. a theme manager, uploader/installer.
Payment, shipping etc could all use the same upload/extract library as well.

What's required for finishing this.
- As mentioned above, more granular control over the way the zip is extracted - it's not make or break though at this stage, so I can still release without this and put any warnings in the documentation.
- I want to add module positions for existing & future modules as a tab. ie. module position management. The module positions will then be stored in the database as a setting, not in each module hardcoded in the files.
Cons: Module positions are hardcoded in the controllers at the moment - will need to be updated with new code or reference module positions from the db rather than coded. My current solution is to add a "get code" feature with instructions to include it in the relevant controller file.


Does anyone like this?

Re: Module Manager

Posted: Thu Oct 28, 2010 12:29 am
by Qphoria
Yes. I too have had this on the back burner for some time now. Your's looks like it is a bit more advanced.
Mine is just an upload filebox that will extract a zipped module and copy the contents to the correct location.
There is also beginner code for my previous ideas of using an SMF-style xml modification system.

Perhaps my code will help or you may have already gotten past this point.

Re: Module Manager

Posted: Thu Oct 28, 2010 12:29 am
by JAY6390
Nice. I had thought of something similar a few months back for the file upload/overwrite, but figured people can upload much the same with just filezilla or another FTP program. The positions and "Get Modules" sounds interesting though. Would be nice for OC to have this kind of thing available as standard, with an API call to OC to find the latest mods in the extensions area

Re: Module Manager

Posted: Fri Oct 29, 2010 12:48 am
by qahar
This is worth.
I have a suggest, what about Uninstall (i mean remove the module file)

Re: Module Manager

Posted: Fri Oct 29, 2010 1:29 am
by Xsecrets
This sounds great, but It is pretty much pointless unless it gets rolled into the core so that all module makers can make their modules in one standard way.

Re: Module Manager

Posted: Mon Nov 29, 2010 12:45 pm
by readyman
No Xsecrets, it's not pointless for an entrepreneur like me. I can use it for every new ecommerce client that I have and offer them quick installation to modules without having to upload new modules into their installations.
It's also not pointless, because I'm coming at this from a 'cutting down of support' and making it easier for the user perspective.

If I release documentation on module best practise packaging then everyone will follow suit because I want to provide this as a free tool anyway. So free in core or not, it should work fine.
It would be good to standardize the way that all modules are packaged and installed, that's what I'm trying to do.

The Get Modules tab shows a list of modules that are automatically downloaded to the user's current installation. That cuts down all support, all installation issues and puts the module directly into the users administration.

It does become pointless when we decide that we want one or two developers to handle the entire weight of all innovation that is within opencart, essentially alienating all other developers or worse, commercialising all future modules.

@Qahar, I'm currently looking at drupal's uninstall routine, which is similar to their install routine, and it looks like I could borrow some concepts from that, for this mod.

Re: Module Manager

Posted: Mon Nov 29, 2010 6:30 pm
by JAY6390
readyman wrote: @Qahar, I'm currently looking at drupal's uninstall routine, which is similar to their install routine, and it looks like I could borrow some concepts from that, for this mod.
To be fair, the Drupal module system is fantastic

Re: Module Manager

Posted: Mon Nov 29, 2010 10:20 pm
by SapporoGuy
I like how modx ties in with the main extension listings on the developer site. You also don't have to worry about versions since it cross checks between modules and the version you are using.

Could you also set it up to run the sql queries for those modules that need them?

Re: Module Manager

Posted: Mon Nov 29, 2010 11:16 pm
by Qphoria
SapporoGuy wrote: Could you also set it up to run the sql queries for those modules that need them?
If you call the modules own install function, this should be done for you, assuming you added the sql command to the install function

Re: Module Manager

Posted: Tue Nov 30, 2010 1:08 am
by Xsecrets
readyman wrote: It does become pointless when we decide that we want one or two developers to handle the entire weight of all innovation that is within opencart, essentially alienating all other developers or worse, commercialising all future modules.
isn't that what you are trying to do here? except it will be worse because someone else will see a problem with it and release their version then another and we'll have 5 different mod installers and which one do you support which one does your customer have installed. Not such a big deal if all your customers start and end with you, but what about people who are simply putting mods out there for anyone. I certainly agree that OpenCart needs a mod installer in the admin, but I absolutely believe that it needs to be discussed and a best possible proper solution added directly into the core so that all mod makers can follow the standards and all mods can eventually be installed straight through the admin.

Re: Module Manager

Posted: Tue Nov 30, 2010 10:30 pm
by SapporoGuy
+ 1 being added to the core

lolo, similar arguments that I made about developers abusing the setting table to hack a mod to work globally.
Having standards to follow will be pain in the arse but will benefit all in the end ;D

Re: Module Manager

Posted: Sun Jun 17, 2012 7:38 pm
by Dreamvention
I think this is essential for opencart to make a step forward. most advanced platforms offer this backend experience, and adding this to opencart is a must.

Its not a big deal for developers, but for simple users its a stressful issue. most of my clients have no clue what is FTP :-\

We develop much on opencart and love it for its code, but we want it also to be loved by users for its usability.

So, If there is a need for a helping hand, i a more than interested.

Re: Module Manager

Posted: Wed Jul 18, 2012 11:54 pm
by TomC
So how is this Module Manager extension project coming along ??


Personally, as someone who has worked with the Joomla CMS for several years, the various "Manager" functions within the administration cpanel are both essential and invaluable in terms of managing any/all content and site administration.

OpenCart may not be a content management system per se ... but it actually kinda IS - as we are managing the content/information that is presented and displayed for our respective stores.

Re: Module Manager

Posted: Thu Jul 19, 2012 12:36 am
by JAY6390
This as far as I know has been abandoned. Nowadays most mods use vQmod instead. There is a vQmod manager for that

Re: Module Manager

Posted: Thu Jul 19, 2012 12:43 am
by TomC
JAY6390 wrote:This as far as I know has been abandoned. Nowadays most mods use vQmod instead. There is a vQmod manager for that
Thanks for the quick reply and insight. I am new to OpenCart, so I am continuing my self-education/research as to the various elements and capabilities. vQmod is still a bit of a foreign concept to me - having spent most of my "web design/development" time and learning within the Joomla CMS system. (I'm actually a Forum Moderator and (as much/best I can) Support Team Member for a Joomla template club).


In any case, THANK YOU for the insight. My learning process continues.

8)

Re: Module Manager

Posted: Fri Jul 20, 2012 6:31 pm
by JNeuhoff
I am currently testing a new OpenCart Addon manager. Hope to release it soon. It also includes support for modifying OpenCart core classes and templates. Core classes can be extended and methods be overridden. It can even cope with the scenario where multiple addons happen to extend and override the same method of a core class.

See this discussion for details.

Re: Module Manager

Posted: Fri Jul 20, 2012 6:33 pm
by JAY6390
Excellent, I look forward to seeing the result :)

Re: Module Manager

Posted: Thu Aug 30, 2012 4:32 am
by JNeuhoff
JAY6390 wrote:Excellent, I look forward to seeing the result :)
I am currently using my new addon manager for a new Opencart based website which I am currently developing, to gain some more experience on a real world project. The addon manager uses a new system/engine, and most classes are now loaded via a new factory.

The factory automatically makes use of extended classes for controllers, models, system/library classes, if there. It can also modify language files and templates, the latter is done in an overrriden new method called preRender. As an unexpected side effect, the whole lot seems to run faster than the original Opencart engine.

Hope to release it very soon under the GPL3 license. I think it has the potential to replace VQmod in the long run, for the time being I have also added support for VQmod which it detects automatically.

Re: Module Manager

Posted: Thu Aug 30, 2012 4:47 am
by rph
Sounds interesting. Can't wait to see it.

Daniel seems to be working on something too:

https://github.com/opencart/opencart/bl ... anager.php

Re: Module Manager

Posted: Fri Aug 31, 2012 6:40 pm
by JNeuhoff
rph wrote:Sounds interesting. Can't wait to see it.

Daniel seems to be working on something too:

https://github.com/opencart/opencart/bl ... anager.php
Our addon manager solves different problems compared to what Daniel's extension manager does. But it's good to see the efforts in bringing OpenCart forward in that direction.

Our addon manager is able to modify Opencart core classes, language files and templates, and can handle multiple addons which happen to modify the same core files. I have completed a first round of testing, and already have deployed a few addons (formerly written as VQmods) on a new Opencart based website, with few of them modifying the same Opencart core classes and templates.

I am now working on some documentation, also hope to write a admin tool for this to manage the uploads of addons.