flowerchild5:
I added an additional column in the database for product attribute product codes. I called it attribute_skus. I have not yet figured out how to make this editable in admin, but it is pretty easy to add the model #'s in PHPmyAdmin. I was able to get the model #'s to display in the same table in admin though so that I am able to verify I added them to the correct variant. If you would like this code I can provide it.
colinr:
Yes please! That would be a big help. :smile:
ColinR
I added the following code to admin/products_with_attributes_stock.php
Changed
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
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
echo '<td class="stockAttributesCellSku">'."\n";
echo $attribute_products->fields['attributes_sku'];
echo '</td>'."\n";
right after
```php
sort($attributes_output);
echo implode("\n",$attributes_output);
and to admin/includes/languages/english/products_with_attributes_stock.php
I added
define('PWA_ATTRIBUTES_SKU', 'Attributes SKU');
and to admin/includes/stock_attributes.css
I changed
.stockAttributesHeadingStockId,
.stockAttributesHeadingVariant,
.stockAttributesHeadingQuantity,
.stockAttributesHeadingEdit,
.stockAttributesHeadingDelete {
border-bottom: 1px solid #ccc;
width:18%;
}
to
.stockAttributesHeadingSku,
.stockAttributesHeadingStockId,
.stockAttributesHeadingVariant,
.stockAttributesHeadingQuantity,
.stockAttributesHeadingEdit,
.stockAttributesHeadingDelete {
border-bottom: 1px solid #ccc;
width:18%;
}
and changed
.stockAttributesCellStockId,
.stockAttributesCellVariant,
.stockAttributesCellQuantity,
.stockAttributesCellEdit,
.stockAttributesCellDelete {
border-bottom: 1px dotted #ccc;
}
to
.stockAttributesCellSku,
.stockAttributesCellStockId,
.stockAttributesCellVariant,
.stockAttributesCellQuantity,
.stockAttributesCellEdit,
.stockAttributesCellDelete {
border-bottom: 1px dotted #ccc;
}