Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31
  1. #11
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: perweightunit issue

    Quote Originally Posted by Ajeh View Post
    If you knew you wanted Category A to have shipping costs of:
    $4.95 * quantity ...

    and then the rest of the shop to be based on the Per Unit perweightunit shipping module ... that could be done with a calculation added to the Per Unit perweightunit shipping module ...

    If the 1 Category could be done by USPS ... why can't the rest of the Products?
    apparently i am not clarifying very well. all of the products that are in category 1 fit perfectly into the usps large flat rate box, by themselves. if someone wants to buy multiple quantities, or would rather use ups, i want the calculated shipping for ups, and usps to remain as an option.

    all i want, is the large flat rate box to be exclusive to shopping carts that only contain products from category 1.

    at this point, i don't sell anything that won't fit into those boxes, but i plan on it in the near future, which is why i am trying to do this now.

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

    Default Re: perweightunit issue

    Try to picture this ...

    If all Products in the Category 1 are 1 per box for $4.95 ... and are setup with 0 weight ...

    and if all other Products not in Category 1 have their shipping cost in the Product weight field ...

    You can then customize the Per Unit perweightunit that works for everything else to count how many Products are from categories_id via the master_categories_id of the Product and multiply them by 4.95 and add them to the cost calculated by the Per Unit perweightunit shipping module ...

    So if I buy 1 Product A which is in Category 1 and 3 of Product D which is in Category 1 I would have 4*4.95 ... then whatever the Per Unit perweightunit is currently calculating is added to this amount ...

    Would that be the correct calculation?
    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. #13
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: perweightunit issue

    that would work.

    i still would like to use ups, and usps shipping modules, because when a customer orders multiple items, i will put as much in one package as i can. using per weightunit only will not give the customer the best price option. all i need to do, is make my flat rate dissapeer as an option for other categories,and carts mixed with other categories, like the free shipping module does for shopping carts with items that don't have a free option.

    i apologize for this. i know it started as one thing, then turned into something else, and i seem to be making this difficult.

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

    Default Re: perweightunit issue

    You need to make a choice ...

    Do you want Category 1 to be $4.95 per Product per quantity plus use normal weight on the other Products so that you can use UPS and USPS ...

    Or ... do you want Category 1 to be $4.95 per Product per quantity plus use Per Unit perweightunit shipping module where all other Products have their shipping cost put into the Product weight ...

    Or ... do you want something totally different ...

    You have me really lost where you want to go with all this ...
    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. #15
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: perweightunit issue

    i'm really sorry, i had no intention of confusing you.
    All of the products in category 1 weigh an actual 10 pounds packaged. if you order 1 set, the best option for me to ship is the large flat rate box. my cost $13.95 i currently mark it up to $18.50, and use the perweightunit at 1.85 i also have the ups, and usps modules activated.
    The price that i sell the items for in category 1, are either $146.95, or $224.95, depending on what style they buy.

    if a customer purchases 4 items from that category, usually the regular priority mail rate for 40 pounds is considerably less than the 4 flat rate boxes, which would be $74.

    all i need, is a shipping option that will charge $18.50 per item, and will only be visible when items from category 1 are the only things in the cart.

    also, i don't want to raise the weight limit, because i want large orders split into multiple packages if the customer chooses ups, or another usps shipping option.


    if you can't help me, i'll just deal with the problem when i go to add more products that will be too big for the large flat rate box.

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

    Default Re: perweightunit issue

    This will count how many products are in the cart from categories_id 1 when the master_categories_id of the Product is set to 1:
    Code:
    if (!IS_ADMIN_FLAG) {
      global cart;
      $chk_cat_1 = $_SESSION['cart']->in_cart_check('master_categories_id','1');
    }
    Then, using the value $chk_cat_1 you can multiply that by whatever price you want to charge ...

    Then, find the cost setting in the shipping module and add that to it ...

    Example: in the USPS shipping module you would see the code:
    Code:
              $methods[] = array('id' => $type,
                                 'title' => $title,
                                 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
    This can be changed to:
    Code:
              $methods[] = array('id' => $type,
                                 'title' => $title,
                                 'cost' => (($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) + ($chk_cat_1 * 18.95)) );
    This would then add the $18.95 per Product per quantity to the USPS shipping quote rate based on the idea that all Products in Category 1 have 0 weight to them ...

    NOTE: the USPS shipping module will get a quote based on the lowest possible rate when there is 0 weight in the cart ...

    You could disable the USPS shipping module with similar code, based on the Category 1 being the only products in the cart with by changing the code:
    Code:
        // disable only when entire cart is free shipping
        if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
        }
    to read:
    Code:
        // disable only when entire cart is free shipping
        if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
        }
    
    if (!IS_ADMIN_FLAG) {
      global cart;
      $chk_cat_1 = $_SESSION['cart']->in_cart_check('master_categories_id','1');
      if ($chk_cat_1 == $_SESSION['cart']->count_contents()) {
        $this->enabled = false;
      } 
    }
    Adapting this code can then control which shipping modules show or do not show based on the content of the cart ...
    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!

  7. #17
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: perweightunit issue

    thank you very much. i will try to implement this later today.

  8. #18
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: perweightunit issue

    the second code you gave me, the one for disabling the usps shipping module, makes the entire shipping quote section disapeer.

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

    Default Re: perweightunit issue

    That's cause of that silly little typo ...

    global cart;

    needs to be:
    global $cart;

    See if that works a bit better ...
    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. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: perweightunit issue

    NOTE: the global $cart; needs the $cart and not cart in both places ...
    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!

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. perweightunit shipping
    By codrakon in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 10 Jun 2010, 02:47 PM
  2. perweightunit questions
    By design4dotcom in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 7 Jul 2009, 11:38 PM
  3. perweightunit ISSUES!!!
    By ImCuteiThink in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 1 May 2008, 06:39 AM
  4. perweightunit question
    By GraniteMan44 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 12 Apr 2008, 07:00 PM
  5. perweightunit module
    By CheekyCockney in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 9 Aug 2006, 08:54 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