Results 1 to 10 of 52

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

    Default Help with different shipping rates for first and additional items???

    Alright, I have checked the forum over as much as I can tolerate looking for the exact answer I need. I sell baseball cards, Hot Wheels, and Shoes. All of these have such drastically different weights that I cannot come up with a table rate by myself that would accomodate all of them without charging incorrectly for something.

    One baseball card is $1.22 for S&H. A customer could add up to 4 more cards for that to go up $1.39 (I add .17 to the 1.22 for the one ounce increase in weight). Now here is where it gets tricky.

    One hot wheels costs $2.07 for S&H and adding one more jumps that to 2.58 (I add .51 to the 2.07 for the three ounce increase in weight).

    One pair of shoes is 11.57 for S&H. Adding a second pair goes up to 13.03 (I add 1.46 to the 11.57 for the two pound increase in weight).

    Now we can all see that I can't just set up a table rate that will satisfy all of these different weights and spaces between first and second items. I tried different mathematical solutions, but all have failed and I am now here to find someone that actually knows what is more about Zen Cart instead of me just guessing. Any help will get my head to stop pounding. Thanks ahead of time!!

    Kristofer Benham

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

    Default Re: Help with different shipping rates for first and additional items???

    This is based on counting the Products based on the master_categoriesid being the indicator for:
    Cards master_categories_id 10
    Hot Wheels master_categories_id 15
    Shoes master_categories_id 12

    What this does is break out the number of items sold and using the rates build the charges ...

    I did get a bit lost on shoes as you went from count to weight, but this might give you some ideas ...

    I just tossed this in the table.php shipping module just above the code that reads:
    $this->quotes = array('id' => $this->code,

    so that I could see the results without a lot of work ...

    Code:
    global $cart;
      $cnt_cards = $_SESSION['cart']->in_cart_check('master_categories_id','10');
      $card_ship = ceil($cnt_cards/4) * .17;
      $card_ship = $card_ship+ 1.05;
    
      $cnt_hotwheels = $_SESSION['cart']->in_cart_check('master_categories_id','15');
      $hotwheels_ship = ceil($cnt_hotwheels/4) * .51;
      $hotwheels_ship = $hotwheels_ship+ 1.56;
    
      $cnt_shoes = $_SESSION['cart']->in_cart_check('master_categories_id','12');
      $shoes_ship = ceil($cnt_shoes/4) * 1.46;
      $shoes_ship = $shoes_ship+ 11.56;
      echo '<br><br>CARDS: ' . $cnt_cards . ' = ' . $card_ship . '<br>';
      echo '<br><br>HOTWHEELS: ' . $cnt_hotwheels . ' = ' . $hotwheels_ship . '<br>';
      echo '<br><br>SHOES: ' . $cnt_shoes . ' = ' . $shoes_ship . '<br>';
    Now I add a Product from each of the 3 categories and change the quantities ...
    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.5]
    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. #3
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

    Default Re: Help with different shipping rates for first and additional items???

    I tried what you had in the box and put it where you wanted me to. It did not work on my site. If I knew how to capture a screen shot, I would have. It changed the screen by lowering the store page to the lower left corner of the screen and entered three lines of text above the top of the Benham Collectibles logo that had to do with the prices for each category. It looked really weird. So I took it out and it went back to normal. Any other ideas? Basically I have three drastically different package sizes and can't use the tare, the perunitweight, zone or the table features. I am at a loss for what else can be done for a script because I know nothing about php or any other programming language. I do appreciate you trying to help me. I feel so confused on what to do.

    Kristofer

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

    Default Re: Help with different shipping rates for first and additional items???

    Are the 3 Products in 3 different Categories or many categories?

    What I was trying to do was find something common about them that could be tested when added to the shopping cart to know how many of each are in the cart to build a formula to calculate the shipping ...

    On the Shoes, if you only sold shoes ... would you be able to use UPS or USPS for the shipping based on weight?

    The idea that comes to mind here is to calculate the shipping for the Cards and Hotwheels different, as you say weight does not work for you ... and since Shoes are heavier, maybe weight does work for them ...
    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.5]
    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. #5
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

    Default Re: Help with different shipping rates for first and additional items???

    You're on the same track that I was on now, Ajeh. I was also trying to find a common thread among the three categories. Yes, those three examples are three categories. There will be more, but I can learn from anything you figure out and copy what you do now to any other additonal categories later.

    I am not interested in using the real time USPS setup that is provided if that is what you were talking about and I don't use UPS to ship any of my small items, too much money.

    I actually do use weight to figure all of my shipping. I think some confusion may have come earlier when you thought I was using count on the two smaller categories and weight on the shoes. I do actually use weight, ounces for cards and hot wheels and pounds for shoes. That is why it seemed to be such a difference. I kept typing 17¢. That is the USPS First Class price for an additional ounce on a package in the 1-13 ounce range. If anything is bigger, it goes to pounds and gets thrown to the Parcel Post scale which is much higher in price.

    For the last 3 hours I have been trying to figure out how many cards a pair of shoes weighs just trying to find a common number to use for all, but I could not. This is because all three products have a different "first item weights". Cruising around on the web in just ran into something very close to what I would like. I will see if I can get the link in here:

    http://www.github.com/BDQ/spree-flexi-rate-shipping

    If this doesn't hyperlink, I apologize. The whole page pretty much explains perfectly what I would like. If you scroll down to the Examples section, you can see a chart that is almost exactly what I need. One big problem is I am hosted at GoDaddy and they don't support Ruby on Rails. I am just hoping that this may give you a better visual idea of what I am looking for. I have seen on these Zen boards that alot of other people are looking for the same thing. Let me know if this helps or if I need to keep at it. I know this is tough, but I am hoping that you see it as a challenge that you can overcome and use in the future for others that need help. Thanks again, Ajeh.

    Kristofer Benham

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

    Default Re: Help with different shipping rates for first and additional items???

    The reason I suggested throw that code in with the table.php is that when you check shipping, it would echo the results ...

    What that is doing is counting how many products are in those categories based on the master_categories_id ...

    Go look at your products and get the master_categories_id for a Card, Hot Wheel and Shoes Product ...

    Then we can set this up so you can see how this works ...

    Once we get the pattern, I think you will be able to charge the way you want to on shipping ... it just takes a bit to get the hang of it ...
    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.5]
    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. #7
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

    Default Re: Help with different shipping rates for first and additional items???

    I am pretty sure that the ID's you need are:

    Baseball Cards 9
    Hot Wheels 10
    Shoes 11

    Unless there is a number I am missing, these are what you need.

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

    Default Re: Help with different shipping rates for first and additional items???

    Let's try to test this ...

    What will happen is when you look at Shipping Estimator or the checkout_shipping ... you will see it echo out the counts or Products in these categories_id where the Products use the matching master_categories_id ...

    Edit the file:
    /includes/modules/shipping/table.php

    and change the function quote with this new code:
    Code:
      /**
       * Enter description here...
       *
       * @param unknown_type $method
       * @return unknown
       */
      function quote($method = '') {
        global $order, $shipping_weight, $shipping_num_boxes, $total_count;
    
        // shipping adjustment
        switch (MODULE_SHIPPING_TABLE_MODE) {
          case ('price'):
            $order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
            break;
          case ('weight'):
            $order_total = $shipping_weight;
            break;
          case ('item'):
            $order_total = $total_count - $_SESSION['cart']->free_shipping_items();
            break;
        }
    
        $order_total_amount = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
    
        $table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST);
        $size = sizeof($table_cost);
        for ($i=0, $n=$size; $i<$n; $i+=2) {
          if (round($order_total,9) <= $table_cost[$i]) {
            if (strstr($table_cost[$i+1], '%')) {
              $shipping = ($table_cost[$i+1]/100) * $order_total_amount;
            } else {
              $shipping = $table_cost[$i+1];
            }
            break;
          }
        }
    
        if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
          $shipping = $shipping * $shipping_num_boxes;
          // show boxes if weight
          switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
            case (0):
            $show_box_weight = '';
            break;
            case (1):
            $show_box_weight = ' (' . $shipping_num_boxes . ' ' . TEXT_SHIPPING_BOXES . ')';
            break;
            case (2):
            $show_box_weight = ' (' . number_format($shipping_weight * $shipping_num_boxes,2) . TEXT_SHIPPING_WEIGHT . ')';
            break;
            default:
            $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . TEXT_SHIPPING_WEIGHT . ')';
            break;
          }
        }
    
    
    global $cart;
      $cnt_cards = $_SESSION['cart']->in_cart_check('master_categories_id','9');
      $card_ship = ceil($cnt_cards/4) * .17;
      $card_ship = $card_ship+ 1.05;
    
      $cnt_hotwheels = $_SESSION['cart']->in_cart_check('master_categories_id','10');
      $hotwheels_ship = ceil($cnt_hotwheels/4) * .51;
      $hotwheels_ship = $hotwheels_ship+ 1.56;
    
      $cnt_shoes = $_SESSION['cart']->in_cart_check('master_categories_id','11');
      $shoes_ship = ceil($cnt_shoes/4) * 1.46;
      $shoes_ship = $shoes_ship+ 11.56;
      echo '<br><br>CARDS: ' . $cnt_cards . ' = ' . $card_ship . '<br>';
      echo '<br><br>HOTWHEELS: ' . $cnt_hotwheels . ' = ' . $hotwheels_ship . '<br>';
      echo '<br><br>SHOES: ' . $cnt_shoes . ' = ' . $shoes_ship . '<br>';
      
        $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)));
    
        if ($this->tax_class > 0) {
          $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
        }
    
        if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
    
        return $this->quotes;
      }
    Again, it will look messie ... we care about the counts based on what you put in your cart ...

    Don't worry about the quote yet ... first let's see if this identifies the number of Products in the cart for each of the 3 kinds ...
    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.5]
    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. #9
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

    Default Re: Help with different shipping rates for first and additional items???

    How do I do a screen shot?

 

 

Similar Threads

  1. v154 USPS not showing First Class shipping rates for small items
    By andilyn in forum Addon Shipping Modules
    Replies: 1
    Last Post: 15 Apr 2015, 03:58 AM
  2. Help with additional items shipping rates
    By BenhamCollectibles in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 23 Oct 2009, 05:03 AM
  3. need some help with different shipping carriers for particular items
    By ams30gts in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 2 Jun 2009, 04:11 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR