- Posts: 55
- Thank you received: 3
Hide 1 specific shipping method in checkout
11 years 2 months ago #210088
by netpastor
Hide 1 specific shipping method in checkout was created by netpastor
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
Hello,
I have 2 warehouses set up, one for shipping using an API, the other with a manual shipping plugin with price per product.
In almost all cases the price per product is $0.
Having this shipping method display in the checkout can be confusing to customers when they have products from both warehouses in the cart, and are at the point of choosing their shipping method.
Is there a way to edit the checkout / shipping.php so that I can stop the "Flat Rate Shiping" method from displaying in the checkout?
-- Joomla version -- : 3.4.3
Hello,
I have 2 warehouses set up, one for shipping using an API, the other with a manual shipping plugin with price per product.
In almost all cases the price per product is $0.
Having this shipping method display in the checkout can be confusing to customers when they have products from both warehouses in the cart, and are at the point of choosing their shipping method.
Is there a way to edit the checkout / shipping.php so that I can stop the "Flat Rate Shiping" method from displaying in the checkout?
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210093
by nicolas
Replied by nicolas on topic Hide 1 specific shipping method in checkout
Hi,
That's possible yes.
Instead of the code:
you can use such code:
where XXX is to be replaced by the group key of the warehouse that you want to hide.
You can echo it before if you want to know which one it is that you want to set there.
That's possible yes.
Instead of the code:
Code:
foreach($this->shipping_groups as $shipping_group_key => $group) {
?>
<div class="hikashop_shipping_group">
Code:
foreach($this->shipping_groups as $shipping_group_key => $group) {
?>
<div class="hikashop_shipping_group" <?php if($shipping_group_key=='XXX') echo 'style="display:none;"'; ?>>
You can echo it before if you want to know which one it is that you want to set there.
The following user(s) said Thank You: netpastor
Please Log in or Create an account to join the conversation.
11 years 1 month ago #212465
by netpastor
Replied by netpastor on topic Hide 1 specific shipping method in checkout
Thanks Nicholas.
If I don't want this "Flat Rate Shipping" method from displaying in emails sent to the customer where could I do that?
Is it in the preload version of the email?
If I don't want this "Flat Rate Shipping" method from displaying in emails sent to the customer where could I do that?
Is it in the preload version of the email?
Please Log in or Create an account to join the conversation.
11 years 1 month ago #212479
by nicolas
Replied by nicolas on topic Hide 1 specific shipping method in checkout
Hi,
Yes. It's there.
After the line:
$shipping_id = $k;
You can have:
if($shipping_id == XXX) continue;
Yes. It's there.
After the line:
$shipping_id = $k;
You can have:
if($shipping_id == XXX) continue;
The following user(s) said Thank You: netpastor
Please Log in or Create an account to join the conversation.
Time to create page: 0.106 seconds