Hi I have tested the following on different Joomla 3.4.6 -3.5.1 and VM versions 3.0.14-3.0.16 and do not see it working any more even though the feature was good working in J2.5 and VM 2.6
I use product weight to show different shipping cost on the productdetails page. If I have defined a product with over 30kg the customer gets free shipping and below 25kg I charge shipping.
In the backend there is a feature "Show on productdetails page" which I have active for free shipping (over 30kg). However the module will not consider the weight any more but always show shipping costs to the customer because it seems it does not look for the product weight any more.
Is there alredy a fix for this?
Thank you
kratzi
push
Yes - this is broken
in the weight - countries ship plugin any way.. the function plgVmOnProductDisplayShipment() is called by the view.html.php
in the weight - countries ship plugin this function tries to call the if($this->checkConditions($cart,$this->_currentMethod,$prices,$product)){
but func. is protected function checkConditions ($cart, $method, $cart_prices) - i.e. no $product - oddly? this is then true
added this which makes it work
protected function checkConditions ($cart, $method, $cart_prices, $product) {
and
//GJC
if(!empty($product->product_weight)){
$orderWeight = $product->product_weight;
}else{
$orderWeight = $this->getOrderWeight ($cart, $method->weight_unit);
}
//GJC
as a quick fix - of course gives warnings of missing 4th argument &
plgVmShipmentWeight_countries::checkConditions() should be compatible with vmPSPlugin::checkConditions($cart, $method, $cart_prices)
but don't know how the function is intended to be or what the final fix will be
The order weight is taken from the cart, not from the product
$orderWeight = $this->getOrderWeight ($cart, $method->weight_unit);
is in line 250, you should find the reason, why it does not calculate the weight.
I think the right solution is to use
var $_productAdded = true;
in cart.php helper, line 35.