Page 18 of 56 FirstFirst ... 8161718192028 ... LastLast
Results 171 to 180 of 552
  1. #171
    Join Date
    Nov 2006
    Posts
    160
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    You have to edit the file:
    /includes/modules/shipping/ups.php

    and change the code ...

    Let's say you do not want to allow UPS when products_id 15 is in the cart, change the code:
    Code:
        $this->types = array('1DM' => 'Next Day Air Early AM',
    to read:
    Code:
    global $cart;
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_id','15') > 0) {
      $this->enabled = false;
    }
        $this->types = array('1DM' => 'Next Day Air Early AM',

    So you would have to add the product_ID of each product correct? This solution would most likely work for me but I have around 200 products that cannot ship USPS. If I put 200 product_ID's in there, would that be the correct way to do it?
    Would it look like this (where the $_SESSION line would just keep going with all hte ID's?):
    Code:
        $this->types = array('1DM' => 'Next Day Air Early AM',
    to read:
    Code:
    global $cart;
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_id','15','16','17','20') > 0) {
      $this->enabled = false;
    }
        $this->types = array('1DM' => 'Next Day Air Early AM',


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

    Default Re: Different shipping methods for different categories

    For you to do this based on so many products_id values, it would be better to add a new field to the products table for something like:
    products_never_ups

    Then you can test if 1 or more items in the cart is set as products_never_ups

    and if there is 1 or more Products in the cart set as never being shipped by UPS, then you can then disable the UPS shipping module ...
    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. #173
    Join Date
    Nov 2006
    Posts
    160
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Thanks. I'll have to try that.


  4. #174
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Let us know how this works for you in adding a new field to control this ...
    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!

  5. #175
    Join Date
    Jul 2009
    Location
    Crystal Lake, IL
    Posts
    50
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I'm having issues with this. When I "fixed" the problem using your first suggestion, it worked but admin got upset. When I scrolled down and used the fix to not upset the admin it didn't work. I don't upset admin anymore, but I also don't get rid of the options that I want to when my category is selected.
    Thanks,
    Matt

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

    Default Re: Different shipping methods for different categories

    You really need to write more full and complete descriptions of what it is you are trying to do and exactly what you have already done ...

    Pretend I have no clue what you need or what you are trying to do and type really, really slowly ...
    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!

  7. #177
    Join Date
    Jul 2009
    Location
    Crystal Lake, IL
    Posts
    50
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I am trying to disable flat rate shipping when certain products are selected. I have two categories, both sub categories of 48, that have items that are too large for the flat rate shipping. I am using this code and it's not working:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
    }

    // disable for one master_categories_id
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','48')) > 0) {
    $this->enabled = false;
    }

    When I tried your first suggestion on this thread, it worked but I had the problem with the admin. So when I tried this one, it got rid of the admin problem but also stopped taking flat rate off when a product from a sub category of 48 is selected.
    Thanks,
    Matt

  8. #178
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Add above your IF test for the cart a line:
    global $cart
    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!

  9. #179
    Join Date
    Jul 2009
    Location
    Crystal Lake, IL
    Posts
    50
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Thanks, but from one of your other posts I realized that I was using a parent category and that is why it wasn't working.
    Thanks for all your help, you're awesome!!!

  10. #180
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Thanks for the update that the problem was just the wrong categories_id being tested for ...
    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!

 

 
Page 18 of 56 FirstFirst ... 8161718192028 ... LastLast

Similar Threads

  1. Re: Different shipping methods for different categories
    By kaddie in forum Built-in Shipping and Payment Modules
    Replies: 14
    Last Post: 19 Nov 2010, 04:37 AM
  2. Replies: 2
    Last Post: 27 Oct 2010, 01:45 PM
  3. Different shipping methods for different categories and mixed categories
    By neit in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 10 Aug 2010, 12:20 AM
  4. Separate Shipping Methods for Different Categories
    By MortalWombat in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 28 Jul 2010, 08:57 AM
  5. Different shipping methods for different product types?
    By talisman-studios in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Sep 2008, 04:59 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