Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Flat shipping query

    Hi.

    I have two shipping prices on my shop.
    Anything is £5.95 shipping
    But products that are only £1 should have £1 shipping
    Is there any way to achieve this?

    (I'm comfortable editing code)

    Regards,
    Denver

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

    Default Re: Flat shipping query

    If this is based on Product Quantity * 5.95 or 1.00 depending on the Product, you could use the Per Unit perweightunit where you set the Product Weight to be the actual shipping charge, as in this case, either 5.95 or 1.00 and set in the Configuration ... Shipping/Packaging ... the Maximum Weight to 5000 and the Tare Rates to 0:0 ...
    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. #3
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Re: Flat shipping query

    Hi

    I have done this, but now whenever I view my cart with 2 or more products in it and estimate the shipping, it ends up with X * 5.95 or X * 1.00.
    The desired shipping should be either 1.00 or 5.95 whether 1 product or 200

    I have looked about in the admin panel and googled a little but still unable to find a solution

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

    Default Re: Flat shipping query

    What should happen if I have 1 Product that should be $1.00 shipping and 1 Product that should be $5.95 shipping in the order?

    What should happen if I have 5 Product that should be $1.00 shipping and 1 Product that should be $5.95 shipping in the order?

    What should happen if I have 1 Product that should be $1.00 shipping and 5 Product that should be $5.95 shipping in the order?
    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. #5
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Re: Flat shipping query

    1) $5.95 (preferred) - $6.95 (acceptable)
    2) $5.95 (preferred) - $6.95 (acceptable)
    3) $5.95 (preferred) - $6.95 (acceptable)

  6. #6
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Re: Flat shipping query

    The $1.00 shipping should only be applied if all items in the cart are $1.00

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

    Default Re: Flat shipping query

    Here is the plan ...

    Still use the Product Weight of 1.00 to 5.95 to indicate the shipping charge on Products ...

    To charge either $1.00 or $5.95 or $6.95 based regardless of quantity use the Per Item item shipping module and add the code in RED:
    Code:
    // class methods
        function quote($method = '') {
          global $order, $total_count;
    
    // bof: charge $1 or $5.95 or $6.95
    $chk_1 = $_SESSION['cart']->in_cart_check('products_weight','1');
    $chk_595 = $_SESSION['cart']->in_cart_check('products_weight','5.95');
    $new_shipping = 0;
    if ($chk_1 > 0) {
      $new_shipping = 1;
    }
    if ($chk_595 > 0) {
      $new_shipping += 5.95;
    }
    
    //echo 'Products for 1 lb: ' . $chk_1 . '<br>';
    //echo 'Products for 5.95 lb: ' . $chk_595 . '<br>';
    //echo 'New shipping charge: ' . $new_shipping . '<br>';
    
          // adjusted count for free shipping
          $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items();
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                         'cost' => $new_shipping + MODULE_SHIPPING_ITEM_HANDLING)));
    // eof: charge $1 or $5.95 or $6.95
    
          if ($this->tax_class > 0) {
    If you decide you do not want the $6.95 charge if both 1.00 and 5.95 is in the cart and just want $5.95, then remove the + on this line:
    Code:
      $new_shipping = 5.95;
    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!

  8. #8
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Re: Flat shipping query

    That part works fine, however (you're bound to hate me right now)
    These two lines:
    $chk_1 = $_SESSION['cart']->in_cart_check('products_weight','1');
    $chk_595 = $_SESSION['cart']->in_cart_check('products_weight','5.95');


    need to be:
    $chk_1 = $_SESSION['cart']->in_cart_check('products_attributes_weight','1');
    $chk_595 = $_SESSION['cart']->in_cart_check('products_attributes_weight','5.95');


    as each product has two entries in the products_attributes table.
    I've attempted to make the necsessary changes to includes/classes/shopping_cart.php but it just comes up with an error

    Code:
    Line 1539: $product_check = $db->Execute("select " . $check_what . " as check_it from ".TABLE_PRODUCTS_ATTRIBUTES." where products_id='" . $testing_id . "' limit 1");
    Error:
    WARNING: An Error occurred, please refresh the page and try again

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

    Default Re: Flat shipping query

    Yes ... I hate you ...

    When I get some time later on tonight I will work out a new way to do this for you ... meanwhile, don't break the shopping_cart class as there are other things that may be using the function ...
    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. #10
    Join Date
    Mar 2013
    Location
    Portadown, United Kingdom
    Posts
    16
    Plugin Contributions
    0

    Default Re: Flat shipping query

    Blame my boss, not me

    I'll revert all the changes I made and thank you for all your time :)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139e Combine Flat Rate shipping and shipping cost based on weight
    By dang in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 13 Nov 2012, 05:45 PM
  2. Flat shipping in US by price, per item shipping everywhere else?
    By johncvrg in forum Managing Customers and Orders
    Replies: 1
    Last Post: 19 Mar 2010, 09:54 PM
  3. free shipping defualt plus courier shipping (flat rate)
    By snukos.eu in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Mar 2010, 04:53 AM
  4. Flat rate shipping per item with shipping & handling
    By FlameAngel in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 8 Jan 2008, 05:43 PM
  5. Custom Flat Shipping Rates and Shipping Method Titles
    By clifford in forum Built-in Shipping and Payment Modules
    Replies: 17
    Last Post: 16 Nov 2007, 09:33 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