в стандарте product_default.php выдает атрибуты радиобоксами на карточку товара
<span id='block_attr_sel_<?php print $attribut->attr_id?>'>
<?php print $attribut->selects?>
</span>
задача стоит чтобы к каждому свойству/атрибуту была отдельная кнопка купить
ТОВАР
ТОВАР без рюшечек 1шт 100рублей "В КОРЗИНУ"
ТОВАР с рюшечками 1шт 100рублей "В КОРЗИНУ"
ТОВАР ещекакойто 1шт 100рублей "В КОРЗИНУ"
собственно как вызвать <?php print $attribut->selects?> чтобы выглядело в таком виде и его можно было подсунуть онклику
либо что сделать с кодом что ниже,
<form name = "product" method = "post" action = "<?php print $this->action?>" enctype="multipart/form-data">
<?php
$attributesDatas = $product->getAttributesDatas();
$attributeValues = $attributesDatas['attributeValues'];
foreach ($attributeValues as $attributeVals) {
foreach ($attributeVals as $attributes) {
$product->setAttributeActive($attributes->val_id);
$pricefloat = round($attributes->addprice)
?>
<?php print $this->product->name." ".$attributes->value_name ?>
<input type="hidden" name="jshop_attr_id[<?php print $attributes->val_id ?>]" id="jshop_attr_id<?php print $attributes->val_id ?>" value="<?php print $attributes->val_id ?>" />
<?php print "<span>".$pricefloat." руб</span>" ?>
<input type = "submit" class = "button" value = "<?php print _JSHOP_ADD_TO_CART?>" onClick="jQuery('#to').val('cart');" />
<?php } } ?>
<?php print $this->_tmp_product_html_before_buttons;?> <?php print $this->_tmp_product_html_after_buttons;?>
<input type="hidden" name="to" id='to' value="cart" />
<input type = "hidden" name = "product_id" id = "product_id" value = "<?php print $this->product->product_id?>" />
<input type = "hidden" name = "category_id" id = "category_id" value = "<?php print $this->category_id?>" />
</form>
на данный момент этот код берет основную цену из карточки товара и добавляет в корзину при нажатии на любую кнопку, с атрибута не хочет упорно, в какой то момент даже работало
ткните носом где косяк