} else { $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_quantity_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_min_text_info'] . ' ' . $products_order_min; } } if ($_SESSION['error_cart_msg'] == '') { MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL')); } else { MyOOS_CoreApi::redirect(oos_href_link($aPages['product_info'], 'products_id=' . $_POST['products_id'])); } } break; case 'frend_wishlist_add_product': if (isset($_POST['products_id']) && is_numeric($_POST['cart_quantity'])) { $cart_qty = $_SESSION['cart']->get_quantity(oos_get_uprid($_POST['products_id'], $_POST['id'])); $news_qty = $cart_qty + $cart_quantity; $products_order_min = oos_get_products_quantity_order_min($_POST['products_id']); $products_order_units = oos_get_products_quantity_order_units($_POST['products_id']); if ($cart_quantity >= $products_order_min or $cart_qty >= $products_order_min) { if ($cart_quantity % $products_order_units == 0 and $news_qty >= $products_order_min) { $_SESSION['cart']->add_cart($_POST['products_id'], intval($news_qty), $_POST['id'], true, $_POST['to_wl_id']); } else { $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_units_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_unit_text_info'] . ' ' . $products_order_units; } } else { $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_quantity_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_min_text_info'] . ' ' . $products_order_min; } if ($_SESSION['error_cart_msg'] == '') { MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL')); } else { MyOOS_CoreApi::redirect(oos_href_link($aPages['product_info'], 'products_id=' . $_POST['products_id'])); }
} } $shopping_cart_detail .= oos_image(OOS_IMAGES . $sProductImage, $products[$i]['name'], SMALL_IMAGE_WIDTH * SHOPPING_CART_MINI_IMAGE, SMALL_IMAGE_HEIGHT * SHOPPING_CART_MINI_IMAGE) . '</a></td>' . "\n"; } // Delete box only for shopping cart if ($sPage == $aPages['shopping_cart']) { $shopping_cart_detail .= ' <td align="center" valign="top">' . oos_draw_checkbox_field('cart_delete[]', $products[$i]['id']) . '</td>' . "\n"; } // Quantity box or information as an input box or text if (DECIMAL_CART_QUANTITY == '1') { $quantity = number_format($products[$i]['quantity'], 2); } else { $quantity = number_format($products[$i]['quantity']); } if ($sPage == $aPages['shopping_cart']) { $shopping_cart_detail .= ' <td align="center" valign="top" class ="main">' . oos_draw_input_field('cart_quantity[]', $quantity, 'size="4"') . oos_draw_hidden_field('products_id[]', $products[$i]['id']) . '<br />' . (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']) : "") . '</td>' . "\n"; } else { $shopping_cart_detail .= ' <td align="center" valign="top" class ="main">' . $quantity . '</td>' . "\n"; } if (PRODUCT_LIST_MODEL > 0) { if ($sPage == $aPages['shopping_cart']) { $shopping_cart_detail .= ' <td valign="top" class="main"><a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['model'] . '</a></td>' . "\n"; } } // Product name, with or without link if ($sPage == $aPages['shopping_cart']) { $shopping_cart_detail .= ' <td valign="top" class="main"><a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; } else { $shopping_cart_detail .= ' <td valign="top" class="main"><b>' . $products[$i]['name'] . '</b>'; } // Display marker if stock quantity insufficient