Thread: Bulk Shipping

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Bulk Shipping

    PHP Code:
    // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true false);
          } 
    Do I just make that look like this:

    PHP Code:
    // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $_SESSION['cart']->count_contents() >=100 ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true false);
          } 
    Also do I change the function that I found from: $_SESSION['cart']->count_contents()
    To: $_SESSION['cart']->count_contents() >=100

    I'm trying to ask more than one question at once to keep from double posting, but I don't see an edit post button.

    Edit: Found the edit button no more double posting. I'm in the process of learning php, but I'm teaching myself so it is very slow. I taught myself html, css, and xhtml so I think I can handle it with help.
    Last edited by suseadmi; 5 Sep 2006 at 03:41 AM.

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Bulk Shipping

    Not exactly ...

    You need to make your own function to manage the:
    $_SESSION['cart']->count_contents() >=100

    Functions can be made using the overrides by creating your own function file such as:

    /includes/functions/extra_functions/myfunctions.php
    /admin/includes/functions/extra_functions/myfunctions.php

    Which would contain:
    PHP Code:
    <?php
    function checkshipping_items {
    // code here
    }
    ?>
    The admin function would just have a return true as this is always true so it can work in the admin side ...

    The catalog function would be doing the actual test ...

    Look at the function zen_get_shipping_enabled for the catalog vs the same function for the admin ...

    You would build something similar ...

    PHP Code:
    <?php
    function checkshipping_items() {
      if (
    $_SESSION['cart']->count_contents() - $_SESSION['cart']->free_shipping_items() >= 100) {
        return 
    true;
      } else {
        return 
    false;
      }
    }
    ?>
    The admin would have a more simple function:
    PHP Code:
    <?php
    function checkshipping_items() {
      return 
    true;
    }
    ?>
    Now on the shipping module ... you would put inside the current code:
    PHP Code:
    // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            if (
    checkshipping_items() == true) {
            
    $this->enabled = ((MODULE_SHIPPING_FLAT100_STATUS == 'True') ? true false);
            }
          } 
    This means ... it would pass the normal test ... then have to pass your test ...

    NOTE: this is assuming you added it to the flat100.php file ...

    Easy, eh?
    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!]
    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!

  3. #13
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Bulk Shipping

    Okay, here's how I'm doing this. I have a copy of zencart unzipped on my computer so I can edit it without messing with what's on my actual site until finished. (maybe that will help you understand...something *shrugs* ) Would it just be possible to copy and paste all the scripts and partial scripts that you've given me and there be a possibility of it working?

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Bulk Weight Changes and Shipping
    By Christian_Wagner in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 15 May 2013, 08:15 PM
  2. v151 UPS - bulk/discount shipping price configuration
    By bobmeetin in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 18 Jan 2013, 06:24 PM
  3. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  4. Bulk edit on "Yes Always Free Shipping"
    By RetailProductsGroup in forum Basic Configuration
    Replies: 5
    Last Post: 4 May 2012, 10:33 PM

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