Page 44 of 56 FirstFirst ... 34424344454654 ... LastLast
Results 431 to 440 of 552
  1. #431
    Join Date
    Sep 2011
    Posts
    81
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    i have zone name UK zone description UK local sales tax zone status is a green button.
    in details: country united kingdom zones all zones
    this is right?
    please can you help me understand this
    Shipping Table
    The shipping cost is based on the total cost or weight of items or count of the items. Example: 25:8.50,50:5.50,etc.. Up to 25 charge 8.50, from there to 50 charge 5.50, etc
    You can also use percentage amounts, such 25:8.50,35:5%,40:9.50,10000:7% to charge a percentage value of the Order Total

    25:8.50
    is the 25 the category id and the 8.50 the postage charge?

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

    Default Re: Different shipping methods for different categories

    No the that is setup to represent either the Price, Weight or Item count vs the Rate to charge it has nothing to do with Categories ...

    First, setup the Table Rate for what you want to charge based on weight ...

    Next, you can customize the code for how much to charge for the seeds, example if the seeds use master_categories_id 70, 76 and 78 the code in RED would add the extra charge of .90 to the shipping when they are in the cart:
    Code:
    // bof: charge .90 for master_categories_id 70, 76 and 78
        $extra_shipping = 0.00;
        $chk_cat = 0;
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','70');
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','76');
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','78');
        if ($chk_cat >= 1) {
          $extra_shipping = .90;
        }
    
        $this->quotes = array('id' => $this->code,
        'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
        'methods' => array(array('id' => $this->code,
        'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
        'cost' => $shipping + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) + $extra_shipping ) ));
        // eof: charge .90 for master_categories_id 70, 76 and 78
    
        if ($this->tax_class > 0) {
          $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
        }
    adding your Zone for the UK to the Table Rate table shipping module will then only allow the UK to checkout ...
    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. #433

    Default Re: Different shipping methods for different categories

    I have spent a good amount of time reading through all of the posts in this thread, and have tested several where what I want to happen almost works, but not quite. I am still perplexed as to how to use what has been posted for my particular case.

    Here is what I am trying to do, but a bit of detail on settings first:

    I have free shipping available for the lower 48 U.S. states for one category only. I created a zone for such, and installed the U.S.P.S. module for all others.

    The shipping modules I have enabled are:

    - Free Shipping Options with lower 48 states zone included.
    - FREE SHIPPING! without lower 48 states zone included
    - United Sates Postal Service

    What I am attempting to do is to have the U.S.P.S option not be displayed when the customer is from the lower 48 states and when the only items in the cart are from the one specific category, as items in that category will have free shipping. Only the free shipping option would be displayed. However, I do want both options (free shipping and U.S.P.S.) to be displayed if a customer from the lower 48 has selected an item from the free shipping category and another from a different category that does not.

    If a customer is from outside the 48 lower states, then only the U.S.P.S option is displayed (or FedEx if added), as free shipping is not available.

    Always Free Shipping is available to all only on gift certificates.

    I hope I'm making sense.

    Any guidance or suggestions would be greatly appreciated.

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

    Default Re: Different shipping methods for different categories

    Gift Certificates are no Always Free Shipping ...

    Mark them as:
    Product is Virtual: Yes, Skip Shipping Address
    Always Free Shipping: No, Normal Shipping Rules
    and make sure that the Product Model starts with:
    GIFT

    in caps ... and they will be treated as free shipping as they are a Virtual Product ...

    On the 1 Category that is Free Shipping for the US 48 do you have a weight on them for the Rest of the World?

    This can get complicated to reduce the weight for the US 48 only on the 1 category ...

    Do these Products in the US 48 Free Shipping Category only have weight on the products_weight or do they have weight on the Attributes too?
    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. #435

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    Gift Certificates are no Always Free Shipping ...

    Mark them as:




    and make sure that the Product Model starts with:
    GIFT

    in caps ... and they will be treated as free shipping as they are a Virtual Product ...

    On the 1 Category that is Free Shipping for the US 48 do you have a weight on them for the Rest of the World?

    This can get complicated to reduce the weight for the US 48 only on the 1 category ...

    Do these Products in the US 48 Free Shipping Category only have weight on the products_weight or do they have weight on the Attributes too?
    Thank you for the reply!

    I misspoke on the gift certificates. I just checked and I do have them as you suggest, and GIFT is also in all caps. Thanks!

    What I have in the 1 category I cited is weight on the products but not on the attributes (Attributes Controller).

    As to 'weight on them for the Rest of the World' I only entered the weight for each item under the Categories/Products listing.

    Using the code you posted on the first page of this thread works for what I was attempting to do, except that anyone not from the lower 48 states is not presented with any shipping options, just the statement that the product is not available to them.

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

    Default Re: Different shipping methods for different categories

    See if this works in the file:
    /includes/classes/shipping.php

    by adding the code in RED:
    Code:
      function calculate_boxes_weight_and_tare() {
        global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;
    
    // bof: allow 1 zone only for free shipping for 1 zone
        global $db, $order, $cart;
            $valid_zone_id = 21;
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = false;
                break;
              } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    // eof: allow 1 zone only for free shipping for 1 zone
    
          if ($check_flag == true) {
    // bof: reduce weight if Products are from master_categories_id 10 are in the cart
            global $order, $cart;
            $products = $_SESSION['cart']->get_products();
            $reduce_weight = 0;
            for ($i=0, $n=sizeof($products); $i<$n; $i++) {
              if ($products[$i]['category'] == 10) {
                $reduce_weight += $products[$i]['weight'];
              }
            }
    
    //echo 'reduce the weight! from: ' . $total_weight . '<br>';
            $total_weight = $total_weight - $reduce_weight;
    //echo 'reduce the weight! to: ' . $total_weight . '<br>';
    // eof: reduce weight if Products are from master_categories_id 10 are in the cart
          }
    
        if (is_array($this->modules)) {
    Set the Zone id for your US 48 for the:
    $valid_zone_id = 21;

    and set the 10 to the master_categories_id for the Products that are Free to the US 48 ...
    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. #437

    Default Re: Different shipping methods for different categories

    Thank you Ajeh!

    I made the suggested changes except for the "Set the Zone id for your US 48 for the:
    $valid_zone_id = 21;" line. I'm still trying to figure out which ID number was assigned to that specific zone. Only the name I used to create the zone (US48) is displayed when looking in the admin panel, not the corresponding ID#. I'll try the code once I figure it out.

  8. #438

    Default Re: Different shipping methods for different categories

    Okay, I was able to obtain US48 zone's id # via the database. I made the change to the shipping.php file, uploaded it, and tested adding items to the cart using a test US account and one from outside the US 48 zone.

    The US account still shows the USPS shipping option along with the free shipping option, so no change. What I would like is to only show the free shipping option.

    The outside the US 48 zone test account shows only the USPS shipping option, same as before, which is okay.

    I'm likely missing something simple though.

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

    Default Re: Different shipping methods for different categories

    Could we perhaps peek at your site and could you give us some of the products_id that are Free Shipping for the US and not for the Rest of the World?
    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!

  10. #440

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    Could we perhaps peek at your site and could you give us some of the products_id that are Free Shipping for the US and not for the Rest of the World?
    It's a new site actually, and still trying to get everything together before opening it up.

    I currently have free shipping to the lower 48 states only for one category. I am considering using free shipping for the other categories as well, though not sure about that yet.

    By the way, I removed/uninstalled the USPS module since the distributors I will be using do not use deliver via USPS (dropshipping). Instead, now I am trying out the other methods, like Flat Rate and Zone Rate, to see which one works best for my needs.

    In any case, it does not look as if I will need to make any code changes to the modules. What I had been trying to do before was to not show the USPS rates when free shipping was displayed for anyone in the lower 48 states, but that won't be an issue now.

    Thank you for all your help Ajeh! I have to say that you are a very friendly and very helpful person. I'm sure everyone here appreciates that!

 

 
Page 44 of 56 FirstFirst ... 34424344454654 ... 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