Results 1 to 2 of 2

Hybrid View

  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
    69,402
    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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

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. 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
  3. Over a certain weight = "Call for price"
    By carlocas in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 28 Sep 2010, 03:58 PM
  4. Need to change the default quanity for "each" to "Set" on certain products
    By whiskermouse in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 24 Apr 2010, 02:46 AM
  5. Replies: 1
    Last Post: 2 Nov 2008, 08:50 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