How add simple product SKU to grouped products table? Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How to create an add to cart button for simples within a grouped product AND still get parent image in cart in no image is specified for the simpleTwo grouped products are listed on other grouped product as simple productsMagento 2, Grouped product imagesEntering simple and grouped productsGrouped Products: Filter based on simple productsHide on grouped product tableHow to make grouped products table show in its own row above the details tab and below the images/short description?Remove SKU only for grouped productsHow to redirect simple products to the parent grouped product?Adding a grouped product to cart via the rest api
Can an alien society believe that their star system is the universe?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
How does the particle を relate to the verb 行く in the structure「A を + B に行く」?
English words in a non-english sci-fi novel
Can I cast Passwall to drop an enemy into a 20-foot pit?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
Can any chord be converted to its roman numeral equivalent?
How to call a function with default parameter through a pointer to function that is the return of another function?
How come Sam didn't become Lord of Horn Hill?
What is the role of the transistor and diode in a soft start circuit?
How do I keep my slimes from escaping their pens?
Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?
Using audio cues to encourage good posture
Why was the term "discrete" used in discrete logarithm?
List of Python versions
Why did the rest of the Eastern Bloc not invade Yugoslavia?
If a contract sometimes uses the wrong name, is it still valid?
What does this icon in iOS Stardew Valley mean?
Using et al. for a last / senior author rather than for a first author
How to tell that you are a giant?
What exactly is a "Meth" in Altered Carbon?
Should I use a zero-interest credit card for a large one-time purchase?
Why is my conclusion inconsistent with the van't Hoff equation?
A coin, having probability p of landing heads and probability of q=(1-p) of landing on heads.
How add simple product SKU to grouped products table?
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How to create an add to cart button for simples within a grouped product AND still get parent image in cart in no image is specified for the simpleTwo grouped products are listed on other grouped product as simple productsMagento 2, Grouped product imagesEntering simple and grouped productsGrouped Products: Filter based on simple productsHide on grouped product tableHow to make grouped products table show in its own row above the details tab and below the images/short description?Remove SKU only for grouped productsHow to redirect simple products to the parent grouped product?Adding a grouped product to cart via the rest api
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How do you add the simple product sku to the grouped product table?
Basically, I want to remove the grouped product sku and add the sku's to each simple product that are listed in the grouped product table. See the image below and the red drawing for a visual of what I am trying to accomplish:
magento2 grouped-products
add a comment |
How do you add the simple product sku to the grouped product table?
Basically, I want to remove the grouped product sku and add the sku's to each simple product that are listed in the grouped product table. See the image below and the red drawing for a visual of what I am trying to accomplish:
magento2 grouped-products
add a comment |
How do you add the simple product sku to the grouped product table?
Basically, I want to remove the grouped product sku and add the sku's to each simple product that are listed in the grouped product table. See the image below and the red drawing for a visual of what I am trying to accomplish:
magento2 grouped-products
How do you add the simple product sku to the grouped product table?
Basically, I want to remove the grouped product sku and add the sku's to each simple product that are listed in the grouped product table. See the image below and the red drawing for a visual of what I am trying to accomplish:
magento2 grouped-products
magento2 grouped-products
asked Aug 10 '18 at 14:23
Will CousinWill Cousin
698
698
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Copy the below file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
To:
app/design/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
And add the below code:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data template
*
* @var $block MagentoCatalogBlockProductViewBaseImage
* @var $block MagentoGroupedProductBlockProductViewTypeGrouped
*/
?>
<?php $block->setPreconfiguredValue(); ?>
<?php $_product = $block->getProduct(); ?>
<?php $_associatedProducts = $block->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<div class="table-wrapper grouped">
<table class="table data grouped" id="super-product-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Grouped product items') ?></caption>
<thead>
<tr>
<th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
<th class="col sku" scope="col"><?= /* @escapeNotVerified */ __('Sku') ?></th>
<?php if ($_product->isSaleable()): ?>
<th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
<?php endif; ?>
</tr>
</thead>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($block->getCanShowProductPrice($_product)): ?>
<?php if ($block->getCanShowProductPrice($_item)): ?>
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Sku')) ?>" class="col sku">
<?= $block->escapeHtml($_item->getSku()) ?>
</td>
<?php if ($_product->isSaleable()): ?>
<td data-th="<?= $block->escapeHtml(__('Qty')) ?>" class="col qty">
<?php if ($_item->isSaleable()) : ?>
<div class="control qty">
<input type="number"
name="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
data-selector="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
value="<?= /* @escapeNotVerified */ $_item->getQty() * 1 ?>"
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
class="input-text qty"
data-validate="'validate-grouped-qty':'#super-product-table'"
data-errors-message-box="#validation-message-box"/>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php if ($block->getCanShowProductPrice($_product)
&& $block->getCanShowProductPrice($_item)
&& trim($block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
))): ?>
<tr class="row-tier-price">
<td colspan="2">
<?= $block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
) ?>
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
<?php else: ?>
<tbody>
<tr>
<td class="unavailable"
colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>">
<?= /* @escapeNotVerified */ __('No options of this product are available.') ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</div>
<div id="validation-message-box"></div>
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
add a comment |
What about adding the simple product description or short description to each line as well as the SKU. $_item->getDescription or $_item->getShortDescription don't appear to exist/work. Additionally is there a way to see which methods are available for $_item and possibly add getDescription to the class?
New contributor
you can post new question for this
– magefms
2 mins ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f237989%2fhow-add-simple-product-sku-to-grouped-products-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Copy the below file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
To:
app/design/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
And add the below code:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data template
*
* @var $block MagentoCatalogBlockProductViewBaseImage
* @var $block MagentoGroupedProductBlockProductViewTypeGrouped
*/
?>
<?php $block->setPreconfiguredValue(); ?>
<?php $_product = $block->getProduct(); ?>
<?php $_associatedProducts = $block->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<div class="table-wrapper grouped">
<table class="table data grouped" id="super-product-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Grouped product items') ?></caption>
<thead>
<tr>
<th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
<th class="col sku" scope="col"><?= /* @escapeNotVerified */ __('Sku') ?></th>
<?php if ($_product->isSaleable()): ?>
<th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
<?php endif; ?>
</tr>
</thead>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($block->getCanShowProductPrice($_product)): ?>
<?php if ($block->getCanShowProductPrice($_item)): ?>
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Sku')) ?>" class="col sku">
<?= $block->escapeHtml($_item->getSku()) ?>
</td>
<?php if ($_product->isSaleable()): ?>
<td data-th="<?= $block->escapeHtml(__('Qty')) ?>" class="col qty">
<?php if ($_item->isSaleable()) : ?>
<div class="control qty">
<input type="number"
name="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
data-selector="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
value="<?= /* @escapeNotVerified */ $_item->getQty() * 1 ?>"
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
class="input-text qty"
data-validate="'validate-grouped-qty':'#super-product-table'"
data-errors-message-box="#validation-message-box"/>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php if ($block->getCanShowProductPrice($_product)
&& $block->getCanShowProductPrice($_item)
&& trim($block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
))): ?>
<tr class="row-tier-price">
<td colspan="2">
<?= $block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
) ?>
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
<?php else: ?>
<tbody>
<tr>
<td class="unavailable"
colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>">
<?= /* @escapeNotVerified */ __('No options of this product are available.') ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</div>
<div id="validation-message-box"></div>
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
add a comment |
Copy the below file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
To:
app/design/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
And add the below code:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data template
*
* @var $block MagentoCatalogBlockProductViewBaseImage
* @var $block MagentoGroupedProductBlockProductViewTypeGrouped
*/
?>
<?php $block->setPreconfiguredValue(); ?>
<?php $_product = $block->getProduct(); ?>
<?php $_associatedProducts = $block->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<div class="table-wrapper grouped">
<table class="table data grouped" id="super-product-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Grouped product items') ?></caption>
<thead>
<tr>
<th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
<th class="col sku" scope="col"><?= /* @escapeNotVerified */ __('Sku') ?></th>
<?php if ($_product->isSaleable()): ?>
<th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
<?php endif; ?>
</tr>
</thead>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($block->getCanShowProductPrice($_product)): ?>
<?php if ($block->getCanShowProductPrice($_item)): ?>
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Sku')) ?>" class="col sku">
<?= $block->escapeHtml($_item->getSku()) ?>
</td>
<?php if ($_product->isSaleable()): ?>
<td data-th="<?= $block->escapeHtml(__('Qty')) ?>" class="col qty">
<?php if ($_item->isSaleable()) : ?>
<div class="control qty">
<input type="number"
name="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
data-selector="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
value="<?= /* @escapeNotVerified */ $_item->getQty() * 1 ?>"
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
class="input-text qty"
data-validate="'validate-grouped-qty':'#super-product-table'"
data-errors-message-box="#validation-message-box"/>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php if ($block->getCanShowProductPrice($_product)
&& $block->getCanShowProductPrice($_item)
&& trim($block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
))): ?>
<tr class="row-tier-price">
<td colspan="2">
<?= $block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
) ?>
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
<?php else: ?>
<tbody>
<tr>
<td class="unavailable"
colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>">
<?= /* @escapeNotVerified */ __('No options of this product are available.') ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</div>
<div id="validation-message-box"></div>
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
add a comment |
Copy the below file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
To:
app/design/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
And add the below code:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data template
*
* @var $block MagentoCatalogBlockProductViewBaseImage
* @var $block MagentoGroupedProductBlockProductViewTypeGrouped
*/
?>
<?php $block->setPreconfiguredValue(); ?>
<?php $_product = $block->getProduct(); ?>
<?php $_associatedProducts = $block->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<div class="table-wrapper grouped">
<table class="table data grouped" id="super-product-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Grouped product items') ?></caption>
<thead>
<tr>
<th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
<th class="col sku" scope="col"><?= /* @escapeNotVerified */ __('Sku') ?></th>
<?php if ($_product->isSaleable()): ?>
<th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
<?php endif; ?>
</tr>
</thead>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($block->getCanShowProductPrice($_product)): ?>
<?php if ($block->getCanShowProductPrice($_item)): ?>
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Sku')) ?>" class="col sku">
<?= $block->escapeHtml($_item->getSku()) ?>
</td>
<?php if ($_product->isSaleable()): ?>
<td data-th="<?= $block->escapeHtml(__('Qty')) ?>" class="col qty">
<?php if ($_item->isSaleable()) : ?>
<div class="control qty">
<input type="number"
name="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
data-selector="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
value="<?= /* @escapeNotVerified */ $_item->getQty() * 1 ?>"
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
class="input-text qty"
data-validate="'validate-grouped-qty':'#super-product-table'"
data-errors-message-box="#validation-message-box"/>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php if ($block->getCanShowProductPrice($_product)
&& $block->getCanShowProductPrice($_item)
&& trim($block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
))): ?>
<tr class="row-tier-price">
<td colspan="2">
<?= $block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
) ?>
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
<?php else: ?>
<tbody>
<tr>
<td class="unavailable"
colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>">
<?= /* @escapeNotVerified */ __('No options of this product are available.') ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</div>
<div id="validation-message-box"></div>
Copy the below file:
vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml
To:
app/design/Vendor/Theme/Magento_GroupedProduct/templates/product/view/type/grouped.phtml
And add the below code:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Grouped product data template
*
* @var $block MagentoCatalogBlockProductViewBaseImage
* @var $block MagentoGroupedProductBlockProductViewTypeGrouped
*/
?>
<?php $block->setPreconfiguredValue(); ?>
<?php $_product = $block->getProduct(); ?>
<?php $_associatedProducts = $block->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<div class="table-wrapper grouped">
<table class="table data grouped" id="super-product-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Grouped product items') ?></caption>
<thead>
<tr>
<th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
<th class="col sku" scope="col"><?= /* @escapeNotVerified */ __('Sku') ?></th>
<?php if ($_product->isSaleable()): ?>
<th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
<?php endif; ?>
</tr>
</thead>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<tbody>
<tr>
<td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
<strong class="product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($block->getCanShowProductPrice($_product)): ?>
<?php if ($block->getCanShowProductPrice($_item)): ?>
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Sku')) ?>" class="col sku">
<?= $block->escapeHtml($_item->getSku()) ?>
</td>
<?php if ($_product->isSaleable()): ?>
<td data-th="<?= $block->escapeHtml(__('Qty')) ?>" class="col qty">
<?php if ($_item->isSaleable()) : ?>
<div class="control qty">
<input type="number"
name="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
data-selector="super_group[<?= /* @escapeNotVerified */ $_item->getId() ?>]"
value="<?= /* @escapeNotVerified */ $_item->getQty() * 1 ?>"
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
class="input-text qty"
data-validate="'validate-grouped-qty':'#super-product-table'"
data-errors-message-box="#validation-message-box"/>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php if ($block->getCanShowProductPrice($_product)
&& $block->getCanShowProductPrice($_item)
&& trim($block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
))): ?>
<tr class="row-tier-price">
<td colspan="2">
<?= $block->getProductPriceHtml(
$_item,
MagentoCatalogPricingPriceTierPrice::PRICE_CODE
) ?>
</td>
</tr>
<?php endif; ?>
</tbody>
<?php endforeach; ?>
<?php else: ?>
<tbody>
<tr>
<td class="unavailable"
colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>">
<?= /* @escapeNotVerified */ __('No options of this product are available.') ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</div>
<div id="validation-message-box"></div>
answered Aug 10 '18 at 14:35
Sukumar GoraiSukumar Gorai
6,9803729
6,9803729
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
add a comment |
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
This worked for the grouped products table. The only other thing is how to remove the sku under the product title when it is a grouped product only (that sku is not used so its not useful to display it).
– Will Cousin
Aug 10 '18 at 15:04
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
Do you want to remove that sku only for group products? Can you add one new question for that?
– Sukumar Gorai
Aug 10 '18 at 15:05
add a comment |
What about adding the simple product description or short description to each line as well as the SKU. $_item->getDescription or $_item->getShortDescription don't appear to exist/work. Additionally is there a way to see which methods are available for $_item and possibly add getDescription to the class?
New contributor
you can post new question for this
– magefms
2 mins ago
add a comment |
What about adding the simple product description or short description to each line as well as the SKU. $_item->getDescription or $_item->getShortDescription don't appear to exist/work. Additionally is there a way to see which methods are available for $_item and possibly add getDescription to the class?
New contributor
you can post new question for this
– magefms
2 mins ago
add a comment |
What about adding the simple product description or short description to each line as well as the SKU. $_item->getDescription or $_item->getShortDescription don't appear to exist/work. Additionally is there a way to see which methods are available for $_item and possibly add getDescription to the class?
New contributor
What about adding the simple product description or short description to each line as well as the SKU. $_item->getDescription or $_item->getShortDescription don't appear to exist/work. Additionally is there a way to see which methods are available for $_item and possibly add getDescription to the class?
New contributor
New contributor
answered 4 mins ago
mag2Lplatesmag2Lplates
1
1
New contributor
New contributor
you can post new question for this
– magefms
2 mins ago
add a comment |
you can post new question for this
– magefms
2 mins ago
you can post new question for this
– magefms
2 mins ago
you can post new question for this
– magefms
2 mins ago
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f237989%2fhow-add-simple-product-sku-to-grouped-products-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown