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

shared database

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-18-2002, 08:12 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default shared database

has anyone been able to adapt x-cart to work with the same database across two or three sites?

looking to see whether this is possible for a client that has three e-commerce stores that will have mostly the same products on them all.

any ideas??
Reply With Quote
  #2  
Old 10-18-2002, 08:52 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default

Couldn't you just export the product database and then import it to the other site's x-cart? Or back up your database and restore it to another site's x-cart?

Just a thought.
Reply With Quote
  #3  
Old 10-18-2002, 08:54 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default

Couldn't you just export the product database and then import it to the other site's x-cart? Or back up your database and restore it to another site's x-cart?

Just a thought.
Reply With Quote
  #4  
Old 10-18-2002, 04:07 PM
 
ATKOgirl ATKOgirl is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 448
 

Default

Hi,

This may depend on how your hosting company has MySQL access set up. You might want to ask them if it is possible to have different domains access the same domain. Even if they are not set up to function in this way, they can probably grant the ability to you fairly easily.



ATKOgirl
__________________
X-Cart Versions: 4.1.10 and 4.2.0
Reply With Quote
  #5  
Old 10-19-2002, 12:32 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default shared database

Quote:
Originally Posted by ATKOgirl
Hi,

This may depend on how your hosting company has MySQL access set up. You might want to ask them if it is possible to have different domains access the same domain. Even if they are not set up to function in this way, they can probably grant the ability to you fairly easily.



ATKOgirl

I have total control over how MySql is set up and can set up the correct users and priviledges to various domains either through mysql or PHPMyAdmin.

I know it is possible from a mysql point of view and I'm pretty sure that I can configure x-cart for this database. What I'd really like to do is specify which shops the products/categories appear in.

eg: category x appears in all three shops, category y appears in two etc...

I guess that an additional field could be added to the categories tables that specified which shop to show in and then put some logic in place within smarty to do the hard work - just wouldn't know where to start.

I also guess that there would need to be duplicates of various tables holding the label, text, email etc..

Another thought is to set up a cron job that backs up the sql from selected tables within the main database daily and updates a mirror (almost) database so that those product show within those shops.

any ideas/thoughts?
Reply With Quote
  #6  
Old 10-19-2002, 02:59 PM
 
ATKOgirl ATKOgirl is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 448
 

Default

Hi,

A very easy workaround for this would be to hard code the main categories for each store into each store's categories.tpl. This assumes that the main categories won't be changing very frequently.

ATKOgirl
__________________
X-Cart Versions: 4.1.10 and 4.2.0
Reply With Quote
  #7  
Old 10-19-2002, 11:42 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default


you're a genius!

why is the simplest solution so often the best? I think that a lot of the text labels that are store specific would also need to be hardcoded, but this would work.

Thanks
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 11:02 PM.

   

 
X-Cart forums © 2001-2020