I am working in
app/design/frontend/[package]/default/template/catalog/product/list/. Here there is a
<?php foreach($this->getItems() as $_item): ?> which loops through and outputs the related items of the main product on the page.
I have modified the contents of the loop to display the drop-down configurable options for each related product (if it is a configurable product).
See image below:
<option>'s in the
<select> drop-downs do not have any
value attribute, so when the form is submitted, they have no effect.
The code from
configurable.phtml found in
But adding this directly to my code in
related.phtml doesn't have any effect and would probably conflict with the main product, as suggested here. I have followed their advice and used this code
and made a new namespace with the
product.js as suggested, but still this has no effect, and the
<option>'s still have no
I think the issue is with the
$this in the above code, because it is pointing to the wrong
class, because this code was originally intended for
So my question is, how do I change where
$this is pointing?