X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   module (https://forum.x-cart.com/showthread.php?t=69373)

Gabone 06-13-2014 07:24 AM

module
 
where can i fine an open source module so i can see how an insert/update/delete is made (i read the documentation) , i wanna understand the xcart 5 module functionality.
Thanks.

Andrew_J 06-30-2014 07:56 AM

Re: module
 
Me too. The ones I found on line are for ver 4.x and throw a version error.

cflsystems 06-30-2014 09:17 AM

Re: module
 
Just look at the modules included with XC5 installation pack

tony_sologubov 07-01-2014 05:40 AM

Re: module
 
Hi guys!

Could you please let me know what data you want to insert or update? I can give you real examples of working code.

Tony.

tony_sologubov 07-01-2014 05:41 AM

Re: module
 
In majority of cases, you do not write the SQL code at all, you just write PHP code and work with models.

Andrew_J 07-03-2014 07:36 PM

Re: module
 
I created a simple module to put text in the side bar. In order to do this, you need to create Main.php and somename.tpl.

Examples of my files are here: (deleted)

Paths in the X-cart installation are root/classes/XLite/Module/XC/yourmodulename/main.php and root/skins/default/en/modules/XC/yourmodulename/somename.tpl

Icon.png is in the same directory as main.php but it isn't showing up in the installed modules list.

This will give you a module that will place text or links etc. in the sidebar. I want to figure out how to make it so that I can chose the order that the module appears in the sidebar.

Hope this helps. :)

EDIT: I created a module that can add things to your sidebar. It is at http://fileshare.ninja/142997rh/sidebar-links-module.zip

tony_sologubov 07-07-2014 02:26 AM

Re: module
 
Please do not use XC as developer ID, because it has been reserved for default modules.

Andrew_J 07-07-2014 05:45 AM

Re: module
 
Quote:

Originally Posted by tony_sologubov
Please do not use XC as developer ID, because it has been reserved for default modules.


Oh? I didn't realize that. When I attempted to create a module before, the only way I could get it to appear in the installed module list in admin was to place it in XC.

I'll play with it some more. :?

Andrew_J 07-09-2014 10:01 AM

Re: module
 
My problem with my previous attempts to create a module appear to be due to me using an invalid char in the dir name or the file name. That's the "-" char. When I use my own developer ID, it now works.

Are there any other idiosyncrasies that we should know about?

qualiteam 07-10-2014 01:10 AM

Re: module
 
Your Developer ID and Module ID go as a part of the PHP class namespace. So you can use any characters allowed for PHP namespaces. The "-" is not one of these.


All times are GMT -8. The time now is 03:04 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.