Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Minimum order to checkout fix Rate Topic   - - - - -

 
  • WebGuy
  • Senior Member
  • Members
  • Join Date: 02-Dec 08
  • 419 posts

Posted 30 March 2009 - 05:17 PM #21

The only file that you have to change is the core/fn_cart.php under this line:
// Checks if order can be placed

Replace total with subtotal:

// Checks if order can be placed
//
function fn_allow_place_order(&$cart)
{
global $settings;

$subtotal = $cart['subtotal'];

$function = __FUNCTION__;
include CORE_DIR . 'addons_inheritance.php';

$cart['amount_failed'] = ($settings['General']['min_order_amount'] > $subtotal && floatval($subtotal));

if (!empty($cart['amount_failed']) || !empty($cart['shipping_failed'])) {
return false;
}

return true;
}
?>
WebGuy
www.nutraceaonline.com
CS-CART VERSION: 1.3.5 SP4

 
  • rugger
  • Junior Member
  • Members
  • Join Date: 13-Oct 08
  • 18 posts

Posted 30 March 2009 - 11:32 PM #22

The CS Cart program is installed in a subdirectory named cart in our site, letsplaydolls.com.

Here is what I have done.

I downloaded the file fn_cart.php using FTP from the letsplaydolls.com/cart/core/ folder to the local diretory.
I modified the file replacing all 4 instances of "total' with "subtotal" under the "//Checks to see if order can be placed" note. (It is the last part of the file.)
I saved the changes and uploaded the modified file to letsplaydolls.com/cart/core/
I viewed the file and insured that the resident fn_cart.php file has infact been changed.
It has.

The minimum order is set to $12.00 at admin:Settings:General.

I then went to the website and entered an order with a subtotoal of $11.25, a state tax of $.80 for a total of $12.05. Sadly, the site allows the order to be processed. When I reduce the TOTAL to less that $12.00 it returns a message that the total must exceed $12.00.

I am using Ver. 1.3.5 SP4.

If I'm missing something, I surely cannot figure out what.

Rugger