| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
make a module?? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
make a module??
Hey guys is there a tutorial on how to make a module?
or i need to add a function.... is there anything out there that can help me??
__________________
X-Cart version 4.4.3 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: make a module??
Moving to "Program Logic" forum.
There is no tutorial unfortunately. But you can always check the source code of any built-in module to get the idea. I suppose the sitemap module can be used as a source: Code:
Also, check this -> http://help.qtmsoft.com/index.php?title=X-Cart:Integration_with_third_party_modules
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: make a module??
Old topic but seems relevant to my question.
I'm in need of module that has same functionality as Manufacturers but different name, I tried cloning it (like successfully can be done with WordPress plugins or similar) but when I upload it to server does not even show up in "Modules" list in xcart admin. Is it because "Manufacturers" is part of the xcart (built in) modules and has depending code elsewhere in xcart files? Can cloning be done or need to create completely new plugin? Any ideas, suggestions greatly appreciated.
__________________
x-cart 4.4.2 Gold |
|||||||
#4
|
|||||||||
|
|||||||||
Re: make a module??
Sure, you can clone a module, but its not that simple in X-Cart unfortunately. You should use FTP access to make a copy. Also, you should update the DB and add module record there as well.
Since modules in X-Cart are not completely separated from the core, you will need to add support to the required core functions. Code:
'MyModule' - should be the same as the folder name containing the module files (module is located here -> <xcart-dir>/modules/MyModule).
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#5
|
|||||||
|
|||||||
Re: make a module??
So the code you posted is SQL query that needs to be inserted into the DB?
Also please correct me if I'm wrong, since the functionality of the module I want to clone is exactly same as Manufacturers and the products will be associated with it (like selecting manufacturer) I will need to add row to product table too? and anything else Manufacturers module does at activation? Thank you very much.
__________________
x-cart 4.4.2 Gold |
|||||||
#6
|
|||||||||
|
|||||||||
Re: make a module??
If I understand you correctly you need a separate module.
Thus separate records in DB are required. To make the new module work the same way you should "grep" the code (grep -r "Manufacturers" *) and add similar code but for your module. In most cases the simplest way will be customizing the existing module.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#7
|
|||||||
|
|||||||
Re: make a module??
Thanks Alex
I did replaced all instances of Manufacturers to new name but still does not show up in Modules list. Maybe I missed something. Also I think I need to add code in admin files (product_modify, etc.) to display fields if I'm correct. Has anyone had success in cloning existing module? Thanks.
__________________
x-cart 4.4.2 Gold |
|||||||
#8
|
|||||||||
|
|||||||||
Re: make a module??
You should add corresponding record to the "xcart_modules" table to have the module displayed in the modules list.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|