Thread: shipping scheme

Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2009
    Posts
    10
    Plugin Contributions
    0

    Default shipping scheme

    ZC 1.5.0

    I have tried finding an answer to my question, and will be deeply shamed if someone points out that my question has already been answered.

    My boss sells t-shirts, short sleeve and long sleeve

    For shipping the first shirt is $5 for short sleeve, and all additional short sleeved shirts are $1 extra each.
    The first long sleeve shirt is $7 to ship, and all additional long sleeve shirts are $2 extra each.
    If the order has both long and short then the long sleeve is the first shirt.

    Example orders:
    2 short sleeve shirts: total shipping $6 (5+1)
    3 short sleeve shirts: total shipping $7 (5+1+1)
    4 short sleeve shirts: total shipping $8 (5+1+1+1)

    2 long sleeve shirts: total shipping $9 (7+2)
    3 long sleeve shirts: total shipping $11 (7+2+2)
    4 long sleeve shirts: total shipping $13 (7+2+2+2)

    3 short sleeve and 1 long sleeve: total shipping $10 (7+1+1+1)
    2 short sleeve and 2 long sleeve: total shipping $11 (7+2+1+1)
    1 short sleeve and 1 long sleeve: total shipping $8 (7+1)

    4 long sleeve shirts and 1 short sleeve shirt: total shipping $14 (7+2+2+2+1)

    Anyone have any idea on how to accomplish this?

    Ray

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: shipping scheme

    How do you identify the Short Sleeve vs the Long Sleeve shirts?
    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 ...

  3. #3
    Join Date
    Jun 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: shipping scheme

    Quote Originally Posted by Ajeh View Post
    How do you identify the Short Sleeve vs the Long Sleeve shirts?
    Each shirt is individually identified in the store.

    http://shirtcircuitinc.com

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: shipping scheme

    Pretend I know nothing about your site and have no clue how to navigate in there ...

    What is identifying Long Sleeve vs Short Sleeve shirts?

    All I see is some text that sometimes says short but nothing that really flags the Product as being long or short sleeve ...

    What about the other Products that do not seem to say long or short sleeve?
    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 ...

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: shipping scheme

    You could use the Product Weight to control this ...

    Set the Product Weight for Short Sleeve to 5.1 ...

    Set the Product Weight for Long Sleeve to 7.2 ...

    Customize the Flat Rate flat shipping file:
    /includes/modules/shipping/flat.php

    with the code in RED:
    Code:
    // class methods
        function quote($method = '') {
          global $order;
    
    // bof: calculate shipping
    $chk_short = 0;
    $chk_long = 0;
    $ship_charge = 0.00;
    $chk_short = $_SESSION['cart']->in_cart_check('products_weight','5.1');
    $chk_long = $_SESSION['cart']->in_cart_check('products_weight','7.2');
    
    switch (true) {
      case ($chk_short > 0 && $chk_long == 0):
        $ship_charge = 5.00 + (($chk_short -1) * 1);
        break;
      case ($chk_long > 0 && $chk_short == 0):
        $ship_charge = 7.00 + (($chk_long -1) * 2);
        break;
      case ($chk_short > 0 && $chk_long > 0):
        $ship_charge = 7.00 + (($chk_long -1) * 2) + (($chk_short) * 1);
        break;
    }
    
    echo 'Comment out echos to not see them ...' . '<br>';
    echo 'Short: ' . $chk_short . '<br>';
    echo 'Long: ' . $chk_long . '<br>';
    echo 'Shipping: ' . $ship_charge . '<br>';
    
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => $ship_charge)));
    // eof: calculate shipping
    
          if ($this->tax_class > 0) {
    After testing, you can comment out the echo section with two // in front of each of the 4 lines starting with echo ...
    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 ...

  6. #6
    Join Date
    Jun 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: shipping scheme

    Quote Originally Posted by Ajeh View Post
    Pretend I know nothing about your site and have no clue how to navigate in there ...

    What is identifying Long Sleeve vs Short Sleeve shirts?

    All I see is some text that sometimes says short but nothing that really flags the Product as being long or short sleeve ...

    What about the other Products that do not seem to say long or short sleeve?
    ===

    Each shirt is identified as SS or LS, which is short hand for Short Sleeve and Long Sleeve.

    Each individual shirt is identified as either SS (Short Sleeve) or LS (Long Sleeve).

    If you select a shirt to order, it is either one or the other. There is no confusion except in the sense of the shorthand. In the many years of using this shorthand, there has never been to my knowledge any confusion on the part of the customer as to which sleeve length they are ordering.

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

    Default Re: shipping scheme

    Trying to dig through the description is difficult ...

    Using the Product Weight as the code for this is much easier, as I showed you in the code for this above ...
    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. #8
    Join Date
    Jun 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: shipping scheme

    I have modified flat.php as you indicated below.

    I have set Flat Rate Shipping Module as my only shipping method.

    Do I set the "Shipping Cost" ? If so, what do I set it to?

    I think I had it set to $5.00 before, and that is what it shows now, but I do not know if it is now being controlled by the change in flat.php.

    P.S. I see your point regarding your comment about the shirt sizes not being clear. It has made me plan to change the descriptions to be more verbose. First, I have to go back to each shirt and set the correct weight.

    Thank you for your help.


    Quote Originally Posted by Ajeh View Post
    You could use the Product Weight to control this ...

    Set the Product Weight for Short Sleeve to 5.1 ...

    Set the Product Weight for Long Sleeve to 7.2 ...

    Customize the Flat Rate flat shipping file:
    /includes/modules/shipping/flat.php

    with the code in RED:
    Code:
    // class methods
        function quote($method = '') {
          global $order;
    
    // bof: calculate shipping
    $chk_short = 0;
    $chk_long = 0;
    $ship_charge = 0.00;
    $chk_short = $_SESSION['cart']->in_cart_check('products_weight','5.1');
    $chk_long = $_SESSION['cart']->in_cart_check('products_weight','7.2');
    
    switch (true) {
      case ($chk_short > 0 && $chk_long == 0):
        $ship_charge = 5.00 + (($chk_short -1) * 1);
        break;
      case ($chk_long > 0 && $chk_short == 0):
        $ship_charge = 7.00 + (($chk_long -1) * 2);
        break;
      case ($chk_short > 0 && $chk_long > 0):
        $ship_charge = 7.00 + (($chk_long -1) * 2) + (($chk_short) * 1);
        break;
    }
    
    echo 'Comment out echos to not see them ...' . '<br>';
    echo 'Short: ' . $chk_short . '<br>';
    echo 'Long: ' . $chk_long . '<br>';
    echo 'Shipping: ' . $ship_charge . '<br>';
    
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => $ship_charge)));
    // eof: calculate shipping
    
          if ($this->tax_class > 0) {
    After testing, you can comment out the echo section with two // in front of each of the 4 lines starting with echo ...

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

    Default Re: shipping scheme

    The Rate on the Flat Rate flat shipping module is no longer used on this code ...

    You can test that by changing the amount to 7.50 and see if that is reflected in the code ...

    Currently, if you have the echos still displaying, you should see the matching amounts to the Flat Rate shipping cost, example, on 1 long sleeve you would see:
    Comment out echos to not see them ...
    Short: 0
    Long: 1
    Shipping: 7
    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. #10
    Join Date
    Jun 2009
    Posts
    10
    Plugin Contributions
    0

    Default Re: shipping scheme

    Again, good to know information. And regarding displaying the output information, I commented out the first line, but left the other 3. Thanks.



    Quote Originally Posted by Ajeh View Post
    The Rate on the Flat Rate flat shipping module is no longer used on this code ...

    You can test that by changing the amount to 7.50 and see if that is reflected in the code ...

    Currently, if you have the echos still displaying, you should see the matching amounts to the Flat Rate shipping cost, example, on 1 long sleeve you would see:

 

 

Similar Threads

  1. Reward Scheme
    By tinaw in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Jan 2010, 03:18 PM

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
  •