Litecommerce - How do I get my custom module working?
-
I am developing a custom shipping module for LC3, and am experiencing some issues... I have created a blank module as described in the official Module Developer's Tutorial, the structure of which is as follows: classes/XLite/Module/Scuba/TransDirect/Main.php classes/XLite/Module/Scuba/TransDirect/icon.png classes/XLite/Module/Scuba/TransDirect/install.yaml I have also created the following files based on the free AustraliaPost module: classes/XLite/Module/Scuba/TransDirect/Controller/Admin/Transdir.php classes/XLite/Module/Scuba/TransDirect/Model/Shipping/Processor/TransDirect.php classes/XLite/Module/Scuba/TransDirect/View/TopMenu.php classes/XLite/Module/Scuba/TransDirect/View/Tabs/ShippingSettings.php skins/admin/en/modules/Scuba/TransDirect/config.tpl skins/admin/en/modules/Scuba/TransDirect/location.tpl skins/admin/en/modules/Scuba/TransDirect/main.tpl When all files are uploaded into their various locations on the server and I re-build the cache, the Module appears in my Add-ons page with no issues. When I click into my Shipping Settings page, the tab for TransDirect Settings appears there as well... My issue arises when I click the Settings on my module... I get a very basic page with no CSS, etc. showing only (in plain text): Home :: TransDirect settings TransDirect settings Shipping settings Methods Zones Rates TransDirect settings Internal error. Contact the site administrator. I have logged into my database and found that although the module says it is installed, the install.yaml file has not been run, as none of the relevant tables have any new data. I'm sure that I have probably just missed something very simple, but please help. I am more than happy to provide the relevant files if required.
-
Answer:
Data from install.yaml is imported only when a module is installed either from Module Marketplace, or from a module package via the "Upload add-on" button on the "Manage add-ons" page ("Add-ons" menu tab in the shop backend). You can install your custom LiteCommerce module as follows: 1. Enable the "developer_mode" option in your LC3 installation (https://github.com/litecommerce/core/wiki/Preparing-for-LiteCommerce-module-development). 2. Get into the shop backend, find your module on the "Manage add-ons" page ("Add-ons" menu tab) and click "Pack it" button next to it. That will create a module package from the module files on your server. 3. Install the package with the "Upload add-on" function. That will import data from your "install.yaml". If you have made any changes to the "install.yaml" file, you should uninstall the module (that will delete all data associated with the module) and re-install it once again. Does this help?
Vyacheslav Petrov at Quora Visit the source
Related Q & A:
- How can I install node.js module using phantom, instead of npm?Best solution by Stack Overflow
- How can I get custom fields in wordpress?Best solution by Stack Overflow
- How do I get a custom firmware on my PSP slim?Best solution by Yahoo! Answers
- How can I get a job working in the Medical field for NASA?Best solution by Yahoo! Answers
- How do i get msn working again?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.