Multiple carts on one site

cowtancowtan Member
in Help edited February 2011
Hi - I'm working on a site that's going to need 2 shopping carts - for different languages and currencies. Searching through previous discussions on this topic it looks like it is possible with a bit of tweaking to the .js provided the pages can be either on different sub-domains or with different paths.
I *think* that one of these should be possible for the site I'm working on. Is there anywhere that documents what the javascript tweak is?

regards,
Gordon
Comments
  • lancelance Member, Community Support Member
    Gordon,

    First, you might want to consider voting for these feature here:

    http://requests.foxycart.com/forums/4162-general-requests/suggestions/38758-multi-lingual-sites-template-sets-
    http://requests.foxycart.com/forums/4162-general-requests/suggestions/223883-support-for-multiple-currencies

    Next, there are a few options. One is to simply create two stores and set each with the language you prefer. The active store would be determined by a cookie that you set or even a subdomain. If you're using a CMS like ExpressionEngine that allows you to manage multiple sites in a single back-end, you'll be able to pull this off pretty easily without having to duplicate tons of content.

    Another option that would use a bit more JavaScript (perhaps this is the option you're talking about?) would be to build your templates with both languages, and then show the appropriate text based on a user's selection. So, you might have a template that looks like this:
    <span class="english_welcome">Welcome!</span>
    <span class="german_welcome">Wilkommen!</span>
    
    From there, you would display one and hide the other based on the language. This only gets you around the language issue, though, and not the currency issue. If you need multiple currencies, my understanding is that the best way to approximate this is with the first option - multiple stores.

    Does that help?

    Lance
  • brettbrett FoxyCart Team
    The active store would be determined by a cookie that you set or even a subdomain.
    Just to clarify, you'd need to segregate the two stores by either subdomain or URL path (or both, if you wanted), since that's how cookies can be segregated. Check the sitedomain and cookiepath settings here:
    http://wiki.foxycart.com/v/0.7.0/advanced/javascript
  • Thanks guys.
  • edited January 2013
    Hey guys,

    I was trying to incorporate two stores
    1. store1.foxycart.com
    2. store2.foxycart.com
    on a single site www.example.com (and not separate domain or sub domain)..

    To elaborate, I have a page webpage with few products. When I click add to cart on certain products it adds to store1 or store2. And also there are two different hyperlinks in the header to view the respective carts like
    <a href ="https://store1.foxycart.com/cart">store1 view cart </a> 
    <a href ="https://store2.foxycart.com/cart">store2 view cart </a>
    

    Are there any specific bugs or problems associated with FoxyCart v1.0 ?
    Does fcsid create any conflicts between two different stores? Do I have to maintain any cookies to save fcsid?
    Do you suggest me anything specific I need to keep in mind while implementing such a scenario?

    Thanks for your help.

    Regards,
    Vikram..
  • fc_adamfc_adam FoxyCart Team
    @Vikram

    The issue you'll run into is that the session cookie will be conflicting between the two stores. So for example, if someone was adding products to both carts, the session cookie will only be set for one of the stores, not both. So you will most probably run into issues with customers having problems adding to cart.

    We definitely suggest running stores on different domains, either by subdomain or folder segregation. See this page for more details: http://wiki.foxycart.com/static/redirect/javascript
  • brettbrett FoxyCart Team
    @Vikram, I'm curious about your use case. Having two separate "view cart" links isn't something I've seen before, and though I can imagine situations that might call for it, I'd love to know your situation.
  • @brett - Thanks for the interest :) . Well I will try to explain my situation in detail.
    My client has multiple foxycart stores depending on the location (United States and Canada) where the customer and the type of product being purchased. The reason they wanted different stores was
    - they had different payment gateway for those locations
    - they wanted to abstract the orders so that agents processing orders at one store do not have access to orders from other store.

    So the easiest solution was to have two different stores but maintain similar user experience so that user does not actually find the difference in two stores (unless looked at the URL). The products are placed on different pages like
    www.example.com/US/productlist.aspx - For United States
    www.example.com/CA/productlist.aspx - For Canada

    There is one scenario when the user can buy two product from the products list each belonging to the different stores.
    In this case there are 2 view cart buttons showing up on the page for each store. Currently, we have been using foxycart v0.7.2 and showing up these links using iframes so that fcsid does not create a problem. But now we are planning to upgrade to foxycart v1.0, so I thought there might be a better solution to deal with this situation.

    I hope I was able to explain the situation.

    Vikram..
  • brettbrett FoxyCart Team
    @Vikram, that definitely is the best approach for US/CA stores, but the trick is that one scenario. If that's the case though… they still have to do two checkouts anyway, right?

    Nice workaround on the iframes. I should have expected as much from you guys at Quadland :)

    v1.0 didn't really change the underlying sessions or javascript functionality from 0.7.2 though, so there probably wouldn't be new options there.
Sign In or Register to comment.