The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

SKU Product Number based on Country??

ekerrekerr Member
in Help edited June 2011
Has anyone ever heard of this before?

I currently have "code" values on the product options creating SKU numbers based on the options they choose with their product (e.g. color, size, etc) so the client knows the identifying SKU for each product that is purchased. Now the client has requested that the SKU number be further altered if the purchased product is going to be sent to Canada (they have different SKUs for Canada).

Is something like this doable or has it been done before? I tried to find if anyone had a similar issue throughout the forum but did not have any luck.

Thank you in advance for any help
  • lancelance Member, Community Support Member
    @ekerr -

    This would require changing the code while in Checkout. Technically, this is possible, but it would require some advanced JavaScript to manage it. I actually just finished up a project with a client where we are modifying the cart on the checkout page, so I can say from experience that it can be done, but that it will take a fair amount of time and LOTS of TESTING to make sure things are working as they should.

    The general idea is that, when Canada is selected, you would need to loop through the contents of the cart to get a new add to cart string with the new SKU(s), drop the contents of the cart, then silently add everything back. If you are displaying the SKUs on the checkout page, you would also need to re-write the HTML using jQuery.

    How handy are you with JS and jQuery?

  • brettbrett FoxyCart Team
    Or you could select Canada on the add-to-cart link or form and modify the code there. Lots easier, but not necessarily the best approach.
  • lancelance Member, Community Support Member
    Brett's suggestion is a good one if it will work. It is much easier, but I can foresee a few problems that might crop up with that solution. Admittedly, though, the set of issues it presents are easier to fix that changing the cart on checkout, but sometimes from a UX perspective solving the more difficult issue is worth it.

  • You can use country prefix(may be country code) in sku number to identify products country.
Sign In or Register to comment.