' . "\n"; $colspan = 3; $colspan++; $shopping_cart_detail .= ' ' . "\n"; if ($sContent == $aContents['shopping_cart']) { $colspan++; $shopping_cart_detail .= ' ' . $aLang['table_heading_remove'] . '' . "\n"; } $shopping_cart_detail .= ' ' . $aLang['table_heading_quantity'] . '' . "\n"; if (PRODUCT_LIST_MODEL > 0) { if ($sContent == $aContents['shopping_cart']) { $colspan++; $shopping_cart_detail .= ' ' . $aLang['table_heading_model'] . '' . "\n"; } } $shopping_cart_detail .= ' ' . $aLang['table_heading_products'] . '' . "\n"; if ($sContent != $aContents['shopping_cart']) { $colspan++; $shopping_cart_detail .= ' ' . $aLang['table_heading_tax'] . '' . "\n"; } $shopping_cart_detail .= ' ' . $aLang['table_heading_total'] . '' . "\n" . ' ' . "\n" . ' ' . "\n" . '  ' . "\n" . ' ' . "\n"; for ($i=0, $n=count($products); $i<$n; $i++) { $shopping_cart_detail .= ' ' . "\n"; if (SHOPPING_CART_IMAGE_ON == 'true') { $shopping_cart_detail .= ' '; $shopping_cart_detail .= oos_image(OOS_IMAGES . 'product/small/' . $products[$i]['image'], $products[$i]['name']) . '' . "\n"; } // Delete box only for shopping cart if ($sContent == $aContents['shopping_cart']) { $shopping_cart_detail .= ' ' . oos_draw_checkbox_field('cart_delete[]', $products[$i]['id']) . '' . "\n"; } // Quantity box or information as an input box or text $quantity = number_format($products[$i]['quantity']); if ($sContent == $aContents['shopping_cart']) { $shopping_cart_detail .= ' ' . oos_draw_input_field('cart_quantity[]', $quantity, 'size="4"') . oos_draw_hidden_field('products_id[]', $products[$i]['id']) . '
' . (oos_get_products_quantity_order_min($products[$i]['id']) > 1 ? $aLang['products_order_qty_min_text_cart_short'] . oos_get_products_quantity_order_min($products[$i]['id']) : '') . (oos_get_products_quantity_order_units($products[$i]['id']) > 1 ? $aLang['products_order_qty_unit_text_cart_short'] . oos_get_products_quantity_order_units($products[$i]['id']) : "") . '' . "\n"; } else { $shopping_cart_detail .= ' ' . $quantity . '' . "\n"; } if (PRODUCT_LIST_MODEL > 0) { if ($sContent == $aContents['shopping_cart']) { $shopping_cart_detail .= ' ' . $products[$i]['model'] . '' . "\n"; } } // Product name, with or without link if ($sContent == $aContents['shopping_cart']) { $shopping_cart_detail .= ' ' . $products[$i]['name'] . ''; } else { $shopping_cart_detail .= ' ' . $products[$i]['name'] . ''; } // Display marker if stock quantity insufficient if (STOCK_CHECK == 'true') { $shopping_cart_detail .= $stock_check = oos_check_stock($products[$i]['id'], $products[$i]['quantity']); if ($stock_check) $any_out_of_stock = 1; } // Wishlist names if (oos_is_not_null($products[$i]['towlid'])) { $shopping_cart_detail .= '
' . oos_image(OOS_IMAGES . 'wl.gif', oos_get_wishlist_name($products[$i]['towlid'])) . '' . "\n"; $shopping_cart_detail .= '' . oos_get_wishlist_name($products[$i]['towlid']) . ''; $shopping_cart_detail .= oos_draw_hidden_field('to_wl_id[]', $products[$i]['towlid']); } // Product options names if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); foreach($products[$i]['attributes'] as $option => $value) { $shopping_cart_detail .= '
- ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . ''; } } $shopping_cart_detail .= '' . "\n"; // Tax (not in shopping cart, tax rate may be unknown) if ($sContent != $aContents['shopping_cart']) { $shopping_cart_detail .= ' ' . number_format($products[$i]['tax'], TAX_DECIMAL_PLACES) . '%' . "\n"; } // Product price if ($sContent != $aContents['account_history_info']) { $shopping_cart_detail .= ' ' . $oCurrencies->display_price($products[$i]['price'], oos_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ''; } else { $shopping_cart_detail .= ' ' . $oCurrencies->display_price($products[$i]['price'], $products[$i]['tax'], $products[$i]['quantity']) . ''; } // Product options prices if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); foreach($products[$i]['attributes'] as $option => $value) { if ($products[$i][$option]['options_values_price'] != 0) { if ($sContent != $aContents['account_history_info']) { $shopping_cart_detail .= '
' . $products[$i][$option]['price_prefix'] . $oCurrencies->display_price($products[$i][$option]['options_values_price'], oos_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ''; } else { $shopping_cart_detail .= '
' . $products[$i][$option]['price_prefix'] . $oCurrencies->display_price($products[$i][$option]['options_values_price'], $products[$i]['tax'], $products[$i]['quantity']) . ''; } } else { // Keep price aligned with corresponding option $shopping_cart_detail .= '
 '; } } } $shopping_cart_detail .= '' . "\n" . ' ' . "\n"; }