0

As per heading, I have always wondered why both a configurable and simple are recorded when an order for a simple product is made?

Magento 1.9 example:

I can see that when an order is made, the simple product doesn't really contain much information except a reference to the parent product. The configurable product holds most of the relevant information such as the price, configurable options for the particular simple product in the 'product_options' field, etc.

However, if I update the simple product with price, options, etc, and delete the configurable product, it still displays exactly the same way on the Magento admin order screen.

'product_options' field sample:

a:6:{s:15:"info_buyRequest";a:3:{s:3:"qty";i:1;s:15:"super_attribute";a:3:{i:81;s:2:"12";i:92;s:2:"64";i:132;s:1:"6";}s:7:"options";a:0:{}}s:15:"attributes_info";a:3:{i:0;a:2:{s:5:"label";s:12:"Manufacturer";s:5:"value";s:1:"A";}i:1;a:2:{s:5:"label";s:5:"Color";s:5:"value";s:8:"Light T1";}i:2;a:2:{s:5:"label";s:4:"size";s:5:"value";s:1:"S";}}s:11:"simple_name";s:22:"Samsung Galaxy S6 Note";s:10:"simple_sku";s:29:"Samsung-Galaxy-S6";s:20:"product_calculations";i:1;s:13:"shipment_type";i:0;}

The reason I ask is that I am importing orders into Magento - I am only importing simple products (if they're children of configurable products) and it appears that I can achieve the same behavior as what is currently default.

Is there anything I am missing by doing this? Will it impact any functionality? Doesn't seem to have any impact on invoices, shipments, front-end-display, etc. What is the point of having two lines for the same product?

Thank you.

EDIT: As per answer/comment. I reduce inventory like so:

$stockItemsFullSave = Mage::getModel('cataloginventory/stock')->registerProductsSale($stockItems);

If order fails, I don't add stockItemsFullSave to a transaction I use to save order/invoice and inventory, and roll back using standard functionality:

Mage::getModel('cataloginventory/stock')->revertProductsSale($stockItems);

I would assume this would decrement stock correctly and control all things related to inventory?

0

I believe the reason for this is inventory. With a configurable product you can specify that for sub-products the specific amount in inventory for each is different. For example, if I sold T-shirts, and my options for color were black, gray, and blue I could say I have 1000 black, 800 grey and 250 blue in stock. As orders come in, those numbers can decrease and the blue can be out of stock while the black and grey will be in stock. The front end will reflect this status as well.

Just using custom options and simple products limits this possibility. The inventory you set for the simple product would be for any combination of options. So if you run out of grey shirts you can’t automatically place them on backorder.

Will you mess anything up, probably not. Will you lose functionality, some. Will everything still work: yes.

Hope that helps.

Edit: The configurable product is there solely as a container to the simple products. When the underlying simple products are created from the configurable product edit screen itself, then those products have the minimal pieces necessary and let the parent product (the configurable) deal with all the other attributes except those for which that simple product is being configured (e.g. color: blue, size: XL). So if the product catalog was generated in this fashion (create the configurable product first, then create simple products from that configurable one) your scenario makes sense.

Functionally they're the same. The reason the configurable product is there is to allow shopping cart and catalog price rules to be simpler, as well as customer segmentation and other things that could be simplified to a single SKU. So either way will work; it's just that without the "super attributes" it's more like the customer found the exact color and size shirt they wanted within the catalog instead of customizing a "shirt" product with a color and size.

Another reason the configurable product is there is within the shopping cart, the customer can still go back and edit the item. Without the configurable product line, the customer would add "Funny T-shirt" to cart, but then go back and edit "Funny T-Shirt - Blue Adult XL" which has no selectable size(s) or color(s). Since all quote items are converted to sales order items the configurable product just comes over. As far as the sales order is concerned, there is not much of a difference. It's really in the quote (cart) and customer UI that's different.

  • Hi Brett, thanks for that - interesting, but I am taking inventory directly from the simple product using the standard way that Magento does it. I would have thought that the stock would be set per product and the configurable is just a container for grouping these (the inventory data will always be taken from simple prod) – BAF Oct 25 '17 at 3:20
  • Brett, I have updated the post to provide more info about how i'm handling inventory (sorry if I am misunderstanding what you are saying - just not 100% clear on how adding a configurable product to order tale will impact this) – BAF Oct 25 '17 at 3:28
  • See updated answer. – Brett Oct 25 '17 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.