Multiple Stores point to one

msteinbmsteinb Member
in General edited February 2010
Hi,

I have set up several stores in foxycart. The problem is that any form I make, it always ends up at the checkout page for one of the stores. Meaning whether the form/header files say first_store.foxycart.com or second_store.foxycart.com the checkout page always says first_store.foxycart.com. Any ideas?
Comments
  • lukeluke FoxyCart Team
    Hello msteinb.

    Can you send us some example links so we can take a look? The "action" of your form does need to be customized based on the store you want to send the data to. For example, if your form says to POST to
    first_store.foxycart.com/cart then that's where it will always go, regardless of the include files. You'll have to customize the form per store (along with including the correct header include files).
  • Okay, It's working now. I think it was a browser issue. I had deleted the cache and cookies and was still experiencing the problem so I figured it was a coding error or something. I just tried deleting all of the stored data (I'm using FF 3.5.7) and now it's working. If the problem pops up again I'll post again with links. Thank You for your quick response though.
  • brettbrett FoxyCart Team
    edited February 2010
    @msteinb: This can actually be a very real problem if your multiple stores are at subdomains of the same domain. So if you have storea.example.com and storeb.example.com, whichever sets a cookie first will "win".

    There's a pretty easy fix for this if you need it, but the default behavior of the foxycart_includes.js is to set the cookie at .example.com, and not at the subdomain. Let us know if you need the fix.

    Otherwise, this tends to occur during development because of sharing domains while testing and such.
  • Thanks for the info. I haven't been using subdomains for different stores, but different pages: example.com/storea which I want associated with storea.foxycart.com and example.com/storeb associated with storeb.foxycart.com. Could this also produce that problem?
  • brettbrett FoxyCart Team
    If it's the same domain then yes, same issue. FoxyCart's setting cookies to apply to / and .example.com, so it'll apply to anything and everything at example.com. If you want to limit that you can, but if it's just for testing then I'd just make sure to clear the cookies.

    But it does sound like you want multiple subdomains, so you'd have to take a look at the "third level domains" item here:
    http://wiki.foxycart.com/docs:known_issues:0.5.1
    If you need help adapting that to v060 let us know, but it should be pretty straightforward (hopefully).
Sign In or Register to comment.