Hi,
I think I might have it will let you know later but thanks again for all the help with out it I would not have gotten this far.
Ron
Printable View
Hi,
I think I might have it will let you know later but thanks again for all the help with out it I would not have gotten this far.
Ron
Are the only Products that ever qualify for Free Shipping in the category for categories_id 6 when there are 6?
If there are 7, are 7 qualified for Free Shipping? or 8? or 9?
Does everything else in your shop have a shipping charge?
What I am looking for is that if the number of items from categories_id is >= 6 to subtract that weight from the order, thus no shipping charge ...
Currently, the Free Shipping Options freeoptions is using Totals/Weight/Item but it is not managing the categories_id that the products are coming from ...
If you were to create any order, but exclude adding anything from categories_id 6 to the cart, does the Per Unit perweightunit calculate the right shipping cost?
HI, Sad to say my fix did not work:(
The category id_6 is the only category with the free shipping, and yes if they order more than 6 they should get free shipping.
The cart when not using the free shipping option and just the per unit weight option is work right. I do have a couple of item I put on for free ship but I marked them in the product input page and the cart is working fine with that. The problem is when I throw in the category id_6
Thanks
Ron
A few things wrong on your site ... so, let's get things straightened out and cleaned up ...
Many of your Products are marked with excessive weight, this one for instance is 350:
/index.php?main_page=product_info&cPath=18&products_id=1010
Based on how Per Unit perweightunit works, are you wanting to charge $350.00 in shipping?
Next, many of your Products are marked as Product Unit 0, with a variety of Product Minimum. For example, this Umbrella:
/index.php?main_page=product_info&cPath=13&products_id=858
it is set to Product Unit 0 and Product Minimum 10 ...
You cannot order a Product in 0 units ... a Product has to be ordered in real units, such as the default of 1 as you need to buy at least 1 Umbrella and cannot buy 0 umbrellas ...
On the Product Minimum, this is the least number of items that the customer can order of a Product ...
Are you really wanting to force the customer to buy a Minimum of 10 Umbrellas?
Product Weight also has to be thought out on this Product ... you have the Product Weight set to 240, and based on the Per Unit perweightunit shipping module you would be charging the customer $240.00 for each umbrella and if there is a minimum of 10 on the Product Minimum then you would be charging the customer $2400.00 in shipping for 10 Umbrellas ... sounds a bit much ... :lookaroun
Back to the shipping issue ...
On the *other* products that are Free Shipping, as in not in categories_id 6, are you just setting those with Product Weight 0?
On ALL of the Products in categories_id 6, do they ALL weight the same amount? So if I checked for how many of the Products in the shopping cart are from categories_id 6, utilizing the master_categories_id, would they ALL ALWAYS weight the same amount?
The idea is to use just the Per Unit perweightunit shipping module and count how many items are in the cart from categories_id 6 and if it is greater or equal to 6 then reduce the weight of the shopping cart by subtracting out ALL of the Product Weight from Products in categories_id 6, leaving just the weight of everything else in the cart which would then compute the shipping cost ...
Does that seem to make sense?
The products you are referring to in this group is wholesale only and are shipped from china, my guy in china is sending me up date on the wieght which I will correct later, but does this affect the cart shipping if the customer does not put the product in?
now for the problem at hand I will try and answer:
Back to the shipping issue ...
On the *other* products that are Free Shipping, as in not in categories_id 6, are you just setting those with Product Weight 0?
Answer- I was not so I assume from this I should?
On ALL of the Products in categories_id 6, do they ALL weight the same amount? So if I checked for how many of the Products in the shopping cart are from categories_id 6, utilizing the master_categories_id, would they ALL ALWAYS weight the same amount?
answer-I will make them all the same as they are close in wieght but to answer the question no they were different
The idea is to use just the Per Unit perweightunit shipping module and count how many items are in the cart from categories_id 6 and if it is greater or equal to 6 then reduce the weight of the shopping cart by subtracting out ALL of the Product Weight from Products in categories_id 6, leaving just the weight of everything else in the cart which would then compute the shipping cost ...
Does that seem to make sense?
These solution seem to make sense to me but how would we achieve this i have look in the perwieghtunit module and don't see anything there that can be used?
Note: I did answer earlier but I did not see it in here so I am answering again but i think a little better:)
Happy Valentines day to you and the group:cool:
Ron
Just to be sure ... what version of Zen Cart are you running?
cart version is V 1.5.3
Ron
You could try customizing the files:
/includes/classes/shipping.php
and add the code in RED:
and the file:Code:if (is_array($this->modules)) {
$shipping_quoted = '';
$shipping_num_boxes = 1;
$shipping_weight = $total_weight;
// bof:reduce weight if 6 or more in cart from categories_id 6
$reduce_weight = .25; // weight per item
$chk_cat = $_SESSION['cart']->in_cart_check('master_categories_id','6');
if ($chk_cat >= 6) {
$shipping_weight = $shipping_weight - ($chk_cat * $reduce_weight);
}
// eof:reduce weight if 6 or more in cart from categories_id 6
$za_tare_array = preg_split("/[:,]/" , SHIPPING_BOX_WEIGHT);
/includes/modules/shipping/perweightunit.php
Code:// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false);
}
// bof:reduce weight if 6 or more in cart from categories_id 6
global $shipping_weight;
if ($shipping_weight <= 0) {
$this->enabled = false;
}
// eof:reduce weight if 6 or more in cart from categories_id 6
if ($this->enabled) {
// check MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD is in
Sorry I keep hitting the wrong button in this reply to form.
The cart now is only showing free ship even if I add an item which is not free ship. I see the shipping module is now unable to active the perweightunit method, that is probably why.
Sorry for all the trouble
Ron
Take two ...
Remove those changes and try adding these changes in RED:
See if that works better ...Code:function quote($method = '') {
global $order, $shipping_weight, $shipping_num_boxes;
$total_weight_units = $shipping_weight;
// bof: reduce weight if 6 or more in cart from categories_id 6
if ($shipping_weight <= 0) {
return false;
}
// eof: reduce weight if 6 or more in cart from categories_id 6
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
(MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));