kosi779 Posted March 2, 2007 Posted March 2, 2007 Is there a way to set an order minimum or maximum in the checkout cart? Ex, if I wanted for a customer to not be permitted to check out unless they were spending $2.00 or more, can this be done? Thanks. Toujours la tienne, Kosi @)~}~~~
jfrey Posted March 3, 2007 Posted March 3, 2007 Is there a way to set an order minimum or maximum in the checkout cart? Ex, if I wanted for a customer to not be permitted to check out unless they were spending $2.00 or more, can this be done? Thanks. Look at leecartercompany.com. Is that what you want?
kosi779 Posted March 3, 2007 Author Posted March 3, 2007 Look at leecartercompany.com. Is that what you want? . . . not exactly. It looks like his restrictions are by quantity (you can only buy a min. of 12 of this item, etc) whereas I want a restriction by price.I want to sell a number of different items, some of which are moderately priced (ten dollars, fifteen, etc.) and some of which have very low prices (less than a dollar) but it's not profitable to me to process an order for, say eighty nine cents. Is there a way to do this? Toujours la tienne, Kosi @)~}~~~
kosi779 Posted March 3, 2007 Author Posted March 3, 2007 Look at leecartercompany.com. Is that what you want? . . . not exactly. It looks like his restrictions are by quantity (you can only buy a min. of 12 of this item, etc) whereas I want a restriction by price.I want to sell a number of different items, some of which are moderately priced (ten dollars, fifteen, etc.) and some of which have very low prices (less than a dollar) but it's not profitable to me to process an order for, say eighty nine cents. Is there a way to do this? . . . sorry for the multiple post. :-" Toujours la tienne, Kosi @)~}~~~
Guest Posted March 3, 2007 Posted March 3, 2007 this module http://www.oscommerce.com/community/contributions,1250 has this control. You may have to enhance it though if you want it to apply only for certain products.
kosi779 Posted March 4, 2007 Author Posted March 4, 2007 this modulehttp://www.oscommerce.com/community/contributions,1250 has this control. You may have to enhance it though if you want it to apply only for certain products. I found another module in the community that seemed to be the right one, except that it isn't working :-( Its called Minimum Price to Order V1.8. When I installed it exactly as directed and then tried to do a test check-out, I got this message: Warning: Cannot modify header information - headers already sent by (output started at <my document root>/includes/application_top.php:523) in <my document root>/includes/functions/general.php on line 33. My website is here: http://musicstore.jasonkosi.com. Can somebody check this out for me? Thanks so much. Toujours la tienne, Kosi @)~}~~~
Guest Posted March 4, 2007 Posted March 4, 2007 please post general.php line 25 to 40 so i can see the code and give you a fix. Thank you. Also please post any change you made to the application_top.php file. I found another module in the community that seemed to be the right one, except that it isn't working :-( Its called Minimum Price to Order V1.8. When I installed it exactly as directed and then tried to do a test check-out, I got this message: Warning: Cannot modify header information - headers already sent by (output started at <my document root>/includes/application_top.php:523) in <my document root>/includes/functions/general.php on line 33. My website is here: http://musicstore.jasonkosi.com. Can somebody check this out for me? Thanks so much.
kosi779 Posted March 4, 2007 Author Posted March 4, 2007 please post general.php line 25 to 40 so i can see the code and give you a fix. Thank you. Also please post any change you made to the application_top.php file. general.php (my control panel wraps lines and doesn't number them, so I hope I'm giving you the right piece of code here): //// // Stop from parsing any further PHP code function tep_exit() { tep_session_close(); exit(); } //// // Redirect to another page or site function tep_redirect($url) { if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); } if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } header('Location: ' . $url); tep_exit(); } //// // Parse the data used in the html tags to ensure the tags will not break function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } function tep_output_string_protected($string) { return tep_output_string($string, false, true); } function tep_sanitize_string($string) { $string = ereg_replace(' +', ' ', trim($string)); return preg_replace("/[<>]/", '_', $string); } //// // Return a random row from a database query function tep_random_select($query) { $random_product = ''; $random_query = tep_db_query($query); $num_rows = tep_db_num_rows($random_query); if ($num_rows > 0) { $random_row = tep_rand(0, ($num_rows - 1)); tep_db_data_seek($random_query, $random_row); $random_product = tep_db_fetch_array($random_query); } return $random_product; } //// // Return a product's name // TABLES: products function tep_get_products_name($product_id, $language = '') { global $languages_id; if (empty($language)) $language = $languages_id; $product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language . "'"); $product = tep_db_fetch_array($product_query); return $product['products_name']; } //// // Return a product's special price (returns nothing if there is no offer) // TABLES: products function tep_get_products_special_price($product_id) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status"); $product = tep_db_fetch_array($product_query); return $product['specials_new_products_price']; } //// // Return a product's stock // TABLES: products function tep_get_products_stock($products_id) { $products_id = tep_get_prid($products_id); $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $stock_values = tep_db_fetch_array($stock_query); return $stock_values['products_quantity']; } //// // Check if the required stock is available // If insufficent stock is available return an out of stock message function tep_check_stock($products_id, $products_quantity) { $stock_left = tep_get_products_stock($products_id) - $products_quantity; $out_of_stock = ''; if ($stock_left < 0) { $out_of_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>'; } return $out_of_stock; } //// // Break a word in a string if it is longer than a specified length ($len) function tep_break_string($string, $len, $break_char = '-') { $l = 0; $output = ''; for ($i=0, $n=strlen($string); $i<$n; $i++) { $char = substr($string, $i, 1); if ($char != ' ') { $l++; } else { $l = 0; } if ($l > $len) { $l = 1; $output .= $break_char; } $output .= $char; } return $output; } //// // Return all HTTP GET variables, except those passed as a parameter function tep_get_all_get_params($exclude_array = '') { global $HTTP_GET_VARS; if (!is_array($exclude_array)) $exclude_array = array(); $get_url = ''; if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) { reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) { $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&'; } } } return $get_url; } snippet from the application_top.php page (the part i added is heavily commented): // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); // currency if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) { if (!tep_session_is_registered('currency')) tep_session_register('currency'); if (isset($HTTP_GET_VARS['currency'])) { if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } else { $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } /****************************************/ // min price $min_price_query = tep_db_query("select configuration_value from configuration where configuration_key = 'MIN_ORDER'"); $min_price = $min_price_query; // define the minimum order define('MIN_ORDER', $min_price); define('FILENAME_MIN_ORDER', 'min_order.php'); /*****************************************/ // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); Toujours la tienne, Kosi @)~}~~~
jasonabc Posted March 4, 2007 Posted March 4, 2007 Is there a way to set an order minimum or maximum in the checkout cart? Ex, if I wanted for a customer to not be permitted to check out unless they were spending $2.00 or more, can this be done? Thanks. I'm sure someone will correct me if I'm wrong - but as far as I'm aware, OSC already has this feature built in... Admin > Modules > Order Total > Low Order Fee. Click "Install" and then edit away. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
zhexiang Posted March 4, 2007 Posted March 4, 2007 Strange, i don't have this features, maybe it's an older version.
jasonabc Posted March 4, 2007 Posted March 4, 2007 Strange, i don't have this features, maybe it's an older version. Grab a fresh download and copy the two files (/includes/modules/order_total/ot_loworderfee.php & /includes/languages/english/modules/order_total/ot_loworderfee.php) into their respective locations. Go to Admin and you should see the new module there. Worth a shot... Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
kosi779 Posted March 4, 2007 Author Posted March 4, 2007 I'm sure someone will correct me if I'm wrong - but as far as I'm aware, OSC already has this feature built in... Admin > Modules > Order Total > Low Order Fee. Click "Install" and then edit away. I noticed that feature, but it wasn't exactly what I wanted. I wanted the customer to be prompted to order something else if the minimum was not reached, and the low order fee module lets the customer order but adds on a fee. I guess if there is no other alternative then that's good enough . . . But I still can't imagine what is wrong with the store currently. I haven't uploaded any products, really (I've only uploaded two and there will eventually be many) . . . should I just start over? Toujours la tienne, Kosi @)~}~~~
Recommended Posts
Archived
This topic is now archived and is closed to further replies.