Jump to content

[solved]: Zero transport costs if downloadable and physical products are mixed!


Recommended Posts

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

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

  • 2 weeks later...

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

  • 11 months later...
×
×
  • Create New...