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
[solved]: Zero transport costs if downloadable and physical products are mixed!
Started by boran, Feb 03 2009 09:16 PM
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?
getOrderTotal() , isVirtualCart(), getOrderShippingCost()
but I've not come across errors so far..
Has non-one else this problem?
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.
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.
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;
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?
classes/Cart.php line 946.
If you change $allVirtual = true; to $allVirtual = false; this should do it for you.
Hope this helps?




Back to top








