Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion How to disable "Store pick up" option for products over certain weight?

    I use both store pickup and zone rates options. Zone shipping table is set by weight. Since products over 900Kg is not suitable for picking up by customer, I have to disable the store pick up option for these products at the check out but keep the delivery option. Can anybody please help?? Thank you in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,562
    Plugin Contributions
    6

    Default Re: How to disable "Store pick up" option for products over certain weight?

    You could customize the Store Pickup module with the code:
    Code:
        $this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);
    
    // bof: turn off when weight of a product is >= 900
          if (!IS_ADMIN_FLAG) {
            global $cart;
            $products = $_SESSION['cart']->get_products();
    //echo '<pre>'; echo var_dump($products); echo '</pre>' . '<br><br>';
            for ($i=0, $n=sizeof($products); $i<$n; $i++) {
    //echo 'Products ID: ' . $products[$i]['id'] . ' name: ' . $products[$i]['name'] . ' weight: ' . $products[$i]['weight'] . '<br>';
              if ($products[$i]['weight'] >= 900) {
                $this->enabled = false;
                break;
              }
            }
          }
    // eof: turn off when weight of a product is >= 900
    
        if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_STOREPICKUP_ZONE > 0) ) {
    This is assuming you just care about quantity 1 of a Product being >= 900 and not the weight of the cart or multiple quantities of a Product ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. how to disable "new products" and "all products" from category sidebox?
    By phingoc in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 31 Mar 2014, 12:40 AM
  2. v150 "in store pick-up" limited to only people really close to my location...
    By WebKat in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Mar 2012, 11:38 PM
  3. Shopping cart - trying to turn off "Total Items" "Weight" and "Price"
    By deshojo in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 4 Apr 2011, 07:15 PM
  4. How to set up local delivery address, or add "Time" to Store Pick Up?
    By Tech Diva in forum Addon Payment Modules
    Replies: 1
    Last Post: 12 Oct 2010, 06:21 PM
  5. Disable "Contact Us Link" On Showcase Store
    By wdd49 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2010, 04:05 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
  •