Page 16 of 53 FirstFirst ... 6141516171826 ... LastLast
Results 151 to 160 of 522
  1. #151
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    To avoid issues ... I use the naming convention of:
    freeoptions.php_1
    freeoptions.php_ORI
    etc. etc.

    That way it is not picked up as a php file ...
    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. #152
    Join Date
    Sep 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Guys, I'm hoping you're able to help us out with this one. We're trying to do something similar to those at the start of the thread. I've tried several different codes etc. and haven't had any luck.

    Bascially we want to make it so that any large items can only be shipped by the 'large item shipping' shipping module we got. So basically items in catagory 18 are all large items, so they are included, but items from catagory 23 are also large, so they need to be added to the code also some how.

    In an ideal world, it would work so that if i add a large item to the cart, it would only have the large item shipping option and then if i added a smaller item, it would still only have the large item shipping option and of course, as soon as you remove the large item from the cart, it shows all the normal shipping options (excluding the large item shipping) for the small item

    I have taken a few stabs at this myself and failed horribly. If anyone knows what we need to do, it would be really appreciated

  3. #153
    Join Date
    Jun 2007
    Posts
    271
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Since this is growing into the master thread for crazy shipping changes based on category I thought I would add one more solution I have found. IT is a bit of a hack, but maybe will inspire you if you can't find your own.

    Problem: I need to charge a flat rate, only once if a product in a certain category(frozen foods) is chosen. Then I also need to charge the standard calculated rates(Fedex or USPS.)

    Solution: (This can be done by any attribute, one of them being category, but in my case it is by model.)
    1) For each product in the category make the model 'frozen'(I don't use category ID for reasons not described here)
    2) Open /includes/modules/order_total/ot_loworderfee.php
    3)Change this:

    Code:
    if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
            if ( ($pass == true) && ( $order->info['subtotal'] < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
              $charge_it = 'true';
    To this:

    Code:
    if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
            if ( ($pass == true) && ($_SESSION['cart']->in_cart_check('products_model','frozen') > 0) ) {
              $charge_it = 'true';
    4)Change your settings in the ADmin screen so the low order fee is activated at very low levels(less than $1).

    Huh? Why?: Instead of adding a fee based on cost, it is adding a fee if certain conditions exist. In this case it is based on if the 'products_model' is 'frozen'. If you want to do it based on categories just change it to:
    Code:
    in_cart_check('master_categories_id','66') > 0) )
    where 66 is the category id


    -lindasdd

    P.S. Thanks again Ajeh. This is all based on modifications to your posts. After reading almost every shipping post that comes up from searching I am amazed at your patience in responding again and again.

  4. #154
    Join Date
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    All I seem to do is ask questions!

    I need table rate shipping for products ID 15 and 16

    Thanks

  5. #155
    Join Date
    Jun 2007
    Posts
    271
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Brismods View Post
    Guys, I'm hoping you're able to help us out with this one. We're trying to do something similar to those at the start of the thread. I've tried several different codes etc. and haven't had any luck..........

    The only way I can think to do this is to make it so all other shipping options turn off when a product from one of those categories is in the cart. If someone knows an easy way of doing this without changing ever single shipping file maybe they can chime in.

    Would you be able to at least do what I just described or did you try and it didn't work?

    -lindasdd

  6. #156
    Join Date
    Nov 2007
    Location
    Virginia
    Posts
    56
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I am having a similar problem. It seems someone out there may have a solution but I'm new to PhP and may be missing it. Here goes.

    In simple terms I want to code products and product categories so that only certain shipping options appear for each.

    For example.

    I have a group of products that drop ship directly to the customer but they are from different sources. One will only use UPS. The other will use ups and USPS.

    I would like the shipping options on the items that will only go UP to only show UPS (and calculate) while the others give the choice between UPS and USPS.

    Can that be done easily tor does someone have a better solution for coding shipping for products based on source and varying dropship fees.
    Last edited by agentx; 1 Nov 2009 at 08:11 PM. Reason: forgot to subscribe to the post

  7. #157
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    You could test the cart and if there is a product that only goes UPS then disable the USPS shipping module ...

    To check for how many of a specific products_id is in the cart, such as products_id 15, you can use:
    Code:
    global $cart;
    $chk_products15 = $_SESSION['cart']->in_cart_check('products_id','15');
    You can then control the $this->enabled based on the results ...
    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 ...

  8. #158
    Join Date
    Nov 2007
    Location
    Virginia
    Posts
    56
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I tried that but I must be doing soemthing worng i guess.

    If I have both the UPS and USPS shipping modules on then they appear as options for ALL the items in my store. I cannot find a way to have some items just USPS and some both USPS and UPS.

    There is nothing in the product or category area that lets me disable the shipping modules by category or product.

  9. #159
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    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',
    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 ...

  10. #160
    Join Date
    Sep 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by lindasdd View Post
    The only way I can think to do this is to make it so all other shipping options turn off when a product from one of those categories is in the cart. If someone knows an easy way of doing this without changing ever single shipping file maybe they can chime in.

    Would you be able to at least do what I just described or did you try and it didn't work?

    -lindasdd
    I'm not exactly the greatest when it comes to this sort of stuff. We previously had tried a few of the other solutions posted in the thread. For example there was one where we posted the code into the file, but it needed to be duplicated for the different categories, however when more than one copy of the code was in the file, the codes would seemingly clash and not work at all.

 

 
Page 16 of 53 FirstFirst ... 6141516171826 ... 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
  •