8
votes
Accepted
How to get associated(child) product id, name and other details using configurable product id in Magento 2
Will get the answer by this code itself afeter di:compile
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Framework\Registry')->...
7
votes
How to get associated(child) product id, name and other details using configurable product id in Magento 2
Firstly, never use objectManager like you did in your phtml or in any
block class. You should always use automatic constructor's dependency
injection system.
I suggest you to utilise Magento 2's ...
6
votes
Accepted
Get value of super attribute of configurable products in magento 1.9.3.1
Try below code
$_product = $this->getProduct();// Or you can load your product here
$_attributes = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
print_r($...
4
votes
Accepted
How to get selected simple product Id on checkout_card_add_after observer in magento2?
Add below code in your observer file
$item = $observer->getQuoteItem();
$product = $item->getProduct();
$typeId = $product->getTypeId();
if ($typeId == \Magento\ConfigurableProduct\Model\...
4
votes
How can I get custom attribute value of an associated product in a grouped product?
getAssociatedProducts does not get you full product objects but product links as a custom collection with standard attributes
Two options:
You add the attributes you want to the getAssociatedProducts ...
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
Magento2 which table to store data like configurable product
Main table for products in magento:
catalog_product_entity
Above table is an act as main table, for that child tables are staring
with “catalog_product_entity_” prefix.
- ...
2
votes
Magento2 which table to store data like configurable product
1) in Magento 2 "catalog_product_relation", "catalog_product_super_link", "catalog_product_super_attribute_label" and catalog_product_super_attribute_pricing will store the information about the ...
2
votes
Magento2 which table to store data like configurable product
Check this table which is using for Configurable product
catalog_product_super_attribute
catalog_product_super_attribute_label
catalog_product_super_link: it contains associated simple product of ...
2
votes
Magento 2 : How to get selected simple product Id on checkout_card_add_after observer?
I will be speaking for Magento 2.2.6
There is an event dispatch like this
$this->_eventManager->dispatch(
'checkout_cart_product_add_after',
['quote_item' => $result, 'product' =>...
1
vote
How to add group product into the cart individually?
As far I Understood by looking at your shared link, you have set the default quantity of the simple products to 1 of Group product. In that case when user click on Add to cart button it will ...
1
vote
How to change price for all products in magento
Export the csv and use magmi tool to update price in bulk. Below should be the format of csv:
store, sku, price
abc, 1001, 5.00
bab, 1001, 7.00
then run re-indexing.
1
vote
Magento 1: Configurable products unable to find simple products in Associated
Check if those simple products has the same attribute set as configurable product. Also make sure all attributes marked in the configurable products as "configurable" are filled in simple product.
1
vote
Display all associated simple products, even if all of them are out of stock
First copy app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php
To app/code/local/Mage/Catalog/Block/Product/View/Type/Configurable.php
And Add this
Mage::helper('catalog/product')-...
1
vote
Accepted
Magento 1: Find products who have a certain associated product
Lets assume product Z has ID 12 this should work to get an array of parent product IDs:
$productId = 12;
$parentIds = Mage::getModel('catalog/product_type_configurable')
->getParentIdsByChild($...
1
vote
Sharing Simple Products between Configurable Products
This is fine as long as the configurable options on the simple products are unique per configurable product.
You can add the same simple to as many configurable products as you like - but you can't ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
associate-products × 73configurable-product × 47
magento-1.9 × 19
magento2 × 16
grouped-products × 11
simple-product × 8
product × 7
price × 7
attributes × 6
magento-1.8 × 5
magento2.3 × 3
category × 3
event-observer × 3
product-attribute × 3
product-images × 3
custom-options × 3
catalog × 3
magento-1.7 × 2
database × 2
admin × 2
magento-1 × 2
collection × 2
grid × 2
import × 2
addtocart × 2