HI
I am looking for a contribution which will check that the cart has a minimum number of items at checkout time and issue a message if below the minimom number and return customer to a shopping page.
As yet I havent found one but was hoping someone may have a lead on something similar.
Cheers
Mickey
Latest News: (loading..)
Minimum number of items in cart at checkout time
Started by janim4, Sep 08 2009, 09:43
6 replies to this topic
#1
Posted 08 September 2009, 09:43
#2
Posted 26 September 2009, 07:44
Try Minimum Product Quantity >>> www.oscommerce.com/community/contributions,2953
#3
Posted 17 November 2009, 19:25
agribusman, on 26 September 2009, 07:44, said:
Try Minimum Product Quantity >>> www.oscommerce.com/community/contributions,2953
Thank you for your response.
Not Quite what I was looking for. It's the minimum number of items in the cart I'm after not the minimum number of a products. i.e go no further if the number of items is less than 6 for example.
Regards
Mickey
#4
Posted 17 November 2009, 19:32
checkout_shipping.php
includes/languages/english.php
Completely untested
if ($cart->count_contents() < 6) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode(sprintf(MORE_ITEMS_NEEDED, $cart->count_contents()), 'NONSSL'));
includes/languages/english.php
define('MORE_ITEMS_NEEDED', 'You have only %s items in your basket. Add more you fool.');#Completely untested
Me page.
#5
Posted 15 January 2010, 19:25
janim4, on 08 September 2009, 09:43, said:
HI
I am looking for a contribution which will check that the cart has a minimum number of items at checkout time and issue a message if below the minimom number and return customer to a shopping page.
As yet I havent found one but was hoping someone may have a lead on something similar.
Cheers
Mickey
I am looking for a contribution which will check that the cart has a minimum number of items at checkout time and issue a message if below the minimom number and return customer to a shopping page.
As yet I havent found one but was hoping someone may have a lead on something similar.
Cheers
Mickey
I created a simple way to do it. You can see it working live on www.trendynailwraps.co.uk section Purchase
(or on www.dgweb.ie/_osc_trendy_nail_wraps during development phase)
1) Open catalog/chechout_shipping.php
Locate:
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_PRIVACY));
}
Replace by :
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_MIN_ITEMCART));
}
2)Open /includes/filenames.php
add this line:
define('FILENAME_MIN_ITEMCART', 'min_itemcart.php');
3) Open catalog/privacy.php
Find any places in the file that has that in it:
FILENAME_PRIVACY
Replace by:
FILENAME_MIN_ITEMCART
(CTRL-F then Replace)
Save it as min_itemcart.php and place it in catalog/
4) create a file named min_itemcart.php with the following lines and place it in catalog/includes/languages/english/
<?php
define('NAVBAR_TITLE', 'Important Note');
define('HEADING_TITLE', 'Important Note');
define('TEXT_INFORMATION', 'The minimum purchase requirement is ANY 3 SHEETS.');
?>
That's it! You have it all done now...
Good Luck...
Cheers,
Dave
#6
Posted 23 January 2010, 19:32
x613513, on 15 January 2010, 19:25, said:
I created a simple way to do it. You can see it working live on www.trendynailwraps.co.uk section Purchase
(or on www.dgweb.ie/_osc_trendy_nail_wraps during development phase)
1) Open catalog/chechout_shipping.php
Locate:
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_PRIVACY));
}
Replace by :
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_MIN_ITEMCART));
}
2)Open /includes/filenames.php
add this line:
define('FILENAME_MIN_ITEMCART', 'min_itemcart.php');
3) Open catalog/privacy.php
Find any places in the file that has that in it:
FILENAME_PRIVACY
Replace by:
FILENAME_MIN_ITEMCART
(CTRL-F then Replace)
Save it as min_itemcart.php and place it in catalog/
4) create a file named min_itemcart.php with the following lines and place it in catalog/includes/languages/english/
<?php
define('NAVBAR_TITLE', 'Important Note');
define('HEADING_TITLE', 'Important Note');
define('TEXT_INFORMATION', 'The minimum purchase requirement is ANY 3 SHEETS.');
?>
That's it! You have it all done now...
Good Luck...
Cheers,
Dave
(or on www.dgweb.ie/_osc_trendy_nail_wraps during development phase)
1) Open catalog/chechout_shipping.php
Locate:
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_PRIVACY));
}
Replace by :
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 3) {
tep_redirect(tep_href_link(FILENAME_MIN_ITEMCART));
}
2)Open /includes/filenames.php
add this line:
define('FILENAME_MIN_ITEMCART', 'min_itemcart.php');
3) Open catalog/privacy.php
Find any places in the file that has that in it:
FILENAME_PRIVACY
Replace by:
FILENAME_MIN_ITEMCART
(CTRL-F then Replace)
Save it as min_itemcart.php and place it in catalog/
4) create a file named min_itemcart.php with the following lines and place it in catalog/includes/languages/english/
<?php
define('NAVBAR_TITLE', 'Important Note');
define('HEADING_TITLE', 'Important Note');
define('TEXT_INFORMATION', 'The minimum purchase requirement is ANY 3 SHEETS.');
?>
That's it! You have it all done now...
Good Luck...
Cheers,
Dave
Works really well, using it at the moment.
do you happen to know if I can only apply the 6 minimum order limit to a certain catagory.
I am guessing I need to modify the below to check for a certain category
if ($cart->count_contents() < 6) {
tep_redirect(tep_href_link(FILENAME_MIN_ITEMCART));
}
any idea on how I would do this?
#7
Posted 26 January 2010, 18:48
I am looking for an oscommerce contribution which will add a less than minimum surcharge to each individual item if less than a minimum amount of that item is ordered. For example, let's say that the minimum order for widgets was a quantity of 5 on my website. If the customer orders less than 5, I would like a surcharge added to the order. I would like to customize this for most every product on my website. Please advise if you have seen or know of a contribution like this.
I have seen minimum order quantity contributions, but the ones I have seen are different in that they do not allow the customer to purchase less than the minimum amount. I want to allow customers to purchase less than the minimum amount, but I want a surcharge to be added to their order if they do.
Let me know. Thanks!!
I have seen minimum order quantity contributions, but the ones I have seen are different in that they do not allow the customer to purchase less than the minimum amount. I want to allow customers to purchase less than the minimum amount, but I want a surcharge to be added to their order if they do.
Let me know. Thanks!!














