7
votes
Accepted
Add additional select attributes to grouped product's child collection
For adding additional attributes for child in grouped product, add code like this to a Plugin/Model/Product/Type/GroupedPlugin.php file in your extension (this example assumes your extension is ...
6
votes
Show Grouped product price in catalog view as sum of associated products in grouped product
I just had the same requirement. For a quick solution copy theme file
Magento_GroupedProduct\templates\product\price\final_price.phtml
to your custom theme and sum prices in template with
<?php
...
6
votes
Accepted
Remove SKU only for grouped products
Create catalog_product_view_type_grouped.xml under your module like below path:
app/code/Vendor/Module/view/frontend/layout/catalog_product_view_type_grouped.xml
OR
create under
app/design/...
5
votes
Get Grouped Products Associated Child Product Custom Attribute
[Not sure if it's the correct way]
Take a look at vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php
public function getAssociatedProducts($product)
{
...
->...
4
votes
Accepted
Grouped Products - is it possible to show out of stock status individually
File: template/catalog/product/view/type/grouped.phtml
<?php // If QTY is OUT OF STOCK then display it to user
$_product = Mage::getModel('catalog/product')->load($_item->...
4
votes
how to get min/max regular price for a grouped product in list.phtml?
I know this question has been asked while ago, but I'm gonna answer it anyway if it helps anyone.
So one thing you could try is following which would work in some instances,
$_product->...
4
votes
Magento-2 override template for Group product in my module
This is what I end up doing to override the vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml template from Magento_GroupedProduct module.
Created new ...
4
votes
Accepted
How to add group product into the cart individually?
Try below code. It should work.
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data ...
4
votes
Accepted
Get Grouped Products Associated Child Product Custom Attribute
Create di.xml file here in your custom module
app/code/Vendor/Module/etc/di.xml
Content for this file is..
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
3
votes
Magento products packs (assortiment) with size and stock control - like 3-pack or 6-pack
You could create the "6 pack" product as a bundle with one required dropdown option, call it "size". Add the S, M and L simple products as selections for this option with a default qty of 6 and "...
3
votes
Programmatically create an order of grouped and bundle product in Magento
Don't use Mage_Sales_Model_Quote::addProduct(), especially for complex products. Use Mage_Checkout_Model_Cart::addProduct() which is also used by the add to cart controller action and takes care for ...
3
votes
Accepted
Grouped products with no associated products - code not working
You missed the below filter in the product collection
->addAttributeToSelect('*')
The name attribute of the products doesn't come with the below line of code.
$products = Mage::getModel('...
3
votes
Accepted
How to redirect simple products to the parent grouped product?
Here is a workaround did. I created a text attribute and allowed it to be searchable on the front-end. Then I added the SKU's of the associated simple products to that attribute on the grouped product ...
3
votes
Accepted
Grouped product (simple product sorting on price) Magento 2
Override public function getAssociatedProducts($product) of this file:
vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php
in this function you have to remove setPositionOrder() ...
2
votes
Grouped quantity
Use bundled product instead of grouped product, and create it with dynamic pricing like this:
Option A: Type "Checkbox", Required
Selection: ProductA, Default Qty 100
Option B: Type "Checkbox", ...
2
votes
Handling grouped product attributes
Why not create an attribute that tells it what attributes to show?
I ended up creating a module that loads the value of two text attributes for grouped products that are attribute code strings. ...
2
votes
a bundle without options
If you want to offer this defined set with its own product page, bundle products are the perfect fit.
To address your problems:
When you create a bundle, you can choose to give it a fixed price ...
2
votes
Accepted
Magento "Reset Filter" in admin grid not working in "Bundle Items" and "Associated Products" tabs
The product types that are allowed in bundle products are defined via config XML.
By default this is:
<allowed_selection_types>
<simple/>
<virtual/>
</...
2
votes
how create a shopping cart rule buy 1 prod A and 1 prod B, receive free 1 prod c?
If I understand your question correct, your problem is in this part
SKU is one of AB0027, AB0049
Instead you should split the condition into two conditions, one for each SKU and change the total ...
2
votes
Number of Adults and Number of Children as quantity in configurable products
This would be something like a configurable product where the simple associated products are actually grouped products. This combination is not possible with Magento.
I would use a bundle product ...
2
votes
How to know if simple product is associated with a grouped product?
There is nothing out of the box that will do that. It is possible to create a custom page that can produce that information just like any other adminhtml grid. If its built properly you can sort ...
2
votes
Apply catalog rule to grouped product
If the product added to the cart is child of a grouped, we have to look for the category of the grouped and not of the simple.
For this, I have done the next:
Create one file
Vendor/Module/etc/di....
2
votes
How do I assign associated products to a grouped product programatically in Magento2?
I had the same problem trying to create related, upsell, cross-sell.
I ended using something this:
$q = $this->_objectManager->get('\Magento\Framework\App\ResourceConnection');
$q->...
2
votes
Accepted
Magento2 cannot override class Magento\GroupedProduct\Model\Product\Type\Grouped?
Modifying the file app/code/Best/CustomGrouped/etc/module.xml to load my custom module after the core module worked for me.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
How to get details of single products of a grouped product in observer
Try below code :
public function catalogProductTypePrepare($observer)
{
$quote = Mage::getSingleton('checkout/session')->getQuote();
$product = $observer->getEvent()->...
2
votes
Magento2 How to Check any simple product is a child of grouped product
Product relations in Magento is stored in catalog_product_relation table.
So you can check if the particular simple product has any data present in the table to check if it has any parent product.
...
2
votes
Accepted
Get custom product attribute by product-id in Grouped Product
I done with this code:
$my_attr = $this->getProduct()->getResource()->getAttributeRawValue($_item->getId(),'attribute_code',$_item->getId());
I added this code in app\design\frontend\Company\...
2
votes
M2- How to get thumbnails of associated products on a grouped product from image cache
Just overwrite the file in the custom theme app/design/frontend/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml and paste the code in your phtml file
<?php $block-&...
2
votes
Accepted
Magento 2 Plugin Not Extending Model - Finally Solved It
After many many days of banging my head on a wall, I've finally solved it.
I had two modules set up originally:
Mynamespace\Grouped\
Mynamespace\Plugingrouped
Nothing I did would make the plugin ...
2
votes
Accepted
Display thumbnail of child images in grouped product page
Copy the following file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
to:
app/design/frontend/Vendor/theme/Magento_GroupedProduct/templates/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
grouped-products × 281magento2 × 90
magento-1.9 × 51
configurable-product × 33
product × 27
bundled-product × 25
simple-product × 17
price × 15
addtocart × 14
custom-options × 13
magento-1.8 × 11
attributes × 11
cart × 11
associate-products × 11
product-images × 10
quantity × 9
magento2.3 × 8
magento-1.7 × 8
catalog × 8
magento-2.1 × 7
php × 7
magento-1 × 7
product-attribute × 7
products × 6
magento2.2 × 5