L'installazione come da file sottostante:
Codice: Seleziona tutto
-----------------------------------------------------------------------
Step 1.- BACKUP:
checkout_payment.php
Tip: I just ZIP each file to ie: shopping_cart.zip in the same place and keep it forever, you may have a better idea, so use it just in case you didnt read the gpl ;)
-----------------------------------------------------------------------
Step 2.- Open checkout_payment.php and do this:
after this__________________________start
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
}
after this__________________________end
insert this_________________________start
// check for minimum order
if ( $cart->show_total() > 0 ) {
if ( $cart->show_total() < MIN_ORDER ) {
tep_redirect(tep_href_link(FILENAME_MIN_ORDER, '', 'NONSSL'));
}
}
insert this_________________________end
-----------------------------------------------------------------------
Step 3.- Then go to:
includes/languages
and add the min_order.php file
-----------------------------------------------------------------------
Step 4.-
control MIN_ORDER from admin area
Connect to the database and execute the following query
MySQL Query_____________________________start
INSERT into configuration VALUES (NULL,'Minimum Order','MIN_ORDER',25,'The minimum order that will be accepted.',2,17,NULL,now(),NULL,NULL)
MySQL Query_____________________________end
Set MIN_ORDER to the amount of your minimum order.
Set MAX_ORDER to the amount of your minimum order.
-----------------------------------------------------------------------
Step 5. - Add the min_order.php file to your catalog dir
-----------------------------------------------------------------------
Step 6. - In application top add the following:
Add this________________________________start
// 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');
Add this________________________________end
-----------------------------------------------------------------------
Dove sbaglio ?
Qualcuno ha avuto il mio stesso problema ?
Grazie