Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

module

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-13-2014, 07:24 AM
 
Gabone Gabone is offline
 

Advanced Member
  
Join Date: May 2014
Location: Bucharest
Posts: 37
 

Default 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.
__________________
xcart 5
Reply With Quote
  #2  
Old 06-30-2014, 07:56 AM
 
Andrew_J Andrew_J is offline
 

Advanced Member
  
Join Date: Jun 2014
Location: USA
Posts: 51
 

Default Re: module

Me too. The ones I found on line are for ver 4.x and throw a version error.
__________________
Newb X-Cart 5 user trying out X-cart ver 5.1.3 free, local system is running Linux, web host server is running Debian, mySQL 5.5.32, Perl 5.8.8, PHP 5.3, shared hosting.
Reply With Quote
  #3  
Old 06-30-2014, 09:17 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: module

Just look at the modules included with XC5 installation pack
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
Andrew_J (07-01-2014)
  #4  
Old 07-01-2014, 05:40 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
Andrew_J (07-03-2014)
  #5  
Old 07-01-2014, 05:41 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: module

In majority of cases, you do not write the SQL code at all, you just write PHP code and work with models.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #6  
Old 07-03-2014, 07:36 PM
 
Andrew_J Andrew_J is offline
 

Advanced Member
  
Join Date: Jun 2014
Location: USA
Posts: 51
 

Default 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
__________________
Newb X-Cart 5 user trying out X-cart ver 5.1.3 free, local system is running Linux, web host server is running Debian, mySQL 5.5.32, Perl 5.8.8, PHP 5.3, shared hosting.
Reply With Quote

The following user thanks Andrew_J for this useful post:
tony_sologubov (07-07-2014)
  #7  
Old 07-07-2014, 02:26 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: module

Please do not use XC as developer ID, because it has been reserved for default modules.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #8  
Old 07-07-2014, 05:45 AM
 
Andrew_J Andrew_J is offline
 

Advanced Member
  
Join Date: Jun 2014
Location: USA
Posts: 51
 

Default 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.
__________________
Newb X-Cart 5 user trying out X-cart ver 5.1.3 free, local system is running Linux, web host server is running Debian, mySQL 5.5.32, Perl 5.8.8, PHP 5.3, shared hosting.
Reply With Quote
  #9  
Old 07-09-2014, 10:01 AM
 
Andrew_J Andrew_J is offline
 

Advanced Member
  
Join Date: Jun 2014
Location: USA
Posts: 51
 

Default 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?
__________________
Newb X-Cart 5 user trying out X-cart ver 5.1.3 free, local system is running Linux, web host server is running Debian, mySQL 5.5.32, Perl 5.8.8, PHP 5.3, shared hosting.
Reply With Quote
  #10  
Old 07-10-2014, 01:10 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
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
Reply With Quote

The following user thanks qualiteam for this useful post:
Andrew_J (07-10-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:05 AM.

   

 
X-Cart forums © 2001-2020