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

X-cart 5 module developer conflicts

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-26-2014, 07:57 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default X-cart 5 module developer conflicts

I want to start a thread discussing possible conflicts between modules by third party devs.

Module developers each get an assigned developer ID like BCSE or Justuno that they can use to keep their modules unique and separate in the file structure.

But there are other potential conflicts which could possibly arise. I intend for this thread to help document best practices and avoid these conflicts.

List of potential conflicts (updated):
1. An obvious one is appending your developer id to any database tables that are created by your module. so if you are creating a table for your module named banner_images, put your dev id in front like XXXX_banner_images

2. Another one I just encountered today is targets for admin and customer side. If you are creating a module that makes a new page, the target needs to append your developer id. So if you make a news module like Tony describes here: http://kb.x-cart.com/display/XDD/Webinar+1+-+18+Mar+2014+-+Developing+modules+for+X-Cart+5 the target should probably be --target=tony_news

3. CSS classes and element ids. Good idea to append your dev id to your CSS classes as well as any id names for html elements that you assign.

4. Language labels. Could be a potential conflict if the label already exists.

5. Javascript functions. Append that dev id in your function names..

I'm sure there are other places where this is important, please add yours, comment, and correct me.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following 2 users thank totaltec for this useful post:
qualiteam (08-31-2014), Rainbow (08-26-2014)
  #2  
Old 08-26-2014, 08:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-cart 5 module developer conflicts

One possible solution about tables names is XC5 to force devid_ in front of table name. Right now when adding table XC5 forces xc_ (default) in front of the table name - so if my table is csi_table_name it becomes xc_csi_table_name - I don't like this in particular as this table is not part of the stock XC tables, I would much more prefer to be without the xc_ in front.

But if the code itself will be forcing DEVID_ in front we need to know or tbales will end up with devid_devid_table_name....

Same can be for targets I guess.

So maybe if the default XC5 code itself forces devid_ in front of everything that can be in conflict there is no need for us to watch out for it... Just a suggestion, not sure how difficult is for this to be included or what happens when you have devid - thisismydevidnomatterwhat
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following 2 users thank cflsystems for this useful post:
qualiteam (08-31-2014), totaltec (08-26-2014)
  #3  
Old 08-31-2014, 12:39 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: X-cart 5 module developer conflicts

Hi!

Good points!

I've sent a link to this thread to the XC5 devs. Perhaps, they could implement some of the ideas in future XC5 versions.

Thanks!
__________________
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:
totaltec (08-31-2014)
  #4  
Old 09-03-2014, 11:54 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: X-cart 5 module developer conflicts

Hi guys!

Thanks for sharing ideas. These are important points and we will be implementing them once we catch up with the most major functionality. I believe, it will be in a year or earlier.

Just do not want to over-promise that we are going to add them soon.

Anyway, they are in my TODO list and we will come to it later on.

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
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



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:45 AM.

   

 
X-Cart forums © 2001-2020