Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
- $attributeOptions = array();
- foreach ($productAttributeOptions as $productAttribute) {
- foreach ($productAttribute['values'] as $attribute) {
- $attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];
- }
- }
- $attributeOptions = array(
- 'Color' => array(
- 1 => 'Green',
- 2 => 'Orange',
- ...
- ),
- 'Size' => array(
- 6 => 'L',
- 7 => 'XL',
- ...
- ),
- );
Add Comment
Please, Sign In to add comment