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

How can I add different table related to product in xcart.

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-05-2018, 10:00 PM
 
Wupendra Wupendra is offline
    
Join Date: Sep 2018
Posts: 1
 

Default How can I add different table related to product in xcart.

Hello, I have been trying to add supplier table to xcart via module. The supplier table is related to product table and I have no idea how to build a relationship between tables in xcart.



What I am doing for theses couple of days is: I have created a supplier table. It has id and name. Now I need to have a extra field in product table where I can choose by select box from which supplier is it. I tried adding a field in product table. I followed the documentation https://devs.x-cart.com/basics/adding_new_property_to_a_product/. As per documentation if I create same module as in the example I can add new my message field. But when I add supplier field with integer type the re-deploy is stuck at 4 of 13 for forever. Please help. Thank you in advance.
__________________
X-Cart 5.3
Reply With Quote
  #2  
Old 09-07-2018, 03:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: How can I add different table related to product in xcart.

Hi @Wupendra,

Welcome to the forums!

Here is an article about Image Widget: https://devs.x-cart.com/basics/using_images_widget.html
which by chance illustrates how you can link entities together.

In this example, Product model starts having new secondaryImages property which ties it with a new SecondaryImage model in a way that one product can be linked to multiple secondary images, while one secondary image is tied to a single product.

Please check this article and let me know if it helps you with your task.

Tony

Quote:
Originally Posted by Wupendra
Hello, I have been trying to add supplier table to xcart via module. The supplier table is related to product table and I have no idea how to build a relationship between tables in xcart.



What I am doing for theses couple of days is: I have created a supplier table. It has id and name. Now I need to have a extra field in product table where I can choose by select box from which supplier is it. I tried adding a field in product table. I followed the documentation https://devs.x-cart.com/basics/adding_new_property_to_a_product/. As per documentation if I create same module as in the example I can add new my message field. But when I add supplier field with integer type the re-deploy is stuck at 4 of 13 for forever. Please help. Thank you in advance.
__________________
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
  #3  
Old 09-07-2018, 05:03 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: How can I add different table related to product in xcart.

I actually build a Suppliers module for a client some time ago. I can redo it for you with your requirements and to fit your business model. If you are interested open a ticket at https://www.cflsystems.com/support with details and we can get this working for you.

Some of the module's features - create list of suppliers with basic info for each one like name, address, contact, etc; assign products to supplier in bulk from the supplier page; assign supplier to product from product page; minimum order per supplier; fee if minimum order is not met; other
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
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 05:19 AM.

   

 
X-Cart forums © 2001-2020