Page 3 of 53 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 522
  1. #21
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,677
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by GraniteMan44 View Post
    I would like to do what the original poster asked. If I want to use "per item" on more than one category, do I have to duplicate the

    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) {
    $this->enabled = false;


    for each category?

    Or can I list the others within the same line as the '17' ?

    example: 'master_categories_id','17','18', '20')


    Thank you.

    G
    You would use the same concepts of the original post, but you need to change the testing method to look at which master_categories_id values are in the cart ...

    A little more expanded definition on this would help ...

    Are you needing if the cart contains products from ONLY these categories vs the cart contains products from any of these categories ...
    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.1]
    Officially PayPal-Certified! Just click here

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

  2. #22
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    920
    Plugin Contributions
    1

    Default Re: Different shipping methods for different categories

    Ajeh,

    Wouldn't it be better to use product types to define shipping requirements for say truck only shipping?

    I ask that not knowing much about using product types, or even how to customize them. But this seems more appropriate than using a category.

    In this case, your only testing for a product type, not many categories. And what happens when you change or move a category? You back in the code fixing things.

    This is a big issue with our shop. Most stuff ships UPS, but all the furniture is FREIGHT only, as well as all glass.

  3. #23
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,677
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    In your case, you could make a Product Type and write the dozen files for this ...

    Or you could just add 1 field to the products table and add the code for adding/editing that field in the Admin and then use that as your test for this "truck" only ...

    This is a lot faster than a whole product type, however, you do have to remember to update your code on upgrades for this field ...

    Or if not many products are like this ... you can cheat and manually enter the data for this field in phpMyAdmin or run a command in the Tool ... Insert SQL Patches such as a new field called: products_ship_by_truck

    Code:
    UPDATE products SET products_ship_by_truck = 1 where products_id = ##;
    The other question is ... if 1 product is "truck only" then does the whole order go on the truck?
    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.1]
    Officially PayPal-Certified! Just click here

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

  4. #24
    Join Date
    Apr 2008
    Location
    Georgia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    What happens when 1 product is in 15 and 3 products are in other categories?

    If then you still do not want UPS, then you can block UPS when the whole cart is not categories_id 15 ...

    If you need 1 product to be from 15 to allow UPS you can do that too ...

    But you need to further define which way you want this to go ...♠
    There are about 10 different products in the category 15. I want all of them to use UPS shipping only.

    All other main categories and products in the site I want them to block UPS
    - Matt Haff -
    Web Designer
    http://www.matthaff.com/

  5. #25
    Join Date
    Apr 2008
    Location
    Georgia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    bump - please answer
    - Matt Haff -
    Web Designer
    http://www.matthaff.com/

  6. #26
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,677
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Imagine for a moment ...

    I buy 3 Products from categories_id 15 and that means UPS ...

    Tommy buys 4 Products from categories_id 32 and that means "other shipping module(s)" ...

    Freddy buys 2 Products from categories_id 32 and 1 Product from categories_id 15 ...

    1 Can Tommy use UPS as an option? ... meaning other shipping modules show "and" UPS also shows ... OR, other shipping module(s) show but UPS does NOT show ...

    2 Can Freddy "only" use UPS? ... meaning no other shipping modules show

    3 Can I "only" use UPS? ... meaning my whole order is categories_id 15 so that is my "only" shipping module to choose from

    What "other" shipping module(s) are you using aside from UPS?♠
    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.1]
    Officially PayPal-Certified! Just click here

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

  7. #27
    Join Date
    Apr 2008
    Location
    Georgia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    Imagine for a moment ...

    I buy 3 Products from categories_id 15 and that means UPS ...

    Tommy buys 4 Products from categories_id 32 and that means "other shipping module(s)" ...

    Freddy buys 2 Products from categories_id 32 and 1 Product from categories_id 15 ...

    1 Can Tommy use UPS as an option? ... meaning other shipping modules show "and" UPS also shows ... OR, other shipping module(s) show but UPS does NOT show ...

    2 Can Freddy "only" use UPS? ... meaning no other shipping modules show

    3 Can I "only" use UPS? ... meaning my whole order is categories_id 15 so that is my "only" shipping module to choose from

    What "other" shipping module(s) are you using aside from UPS?♠

    Hey, the Category 15 is only for UPS affiliates, so they should only be buying stuff from it. Other than that, if they have at least one product from 15 then they can use UPS and all other methods.

    The other methods that we use is only the regular usps (I think.) www.prowhiteteeth.com if you want to take a look.
    - Matt Haff -
    Web Designer
    http://www.matthaff.com/

  8. #28
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,677
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    If you "assume" that any products_id that is in categories_id 15 uses master_categories_id 15 ...

    You can add a filter on the UPS Shipping Module where if 1 or more products_id are using master_categories_id 15 then UPS will show ... otherwise, it will not be active or be hidden from the checkout_shipping ...

    You can customize the ups.php code by adding below this code:
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
              
    $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true false);
          } 
    to read:
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
              
    $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true false);
          }

          
    // disable for one master_categories_id
          
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','15') > 0)) {
              
    // show UPS
              
    $this->enabled true;
          } else {
              
    // hide UPS
              
    $this->enabled false;
          } 
    Now, UPS will only show if at least 1 master_categories_id is 15 ...

    However, if you want to turn OFF all of the other shipping modules when there is 1 or more products_id in the categories_id 15 with the same type of test, you can alter the logic to make them NOT show ...
    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.1]
    Officially PayPal-Certified! Just click here

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

  9. #29
    Join Date
    Apr 2008
    Location
    Georgia
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    in order for this to work, do I need to enable the UPS shipping on the site for this to work?
    - Matt Haff -
    Web Designer
    http://www.matthaff.com/

  10. #30
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    949
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    This would work better and not make the Admin have a fit:
    PHP Code:
          // 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','17') > 0)) {
              
    $this->enabled false;
          } 
    As I understand this, if I want to force a specific shipping method for one category, I need to add this magic code to each of the other shipping modules offered. If I want the storepickup option to always remain an option, I just don't add the code... Is that correct?

    Thanks

 

 
Page 3 of 53 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Need Help with Shipping Methods
    By bigcaat in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Jul 2007, 04:35 PM
  2. Selecting Shipping Methods with free shipping
    By pasi in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 15 Apr 2007, 05:28 PM
  3. Shipping Estimator Sort Shipping Methods
    By sitehatchery in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Apr 2007, 05:34 AM
  4. List shipping methods automatically on Shipping and Return Page
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Jul 2006, 12:00 AM

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
  •