boran Posted February 3, 2009 Share Posted February 3, 2009 Hi,I'm just going live with http://voixlibres.com/shop1 but a nasty error has popped up.If one chooses a product like "Ruana Alpaca" and proceeds to check out - select Swisspost, with destination switzerland, it calculates a prices of 8 Swiss francs for transport, which is fine.If however, one adds a "donation" to the basket like for example "membership", the shipping costs drop to zero!I think this is probably a bug in the weight calculation for transport due to mixing downloadable and physical products.There is also a weight calculation problem for transport if a product has combinations, e.g. "Quinoa outlets" in the above shop.Can someone explain?Thanks,Sean Link to comment Share on other sites More sharing options...
boran Posted February 4, 2009 Author Share Posted February 4, 2009 The relevant code seems to be in classes/Cart.php,-getOrderTotal() , isVirtualCart(), getOrderShippingCost()but I've not come across errors so far..Has non-one else this problem? Link to comment Share on other sites More sharing options...
boran Posted February 5, 2009 Author Share Posted February 5, 2009 I may have found the issue: In the weight levels used for transport, I started at 0.1 Kilos, and some of the products I had been using for testing were less than 100g. So I reduced this to 0.01KG i.e. 1 g.This explains why some physical products were coming up with a shipping of zero.However the behavior of Downloadable products (Donations on this web site), as noted above, is a bit of a mystery.Summary: problem has disappeared. Link to comment Share on other sites More sharing options...
jaumeortola Posted February 18, 2009 Share Posted February 18, 2009 I've added these code lines in Cart.php. This is useful for mixed products (virtual+physical). If you have one virtual+physical product and total weight is greater than zero, the cart is not to be considered as virtual, and you'll have shipping costs. public function isVirtualCart() { if (!intval(self::getNbProducts($this->id))) return false; /* If total weight is greater than zero, cart is not virtual */ if ($this->getTotalWeight()>0) return false; Link to comment Share on other sites More sharing options...
Rich Walker Posted February 18, 2010 Share Posted February 18, 2010 We have a product that we need to ship and to get the customer to download a piece of software as well. The work around I found is to change classes/Cart.php line 946. If you change $allVirtual = true; to $allVirtual = false; this should do it for you.Hope this helps? Link to comment Share on other sites More sharing options...
Recommended Posts