Код: Выделить всё
Array (
[0] => Array (
[product_id] => 6
[price] => 50.0000
[quantity] => 5
[option] => Array (
[option_display] => Array (
[Color] => black
[RAM] => 2GB
)
[option_details] => Array (
[7] => 15
[8] => 16
)
)
)
[1] => Array
(
[product_id] => 6
[price] => 50.0000
[quantity] => 4
[option] => Array
(
[option_display] => Array
(
[Cover Type] => flip
[Description] => leather type
)
[option_details] => Array
(
[7] => flip
[8] => leather type
)
)
) )
15 и 16 — это поле выбора и поле-переключатель, поэтому у него есть идентификатор)
и мой HTML-файл —
Код: Выделить всё
case 'drop_down':
echo $value->getTitle();
echo '';
echo '
getIsRequire() == 1) ? 'required' : '').'">'.(($value->getIsRequire() == 1) ? '*Required Field' : '').'
';
foreach ($option as $values) {
echo ''.$values['title'].' + '.Mage::helper('core')->currency($values['price'], true, false).'';
}
echo '';
break;
Код: Выделить всё
$newdata = array (
'product_id' => $product_id,
'price' => $price,
'quantity' => $quantity,
'option' => array(
'option_display' => $option_display,
'option_details' => $option_value
)
);
Подробнее здесь: https://stackoverflow.com/questions/407 ... ther-array
Мобильная версия