Jump to content

Cheapest Carrier not chosen in cart


Recommended Posts

Hi,

 

I cant get the cheapest carrier to display at the shoppingcart, instead is takes the most expensive one. Only when I checkout with adress, name etc I got all the alternatives.

 

prereq:

- Carrier A (cheapest at 0-2kg, max 2kg), activated

- Carrier B (most expensive all ranges, max 100kg), activated

- Default carrier: Best price

- Both carriers assigned to the test product.

- Adding the product as visitor(non logged in)

 

Someone got a clue?

 

Thanks!

Zang

 

 

Link to comment
Share on other sites

I found some useful stuff but not sure if this is used correctly:

 

in Cart.php in function getPackageShippingCost:

 

$result = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, (int)$id_zone);
 
foreach($result as $x)
{
    echo "<script>alert('". $x->name ."')</script>"; //<----- name is empty!!!
}
 
Cant seem to get any carriers...
Edited by ZangZang (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...