8

I want to add Configurable products inside Grouped product. Example like http://www.mitrelinen.com/products/savoy enter image description here.

Here all prodcuts (Duvet cover, fitted sheet etc) are configurable products under under one grouped product. So this thing is possible as it was already developed.

There is extension to add configurable products inside bundle product (https://www.wizkunde.nl/magento-2-configurable-bundle.html) but that doesnt meet our requirement.

Here is post where this thing explained by Magento Genius @marius : https://magento.stackexchange.com/a/6653/29175 and i am looking for this feature to build on.

Any guidance would be appreciated.

1

There are tones of ways to do that... but only if you want to follow the flow exactly same as on your example website.

The most important thing is that example you gave adds products as individual products. So the trick here - is to make user think that it is single product page, but in fact you need to group products and output them like they are one single item. But all these options - are 4 different products in Magento. And they are NOT inside bundle. It is quite "nice and easy" flow that does not brake Magento-way functionality :)

In order to do that - just group products, for example by some Custom Attribute field, by special SKU tempate (e.g. SKU-GROUP-1, SKU-GROUP-2, etc), set them as related or etc etc etc. Than on BE somewhere after product load - try to load these additional products and save inside "main" one. Than just style output like given example website did - so they seem to be one single product page.

That worked like a charm in my case and works pretty fast. Check it out: https://www.conranshop.co.uk/home-accessories/bedroom-linen/citrine-bed-linen-collection.html

EDIT:

M1 logic:

  1. Create new Product Attribute called "Linked SKUs" (linkedSKU) - text field (varchar).

  2. Add observer for frontend action: catalog_product_load_after. Inside this action check "linkedSKU" attribute value that will be "comma-separated-SKUs" e.g. "SKU1,SKU2,SKU3". Load each product by SKU and save inside main product object. E.g.

$productIDs = explode(',',$product->getLinkedSKU()); foreach($productIDs as $pid) $productsLoaded[] = Mage::getModel('cat/prod')->load($pid); $product->setLinkedSkuProducts($productsLoaded);

  1. On FE on product view phtml - if there is anything inside $product->getLinkedSkuProducts() and than just output each product as tyled block.

So in admin you can set for "Main Product" attribute with list of SKUs that will be loaded under this main object.

  • Seems nice.Please explain more about : Than on BE somewhere after product load - try to load these additional products and save inside "main" one. – Jai Jul 14 '17 at 1:35
  • add observer for frontend action: catalog_product_load_after. inside this action load for example special attribute value that will be "comma-separated-SKUs" e.g. "SKU1,SKU2,SKU3". Load each product by SKU and save inside main product object. So in admin you can set for "Main Product" attribute with list of SKUs that will be loaded under this main object. Use your imagination further :) – StasGrin Jul 14 '17 at 8:35
  • I am stuck on this. Can you pls let me know steps of how you did it? I am doing it in M2. Thanks – Jai Jul 15 '17 at 9:33
  • Soz, man. I did that on M1... 😑 – StasGrin Jul 17 '17 at 0:04
  • I know and you can add that in your answer. I just need idea so that I can do same in M2. – Jai Jul 17 '17 at 3:46

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.