$subindex = 0;
$attributes_query = "select products_options_id, products_options_values_id, products_options, products_options_values, products_attributes_weight, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
where orders_id = '" . (int)$order_id . "'
and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'";
$attributes = $db->Execute($attributes_query);
if ($attributes->RecordCount()) {
while (!$attributes->EOF) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
'value' => $attributes->fields['products_options_values'],
'weights' => $attributes->fields['products_attributes_weight'],
'prefix' => $attributes->fields['price_prefix'],
'price' => $attributes->fields['options_values_price']);
$subindex++;
$attributes->MoveNext();
}
}
Bookmarks