Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2007
    Location
    London, England
    Posts
    9
    Plugin Contributions
    0

    Default Minimum Order solution

    Fellow zenners,

    Here's my alternative solution to the minimum order problem, whereby the minimum order must be reached before they can proceed to checkout. It's basically done using the session.

    All you need to do is edit three files:

    1) header_php.php (within /zencartroot/includes/modules/pages/checkout_shipping/)
    2) tpl_shopping_cart_default.php (within /zencartroot/includes/templates/customtemplate/templates/)
    3) shopping_cart.php (within /zencartroot/includes/languages/caftemp/)

    For file 1), add:

    // if the amount in the shopping cart is less than £3, redirect them back to the shopping cart page
    $_SESSION['minimum_amount'] = false;
    if ($_SESSION['cart']->show_total() < 3) {
    $_SESSION['minimum_amount'] = true;
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    }

    For file 2, add below the other error messages (after line 45):

    <?php if($_SESSION['minimum_amount']) { ?>

    <div class="messageStackError"><?php echo MINIMUM_ORDER_CANT_CHECKOUT; ?></div>

    <?php //reset the session variable after warning them, so if they update their quantity using the blue arrows icon, the error dissapears
    $_SESSION['minimum_amount'] = false;
    } ?>


    For file 3, add:

    define('MINIMUM_ORDER_CANT_CHECKOUT', 'Your order must be at least £3. Please choose another product or make a donation.');

    The only problem I'm having is getting that £ sign to display properly since it currently brings up "£3" instead of "£3". I'll post the solution when I find it.

    Hope this helps someone.



  2. #2
    Join Date
    Oct 2005
    Location
    Netherlands
    Posts
    620
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    Hi Narian,

    I've tried your solution and it works very well on 1.2.7. Thanks for posting it!

  3. #3
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    I just edited my code exactly as above for 1.3.7 and so far, so good. Thanks!

  4. #4
    Join Date
    May 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    I have set this up in 1.3.7 and it works, except that no error message pops up or is shown.

    Should something happen when you are returned to the shopping cart?

  5. #5
    Join Date
    Jun 2007
    Location
    London, England
    Posts
    9
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    waynemichel, you need to make sure you define the error as mentioned in step 3, i.e. in shopping_cart.php.

    Since it has worked for other people, I'm assuming that's the problem. If not, it could be something else that you mistakenly altered in your code.

  6. #6
    Join Date
    Aug 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    Hi Narian,

    tried your solution on Version 1.3.6. Also no Pupup, when shopping cart is under the mininum. I solves this Problem, by adding in my shopping_cart.php the define('TEXT_INFORMATION', '<strong><font color="red">Der Mindestbestellwert betr&#228;gt € 15.</font></strong>');

    Thanks for posting it.

  7. #7
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Minimum Order solution

    did anyone bother to look for this mod in the DL section?
    Zen cart PCI compliant Hosting

  8. #8
    Join Date
    Jun 2007
    Location
    London, England
    Posts
    9
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    Quote Originally Posted by Merlinpa1969 View Post
    did anyone bother to look for this mod in the DL section?
    Yes, I did. But I experienced complications hence why gave an attempt at creating an "...alternative solution".

  9. #9
    Join Date
    Mar 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Minimum Order solution

    Quote Originally Posted by waynemichel View Post
    I have set this up in 1.3.7 and it works, except that no error message pops up or is shown.

    Should something happen when you are returned to the shopping cart?
    Are you sure you put new error lines in correct place? I'm just asking because I added them first inside the previous if statement

  10. #10
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Minimum Order solution

    Well done, narian. Your code works as advertised and works well for making sure people purchase 'X' dollar amount before checkout.

    Thanks for sharing.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Need a backend order entry solution
    By hollettster in forum General Questions
    Replies: 5
    Last Post: 20 May 2011, 04:12 AM
  2. Easy Populate Minimum Order/Order Units
    By jdnp in forum General Questions
    Replies: 3
    Last Post: 24 May 2010, 04:30 AM
  3. Setting minimum order for check/money order only
    By coldspag in forum Managing Customers and Orders
    Replies: 0
    Last Post: 26 Nov 2008, 02:18 PM
  4. Opening order minimum and re-order minimums - possible in ZC?
    By CreativeWitch in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2007, 06:36 PM
  5. Order Total Discount - possible Solution
    By crazycucumber in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 4 Sep 2006, 10:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR