Hi everyone,
I would like to know what code should I add and where if I want to hide shipping method for Citylink if the value is $0.00.
I have add the following rates on the Citylink:
0:0.00
0.5:5.00
1.0:10.00
I am also using other shipping method so the require shipping set to no is no use to me.
Thank you.
regards,
Onnets
Edit catalog/model/shipping/citylink.php
At line 15 add:
At line 15 add:
Code: Select all
if ( $this->cart->getWeight() == 0 ) {
$status = false;
}
Thank you pprmkr. It works!
1. Does this apply to weight base shipping as well?
2. I have another question. I have a shipping module that the shipping price is base on individual product. But I need to hide shipping method for this module if the value is $0.00. is there a code to hide it?
Thank you in advance.
Regards,
Onnets
1. Does this apply to weight base shipping as well?
2. I have another question. I have a shipping module that the shipping price is base on individual product. But I need to hide shipping method for this module if the value is $0.00. is there a code to hide it?
Thank you in advance.
Regards,
Onnets
1. You can put the code in other shipping methods as well
2. To retrieve the value of the products in the basket, use:
To hide the method when all products are 0.00:
2. To retrieve the value of the products in the basket, use:
Code: Select all
$this->cart->getSubTotal()
Code: Select all
if ( $this->cart->getSubTotal() == 0 ) {
$status = false;
}
This works really well!
You can disable shipment options based on price weight and many other things!
You can disable shipment options based on price weight and many other things!
Who is online
Users browsing this forum: No registered users and 30 guests