Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Shipping Problem

    I hope someone can answer this.

    I am using table rate shipping when adding products to the shopping cart. I have two tables, one set up for First Class Post and one set up for Royal Mail Track and Trace. For most products it is ok to show both shipping options, however we have just discovered that certain items require special insurance as they are flammable products. The insurance has already been added onto the prices of these products so not a problem there and it doesn't affect the shipping price. But on items where insurance has been applied to the price I need to be able to display Royal Mail Track and Trace only as a shipping option. All other products will display both First Class Post and Royal Mail Track and Trace, it is only the flammable items where I need to disable the First Class Post. So how would I go about doing this?

    I have seen similar posts but none of them really fit.

    This one is close

    http://www.zen-cart.com/forum/showthread.php?t=175429


    But ideally I would like to be able to control it from the admin as not all products are listed yet so I don't know what the product ID's or Category ID's will be for each flammable product so I don't know which one's need to have First Class Post Disabled on.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

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

    Default Re: Shipping Problem

    You could use something like this code, for example say you were customizing the:
    /includes/modules/shipping/flat.php

    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
          }
    
    // bof: skip certain products_id and disable they are in the cart
          if (IS_ADMIN_FLAG == false) {
            global $cart;
            $chk_skip_products = 0;
            $chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','1');
            $chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','38');
            $chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','39');
            if ($chk_skip_products > 0) {
              $this->enabled = false;
            }
          }
    // eof: skip certain products_id and disable they are in the cart
    
    You can add more or less products_id by copying the pattern ...
    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
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Shipping Problem

    Thanks Linda, could this be developed to work from the admin?

    So that instead of hard coding we could choose the postage type from something like a dropdown menu?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

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

    Default Re: Shipping Problem

    Yes ... this could be written to add a new field such as:
    products_shipping

    and then that could be tested for the value to see how many are in the cart of a given value to then be used to control the shipping modules ...

    All you have to do is add the new field to the products table and then customize the code in the Admin to access that field to aa/edit etc. and then customize the shipping modules to test for it ...

    Easy smeazy, eh?
    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
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Shipping Problem



    Er yes I guess so, but how would I write the code to do this? I know the zen code but will be honest and say I'd struggle on this to write from scratch. But could do this as a Mod for other users if I could get it to work with your help?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #6
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Shipping Problem

    Hi Linda, how would I go about writing the code to connect this up to the admin, what files would I need to edit and do you have any idea of the code I would need to do this?

    Thank You

    Nick
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

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

    Default Re: Shipping Problem

    I would have to write the whole set of code to be able to tell you everything from adding the new field to using it in the shipping modules as the test ...

    For adding a new field, find one such as the field:
    product_is_always_free_shipping

    and trace its use in the Admin with the Tools ... Developers Tool Kit ... to see how it is used for all of the modules on a Product for adding/editing ...
    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
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Shipping Problem

    ok, not sure I have time to develop something like that at the moment. But been having a think about a way to do this quick and easy.

    If I had a category with two sub categories like this

    Chemicals > Flammable

    Chemicals > Non Flammable

    Could I use the code you gave me earlier in this thread to assign the correct postage to the correct category > sub category?

    Nick
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

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

    Default Re: Shipping Problem

    You can test the cart based on either products_id or based on master_categories_id in an easy manner ...

    Do the Products in the Flammable Category all use that categories_id as their master_categories_id value?
    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
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Shipping Problem

    That would be correct, the categories would be broken down like this:

    Chemicals (master category) > Flammable (sub category)

    Chemicals > Non Flammable

    Controllers (master category) > Flammable (sub category)

    Controllers > Non Flammable

    Dosing Systems (master category) > Flammable (sub category)

    Dosing Systems > Non Flammable

    Pumps (master category) > Flammable (sub category)

    Pumps > Non Flammable

    Tanks, Bunds and Accessories (master category) > Flammable (sub category)

    Tanks, Bunds and Accessories > Flammable

    Water Testing (master category) > Flammable (sub category)

    Water Testing > Non Flammable

    General Spares (master category) > Flammable (sub category)

    General Spares > Non Flammable

    Safety Equipment (master category) > Flammable (sub category)

    Safety Equipment > Non Flammable


    So in effect the sub category would be the master category for those products beneath the top level master category if that makes sense.


    Non-Flammable would be first class post

    Flammable would be Royal Mail Track and Trace

    This is the website http://www.jakwater.co.uk for reference bearing in mind I haven't made up the above sub categories yet.

    Something else, if a customer comes along and purchases a product that is Non flammable and then another item that is flammable then the cart would need to be intelligent enough to realise that the non flammable product would go at the flammable postage rate which would be royal mail track and trace.
    Last edited by Nick1973; 15 Dec 2011 at 06:20 PM. Reason: Spelling Errors
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. v154 shipping problem concerning shipping bij weight unit
    By cj.dekrijger in forum Built-in Shipping and Payment Modules
    Replies: 38
    Last Post: 22 Nov 2015, 09:45 AM
  2. Replies: 1
    Last Post: 16 Apr 2012, 08:05 PM
  3. Free Shipping/Shipping Estimator problem
    By willieWontGo in forum Built-in Shipping and Payment Modules
    Replies: 13
    Last Post: 5 Dec 2009, 03:17 AM
  4. "Not Shipping to your region" problem - Shipping Estimator
    By hnchew in forum Addon Shipping Modules
    Replies: 0
    Last Post: 28 Dec 2006, 04:54 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