Magento Replacing super attributes table with dropdown

Posted by thrice801 on Stack Overflow See other posts from Stack Overflow or by thrice801
Published on 2010-04-29T22:59:52Z Indexed on 2010/04/29 23:07 UTC
Read the original article Hit count: 290

Filed under:
|
|

Hi,

I am trying to replace my magento super attributes table with a drop down menu in place of it, Ive got the menu created but I am struggling to get it to actually use the data from the select dropdown. On submit it calls up function productAddToCartForm, which I feel like if I could modify, I could figure it out. But I have no idea where that function is. My php code looks like the following.

<?php if (count($_associatedProducts)): ?>
<select name="selectedSku">
<?php foreach ($_associatedProducts as $_item): ?>
<?php
$prodname = $this->htmlEscape($_item->getName());
$prodprice = $this->htmlEscape($_item->getPrice());
$prodcolor = $_item->getFullColor();
$prodsize = $_item->getTopSize();
$prodcombined = $prodname;
$prodcombined .= " / ";
$prodcombined .= $prodprice;
echo "<option ";
echo "value ='";
echo $_item->getId();
echo "'>";
echo $prodcombined;
echo "</option>";
?>
<?php endforeach; ?>
</select>

Any help would be much appreciated. Thanks!

© Stack Overflow or respective owner

Related posts about magento

Related posts about attributes