How Do You Connect Two Cs-Cart Installations?

I have a separate wholesale company and a separate retail company. We have brought our retail website online. Soon we will start work on our wholesale website.

I believe its best to use a separate install of CS-Cart for this, because the wholesale website needs:

- different pricing

- very different functionality

- different UI

- limited products

- sales need to be completely separated for accurate tax reporting

- import into our ERP/CRM

At the same time I would like to connect the wholesale store with the retail store so that

- setting a product out of stock or disabling it will put the product out of stock at both websites.

- product details like weight have to be entered only once.

So it seems best to have two installations of CS-Cart but connecting them somehow.

Does anyone have idea's on how to do this?

What is the best approach?

I have a separate wholesale company and a separate retail company. We have brought our retail website online. Soon we will start work on our wholesale website.

I believe its best to use a separate install of CS-Cart for this, because the wholesale website needs:

- different pricing

- very different functionality

- different UI

- limited products

- sales need to be completely separated for accurate tax reporting

- import into our ERP/CRM

At the same time I would like to connect the wholesale store with the retail store so that

- setting a product out of stock or disabling it will put the product out of stock at both websites.

- product details like weight have to be entered only once.

So it seems best to have two installations of CS-Cart but connecting them somehow.

Does anyone have idea's on how to do this?

What is the best approach?

Will adding a second storefront not achieve most of what you are looking to do.

different pricing

You can do this by adding by adding a wholesale group and adding a promotion discount to that group within your wholesale site.

- very different functionality

Would need more detail?

- different UI

Seperate storefronts are like seperate sites except for the database or products etc.

- limited products

Only assign the products you want to each store.

- sales need to be completely separated for accurate tax reporting

As far as I am aware the sales can be broken down per store, if not export and analyze.

- import into our ERP/CRM

As above.

Please see this suggestion and thread for a detailed discussion of requirements for wholesale sites:
https://cscart.uservoice.com/forums/134344-cs-cart/suggestions/7509190-better-wholesale-b2b-functionality
http://forum.cs-cart.com/topic/35897-wholesale-and-retail-product-settings/

To me it seems best to use separate stores and connect them through API or similar. The requirements for B2B deviate so much from normal retail sites, that there will be conflicts without a doubt.
Especially considering all the problems that we have thus far encountered in CS-Cart. We had to start from scratch several times due to database corruption and pollution. I dont want to do that again.

The same concept applies to our resellers.

I would like to connect multiple installations of CS-Cart. One installation acts as the primary and others act as the secondary installations.

We basically have 2 groups of products: products that we can resell and products that we cannot resell.

Secondary installations are run by other companies who resell our products.

On secondary installations I want to show all products available for resale, categories, product stock, features, shipping details and various selected product details.

What would be the way to accomplish this? I see we can use the API by API url and parameters.

But how do you have the second installation fetch the API values?

How do you differentiate between products that should be on secondary sites and those that should not?

I tend to agree with Takestock above. It would be a lot easier to use 2 storefronts. Then for your resellers, have them run the 2nd storefront in an iframe.

To connect sites as you envision would take the definition of events (both sides) and actions. You can achieve some via the API but my guess is that you want to only update a quantity upon a sale or other change in quantity in the child-stores and you want to update the quantity in the parent when a child store sells the product. You'll also need events like "create product" that will then update all the children with the new item. Also note that the API is NOT event driven. So you'd be synching at "periods", not in real-time.

While these things are not overly difficult, the trick is to ensure that you define all events/actions. Building of a child store will be the greatest problem but you might be able to do that with an export/import to get things initialized.

You should also consider the impact to performance of all these real time updates to potentially large numbers of children. I.e. you have one parent and 20 children and do a sale on a child site. You'll then have:

child -> parent (update product quantities)

parent -> to all children (update product quantities) one by one

This is not a problem for the child order. But if the order is on the parent, then the child updates will have to complete before the user can continue (or complete the order process).

If any of the children are slow to respond due to load and/or availability (timeouts) then the operation can block for quite some time (and since there are no threads in PHP, this will block your customer order completion until all the children are updated). Remember that web activity is stateless and synchronous. You might be able to use javascript to generate the update to the children and have ti be somewhat asynchronous since it won't really care if the ajax response never returns....

An alternative architecture would be to use a hub where the data is updated that is independent of the parent. So the parent would then be refreshed just like the children. This would be a much better approach but would require significant development to administer all the operations. But you'd probably want a nightly sync to all children just to be sure everything is up to date.

Merry Christmas.

II had realized the issue with having both downstream and upstream stock changes. But this is not needed. We only need downstream stock changes.

We also do not need live updates. A stock synch from parent to child every 24 hours would work fine.

Then use export run from cron and an import run from cron. Trouble is the friggin import/export doesn't really have a console mode. So getting the file data output to a specific location for export and imported from a specific location could be challenging.

Just curious, if upstream reporting isn't required, how do you know when one of the children sell all your products?

Just curious, if upstream reporting isn't required, how do you know when one of the children sell all your products?

Because the sale from children results in invoices in our ERP system, which we will connect to the parent.

And your ERP can't connect to the children? So you have one master, one psuedo master (the parent cs-cart) and a bunch of disconnected slaves (children). But the slaves can report sales to the real master who then syncs up with the parent?