1

If I wish to get functionality of different SKUs per store for a particular product, what do I have to do?

Say that I have different stores, like men's shoes.com and women's shoes.com, in which the same product (CN Clogs Beach/Garden Clog) is present in each store.

Now, I want to define the SKU in the men's store as mens_shoes_cnclog, and in the women's store as womens_shoes_cnclog. Here I'm handling one website, and two stores. So, how can I define different skus based on store name?

I have tried to override the saveAction() method of Catalog_ProductController, in which I can easily get the website code, but I want store-wise SKUs so that, in search engines, they will be considered two different products.

TIA

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104
Kamal Joshi
  • 1,298
  • 3
  • 25
  • 45
  • I don't think its possible. The very definition of SKU (stock keeping unit) is a code that uniquely identifies a product. What I would do is have such a product's SKU be 'shoes_cnclog' and display it in both stores. So, if it is bought from any one of the stores, my stocks are being properly reflected. – Ozair Kafray Mar 15 '11 at 07:31
  • I am aware with SKU, i want to define it as store_code + autoincrement then what i have to do? – Kamal Joshi Mar 15 '11 at 07:57
  • Why its not possible? I am not saying that i want to remove sku. I am defining it uniquely. – Kamal Joshi Mar 15 '11 at 08:20
  • 2
    Then u have to create two different products with same info but diff SKU and assign them under different root category which will be displayed in any one of the stores.. I dont think there is other way because these properties are related to one another and stored in the same way in the db. – Vijay Mar 15 '11 at 08:21
  • I dont want to create double products, instead i want to create double skus used in two different stores. – Kamal Joshi Mar 15 '11 at 08:25
  • @All - this is possible, I will post a solution shortly. JD – Jonathan Day Mar 15 '11 at 09:25
  • thank you,jonathan day! I got -1 vote for this question, i dont think so its not possible. – Kamal Joshi Mar 15 '11 at 09:37

1 Answers1

0

If this is the same backend product, one sku should be used to track it. That said, I understand that you may have some conflicting requirements as such. The only way I can think of to accomplish this without completely ruining the backend of the system is to create a field for a "frontend sku", which would be used to display to customers on a per-store basis. You would need to replace references in the frontend with the per-store sku, and would still see the real sku in the backend.

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104
  • Yeah, i want the same product in backend, Good idea! – Kamal Joshi Mar 15 '11 at 13:13
  • If i'll create women's shoes sku and men's shoes sku and add it to general section in every attribute set and then i'll display that sku per perticular store, what you say about this idea? – Kamal Joshi Mar 15 '11 at 13:17
  • Create a field called alternate-sku or something of that sort, and use Magento's per-store attribute editing to change it to whatever value you want for each store. Then, modify your template to display that sku accordingly. – Joe Mastey Mar 16 '11 at 13:27
  • thank you, i got your point! You mean to say create attribute and then change its value per store(by using store switcher) but right now i have started working on this issue. I have created a custom module in which i m inserting product_id,store_id and value(store code + auto increment).Displaying on front view based on store. – Kamal Joshi Mar 16 '11 at 13:43
  • You will probably not need to edit too many files other than templates to accomplish this. What are you using the module for? – Joe Mastey Mar 16 '11 at 20:41
  • Right now i m overriding catalog product controller to provide auto incremented sku if admin doesn't enter any sku and also overriding helper output so it display desired sku based on created table.If admin creates any store for that overriding system store controller. – Kamal Joshi Mar 17 '11 at 05:18
  • I have created a module in which it displays desired sku from user defined table in front side,Now if i wish to display that sku in admin also then what i have to do? For displaying on front side, as i said i have override productAttribute() method of output.php(of helper),so is there any specific method that display sku in adminpanel? – Kamal Joshi Mar 17 '11 at 07:21
  • Why i am asking this because of when client has ordered any particular product seeing front end sku,after giving order when client receives mail including original sku(used in back end) so that might be conflict client's mind that i haven't ordered this product.And also i want to display sku used in front end in admin panel so that admin can't get confused. – Kamal Joshi Mar 17 '11 at 07:27
  • @Joseph Mastey i have successfully created module,If admin lefts sku blank then new sku will be generated but my problem is i have around 1500 products.And for all product if i make sku blank and save product then it would be time consuming.So I thought i need to import whole products using dataflow but i m getting message like 'skip row,sku is not defined.'. I can't import products. I know using getIdBySku() product is being loaded.What i have to do now, any idea? TIA – Kamal Joshi Mar 25 '11 at 09:46