For those of you wondering to output the attribute sku in Admin -> Products with attributes stock I first added another column to the table products_with_attributes_stock called attributes_sku
then to display this info I added or changed the following code in admin/products_with_attributes_stock.php
Changed
PHP Code:
echo '<th class="stockAttributesHeadingStockId">'.PWA_STOCK_ID.'</th><th class="stockAttributesHeadingVariant">'.PWA_VARIANT.'</th><th class="stockAttributesHeadingQuantity">'.PWA_QUANTITY_IN_STOCK.'</th><th class="stockAttributesHeadingEdit">'.PWA_EDIT.'</th><th class="stockAttributesHeadingDelete">'.PWA_DELETE.'</th>';
To
PHP Code:
echo '<th class="stockAttributesHeadingStockId">'.PWA_STOCK_ID.'</th><th class="stockAttributesHeadingVariant">'.PWA_VARIANT.'</th><th class="stockAttributesHeadingSku">'.PWA_ATTRIBUTES_SKU.'</th><th class="stockAttributesHeadingQuantity">'.PWA_QUANTITY_IN_STOCK.'</th><th class="stockAttributesHeadingEdit">'.PWA_EDIT.'</th><th class="stockAttributesHeadingDelete">'.PWA_DELETE.'</th>';
and added
PHP Code:
echo '<td class="stockAttributesCellSku">'."\n";
echo $attribute_products->fields['attributes_sku'];
echo '</td>'."\n";
right after
PHP Code:
sort($attributes_output);
echo implode("\n",$attributes_output);
and to admin/includes/languages/english/products_with_attributes_stock.php
I added
PHP Code:
define('PWA_ATTRIBUTES_SKU', 'Attributes SKU');
and to admin/includes/stock_attributes.css
I changed
PHP Code:
.stockAttributesHeadingStockId,
.stockAttributesHeadingVariant,
.stockAttributesHeadingQuantity,
.stockAttributesHeadingEdit,
.stockAttributesHeadingDelete {
border-bottom: 1px solid #ccc;
width:18%;
}
to
PHP Code:
.stockAttributesHeadingSku,
.stockAttributesHeadingStockId,
.stockAttributesHeadingVariant,
.stockAttributesHeadingQuantity,
.stockAttributesHeadingEdit,
.stockAttributesHeadingDelete {
border-bottom: 1px solid #ccc;
width:18%;
}
and changed
PHP Code:
.stockAttributesCellStockId,
.stockAttributesCellVariant,
.stockAttributesCellQuantity,
.stockAttributesCellEdit,
.stockAttributesCellDelete {
border-bottom: 1px dotted #ccc;
}
to
PHP Code:
.stockAttributesCellSku,
.stockAttributesCellStockId,
.stockAttributesCellVariant,
.stockAttributesCellQuantity,
.stockAttributesCellEdit,
.stockAttributesCellDelete {
border-bottom: 1px dotted #ccc;
}
This mod served my purposes so if any of you would like to take it any further, such as output this info to orders and or shopping cart or make the Attribute SKU editable via the admin please do so
Bookmarks