MrBaseball34 Posted August 30, 2010 Share Posted August 30, 2010 We are running a 1.2.5 shop and can't upgrade at this moment, however, it is on the horizon. In order.php, I see this code: if ($free_ship = floatval(Configuration::get('PS_SHIPPING_FREE_PRICE'))) { $discounts = $cart->getDiscounts(); $total_free_ship = $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']); foreach ($discounts as $discount) if ($discount['id_discount_type'] == 3) { $total_free_ship = 0; break ; } $smarty->assign('free_ship', $total_free_ship); } Now, in Cart.php, I see this code here; /* Firstly get all discounts, looking for a free shipping one (in order to substract shipping fees to the total amount) */ if ($discountIds = $this->getDiscounts(true)) { foreach ($discountIds AS $id_discount) { $discount = new Discount(intval($id_discount['id_discount'])); if (Validate::isLoadedObject($discount)) { $discounts[] = $discount; if ($discount->id_discount_type == 3) foreach($products AS $product) { $categories = Discount::getCategories($discount->id); if (count($categories) AND Product::idIsOnCategoryId($product['id_product'], $categories)) { if($type == 2) $order_total -= $shipping_fees; $shipping_fees = 0; break; } } } } /* Secondly applying all vouchers to the correct amount */ foreach ($discounts AS $discount) if ($discount->id_discount_type != 3) $order_total -= Tools::ps_round(floatval($discount->getValue(sizeof($discounts), $order_total_products, $shipping_fees, $this->id, intval($withTaxes))), 2); } Now, why in the world are you adding the shipping to the discounts in order.php, then subtracting them from the shipping fees in Cart.php?This just makes no sense to me. In your current configuration, there is no way to cut off free shipping for a product that EXCEEDS a certain weight.We have gotten hosed on a couple of orders because we are offering free shipping over $100 but there is no way toconfigure to allow it only if the order is <50lbs. We had one order that had a shipping cost of $103 because the item weighed 76lbs. and our cost for the product was $88.I am trying to modify our cart to offer a RANGE for free shipping like it should have been designed in the first place. We want to offer free shipping for any order total from $0 to $100 OR for order total weight from 0 to 50lbs.I am almost there but still having trouble understanding how you guys glued these pieces together.I've got this code in Cart.getOrderShippingCost() $configuration = Configuration::getMultiple(array('PS_SHIPPING_HANDLING', 'PS_SHIPPING_METHOD', 'PS_SHIPPING_FREE_PRICE_BEGIN', 'PS_SHIPPING_FREE_WEIGHT_BEGIN', 'PS_SHIPPING_FREE_PRICE_END', 'PS_SHIPPING_FREE_WEIGHT_END', 'PS_MIN_ORDER_CHARGE', 'PS_MIN_ORDER_AMT')); // Free fees /* if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) AND floatval($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; */ if (isset($configuration['PS_SHIPPING_FREE_PRICE_BEGIN']) AND ($orderTotal >= floatval($configuration['PS_SHIPPING_FREE_PRICE_BEGIN']) AND $orderTotal <= floatval($configuration['PS_SHIPPING_FREE_PRICE_END']))) return $shipping_cost; $order_total_weight = $this->getTotalWeight(); if (isset($configuration['PS_SHIPPING_FREE_MAX_WEIGHT_BEGIN']) AND ($order_total_weight >= floatval($configuration['PS_SHIPPING_FREE_MAX_WEIGHT_BEGIN']) AND $order_total_weight <= floatval($configuration['PS_SHIPPING_FREE_MAX_WEIGHT_END']))) return $shipping_cost; But it doesn't seem to be working correctly because of that code in order.phpOh, BTW, I have added another configuration item called a minimum order charge. It is set to $4.95 for any order <$25.00. The minimum order charge works perfectly but I can't get this stupid free shipping messsolved.It is going to take a PrestaTeam member or someone deeply into PS to help out, but let's not let this go by. This is a great feature that needs to be implemented.I'm also going to post a message on the features tracker that pints to this forum message.MB34 Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 1, 2010 Author Share Posted September 1, 2010 So, no one knows anything about this? I know the title may not fully reflect what the post is about. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 8, 2010 Author Share Posted September 8, 2010 Helloooooo??? Is anyone out there?????94 views and no one has any comments on this? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 15, 2010 Author Share Posted September 15, 2010 Now, over 152 views and noone knows anything.That is what is so frustrating about this product.You can't get help from the people that really know the software, the developers.... :shut: :shut: :shut: :shut: :shut: Link to comment Share on other sites More sharing options...
keutche Posted October 7, 2010 Share Posted October 7, 2010 hidid you solve your issue ? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted October 7, 2010 Author Share Posted October 7, 2010 Nope, going a different route but still no luck.See this post:http://www.prestashop.com/forums/viewthread/72590/development/add_free_shipping_cost_but_based_on_weight Link to comment Share on other sites More sharing options...
Digitech Posted October 11, 2010 Share Posted October 11, 2010 The reason that you have so many views and no replies is that the viewers are frustrated users of Prestashop like yourself who were hoping to find some guidance but sadly have been let down! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now