meules Posted December 13, 2005 Share Posted December 13, 2005 Hi, I'm using the login 4 price contribution and the add_multi_v1.2 contribution. The problem is that people can see the price of my products when they add them to the cart/basket. The total price shows up, not the price of the product itself. I know that I have to change a simple line in the code, but I'm a n00b :blush: This is the code catalog/includes/application_top.php // customer adds a product from the products page case 'add_product' : // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } else { if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); } break; // performed by the 'buy now' button in product listings and review page case 'buy_now' : // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } else { if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); } break; catalog/includes/classes/currencies.php function display_price($products_price, $products_tax, $quantity = 1) { if (!tep_session_is_registered('customer_id')) { return '<a href="' . HTTP_SERVER . '/' . FILENAME_LOGIN . '">Login For Price</a>'; } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } } ?> THIS IS THE ADD_MULTI_V1.2 CONTRIBUTE catalog/includes/application_top.php ///////////////////////////////////////// Products Multi ////////////////////// if ($HTTP_GET_VARS['action'] == 'add_multi') { $parameters = array('action', 'pid', 'products_id'); }# ///////////////////////////////////////// Products Multi ////////////////////// switch ($HTTP_GET_VARS['action']) { ///////////////////////////////////////// Products Multi ////////////////////// // multi_product_add case 'add_multi': for ($i=0; $i<=sizeof($HTTP_POST_VARS['products_id']);$i++) { if($_POST['add_id'][$i] >= 1) $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['id'][$i]))+($HTTP_POST_VARS['add_id'][$i]), $HTTP_POST_VARS['id'][$i]); } tep_redirect(tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params($parameters), 'NONSSL')); break; ///////////////////////////////////////// Products Multi ////////////////////// catalog/includes/filenames.php define('FILENAME_PRODUCT_LISTING', 'product_listing.php'); change to define('FILENAME_PRODUCT_LISTING', 'product_listing_multi.php') These are the codes I had to change for the 2 contributes Hope someone can help Thanks in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.