Results 1 to 10 of 31

Hybrid View

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

    Default Re: Mixed category shipping calculation

    Any reason you cannot make a Category for:
    Books Small (or some other useful name)

    then Link these books to the Books Category?

    Then a new calculation can be made for the shipping of these Products that would use the master_categories_id for the Books Small category as the trigger ...
    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 2014
    Location
    New Westminster, B.C. CANADA
    Posts
    34
    Plugin Contributions
    0

    Default Re: Mixed category shipping calculation

    Quote Originally Posted by Ajeh View Post
    Any reason you cannot make a Category for:
    Books Small (or some other useful name)

    then Link these books to the Books Category?

    Then a new calculation can be made for the shipping of these Products that would use the master_categories_id for the Books Small category as the trigger ...
    Do you mean if someone then goes into the books category they will then have a choice of Books Small, and other books?
    The snag is some regular books and the deluxe limited edition books are just different versions of the same book. I'd prefer to have them side by side rather than in different categories so someone can see them together and chose one or the other.

    With what you're suggesting could I have, for example, an All Books Category, and a Deluxe books Category, and then link the Deluxe books in the All Books Category so people could see everything together under All Books?
    Can you make a Category for, as per your example, Books Small, for shipping purposes, have them linked to the Books Category but not have the the separate Books Small Category visible on it's own as a choice, only have the items visible linked in the Books Category?

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

    Default Re: Mixed category shipping calculation

    You can do it that way, which is similar to your Post Cards category ... The Products are in their own Category, but then Linked to the All category ...

    Just make sure that the correct master_categories_id is set ...

    Once the books are arranged correctly, then the code can be adapted for the different shipping charge ...
    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 2014
    Location
    New Westminster, B.C. CANADA
    Posts
    34
    Plugin Contributions
    0

    Default Re: Mixed category shipping calculation

    Quote Originally Posted by Ajeh View Post
    You can do it that way, which is similar to your Post Cards category ... The Products are in their own Category, but then Linked to the All category ...

    Just make sure that the correct master_categories_id is set ...

    Once the books are arranged correctly, then the code can be adapted for the different shipping charge ...
    Okay, I think I've got it, just one more question hopefully.
    For adapting the code for a new master_category_id, I'm guessing I can go in the categoriesitem.php
    and copy one of the other specific charges you set up (such as books below), and modify it for the new category?


    // bof: calculate books shipping cost
    $chk_cat = '75'; // parent or main categories_id for books
    $chk_cart = 0;
    if (!zen_has_category_subcategories($chk_cat)) {
    // if $chk_cat has no subcategories and has products
    $chk_cat_products = zen_get_categories_products_list($chk_cat, false, false);
    $chk_cat_products_id_list += zen_get_categories_products_list($chk_cat);
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id', $chk_cat);
    } else {
    // if $chk_cat has subcategories and has products
    $subcategories_array = array();
    zen_get_subcategories($subcategories_array, $chk_cat);
    for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
    $chk_cat_products_id_list += zen_get_categories_products_list($subcategories_array[$i]);
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id', $subcategories_array[$i]);
    }
    }
    //1 = 17.50, 2 = 17.50 + .75, 3 = 17.50 + 1.50, 4 = 17.50 + 2.25
    //17.50 per book + .75 for each book over 1
    $ship_books = ($chk_cart > 0 ? 17.50 + (($chk_cart-1) * 0.75) : 0);
    //echo 'Books in Cart: ' . $chk_cart . ' shipping: ' . $ship_books . '<br>';
    // eof: calculate books shipping cost

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

    Default Re: Mixed category shipping calculation

    Yes, the idea is if you copy that chunk of code that addresses this for the one shipping charge for the original Book rule and make a new Book rule 2 with a different master_categories_id then it should work ...

    Keep in mind you are using: $ship_books

    then new Book 2 rule should have its own variable such as $ship_books2 (or some smart name) then be initialized below:
    Code:
          $ship_books = 0;
    and then added to the total shipping cost for $total_shipping_costs:
    Code:
          // final shipping costs calculated above plus Undefined Products
          $total_shipping_costs = $ship_postcards + $ship_books + $ship_prints + ($chk_undefined_products_cnt * MODULE_SHIPPING_CATEGORIESITEM_COST);
    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!

 

 

Similar Threads

  1. mixed no shipping and per item shipping on same order
    By MDIWade in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 25 Jul 2011, 05:08 AM
  2. Mixed Shipping Rate in Same Order
    By rstar23 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 6 Sep 2010, 03:26 PM
  3. Shipping Estimator: USPS shipping and mixed download/physical products
    By lat9 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Nov 2009, 03:04 PM
  4. Mixed shipping
    By discodancer in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 13 Oct 2008, 11:49 PM
  5. Shipping calculation different for category
    By desireco in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 18 Jul 2008, 02:29 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