Archiwa tagu: minimum amount

[WP e-Commerce] Minimum order amount

Title of mod: Minimum order amount
Plugin: WP e-Commerce 3.8

Some of payment gateways can not process payments less then 1, 3 or 6$, and for example in our shop we have got products which cost half of dollar… so to protect from that orders which can not be processed by our payment system, we will add small amount filter…

Step 1: Open file „/wp-e-commerce/wpsc-includes/ajax.functions.php” and about line 531 ( inside of the function wpsc_submit_checkout ) add following code:

	if($wpsc_cart->calculate_total_price() < 6) {
		$_SESSION['wpsc_checkout_misc_error_messages'][] = __( 'Not reached the minimum amount of the basket. Minimum is 6$.', 'wpsc' );
		$is_valid = false;
	}

Step 2: Save and upload new file;)

Now, when client will try to finalize order with amount less then our minimum, shopping cart will show him error message „Not reached the minimum amount of the basket. Minimum is 6$.”