Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

minimum order value


warrenerjm

Recommended Posts

Posted

Hi

 

OK I am being dumb now as i just can't find what I think is possible in Admin :-"

I need a minimum order value £ not quantity. Never set one before but need to set a small amount to cover my costs like shops do for good old fashioned cheques.

How do I do this please. I have looked (& searched >_< ) but not found (probably 'cos it is staring me in the face!) sorry.

 

Thanks

Posted

Completely untested;

 

checkout_shipping.php:

  if ($cart->show_total() < SHIPPING_MIN_COST) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode(sprintf(ERROR_UNDERCOST_SHIPPING, $currencies->display_price(SHIPPING_MIN_COST, tep_get_tax_rate($product_info['products_tax_class_id']) ), $currencies->display_price(SHIPPING_MIN_COST-$cart->show_total(), tep_get_tax_rate($product_info['products_tax_class_id'])))), 'NONSSL'));

 

language file:

define('ERROR_UNDERCOST_SHIPPING', 'Sorry, our minimum spend is %s, please spend another %s to checkout.');

 

application_top.php (would be better as an admin setting, but there we are):

define('SHIPPING_MIN_COST', 100);

Change the 100 to however much your minimum spend is.

 

I have no clue if the above will even work, all done in my head.

Posted

Completely untested;

 

checkout_shipping.php:

  if ($cart->show_total() < SHIPPING_MIN_COST) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode(sprintf(ERROR_UNDERCOST_SHIPPING, $currencies->display_price(SHIPPING_MIN_COST, tep_get_tax_rate($product_info['products_tax_class_id']) ), $currencies->display_price(SHIPPING_MIN_COST-$cart->show_total(), tep_get_tax_rate($product_info['products_tax_class_id'])))), 'NONSSL'));

 

language file:

define('ERROR_UNDERCOST_SHIPPING', 'Sorry, our minimum spend is %s, please spend another %s to checkout.');

 

application_top.php (would be better as an admin setting, but there we are):

define('SHIPPING_MIN_COST', 100);

Change the 100 to however much your minimum spend is.

 

I have no clue if the above will even work, all done in my head.

Thanks..so there isn't a configuration in admin as i had thought?

 

How does the %s get the different values?

 

Why don't I choose the easy options! lol

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...