"Add to basket" in product list
Posted: 25 Nov 2015, 08:43
Hi,
I currently try to implement a feature that allows me to add products into the basket while browsing the product list. It works for products that don't have additional attributes required for selection (e.g. color). If I have such product I obviously can't add it, as the required attribute was not selected. The issue I have now is that such attributes are not loaded in the product list. I've put the following code into my own items-body-default.html, only getting an empty array:
Which PHP file do I have to modify to get those attributes into the product list?
I currently try to implement a feature that allows me to add products into the basket while browsing the product list. It works for products that don't have additional attributes required for selection (e.g. color). If I have such product I obviously can't add it, as the required attribute was not selected. The issue I have now is that such attributes are not loaded in the product list. I've put the following code into my own items-body-default.html, only getting an empty array:
Code: Select all
<?php foreach( $this->get( 'attributeConfigItems', array() ) as $code => $attributes ) : ?>
<!-- Layout stuff... -->
<?php endforeach; ?>