Results 1 to 10 of 52

Hybrid View

  1. #1
    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!]
    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!

  2. #2
    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.

  3. #3
    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!]
    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!

  4. #4
    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?

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

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

    Hit PrntScrn ... now paste that into an image program as a new 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!]
    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!

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

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

    It is doing something wrong. It is showing 0.00 dollar as the best way for shipping. It has these lines on the shopping cart screen below the ;back to shopping' button:

    CARDS: 0 = 1.05


    HOTWHEELS: 0 = 1.56


    SHOES: 0 = 11.56


    CARDS: 0 = 1.05


    HOTWHEELS: 0 = 1.56


    SHOES: 0 = 11.56


    Do I need to do something to the table rate or something else???? I have nothing in the table rate box because I don't know what to put in it. I am not sure what should be in place for this to work.

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

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

    print screen button alone is not working, don't I need to push something else at the same time??

  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???

    For now, this is fine ... we are just looking for counts ...

    Now add 1 Hot Wheel ... 1 Card ... and 1 Shoes ...

    Now test the amounts displayed by raising the Hot Wheels to 2, then 3, then 4, then 5 ... all the way to 20 ... are the rates right for the Hot Wheel?

    Do the same on the Cards ...

    I don't know if the shoes will work with this formula, as it sounds like you want a different formula for them ... but try it for fun ...
    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. #9
    Join Date
    Oct 2009
    Posts
    131
    Plugin Contributions
    0

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

    No, nothing is increasing when I add any amount of any item. The shipping still says 0.00. I have a screenshot now. How should I get it to you? I think if you see what it is doing, it will definitely help. I know what I am seeing is not right, but I need you to see it so you know what to do with it.

 

 

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

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