Hide 1 specific shipping method in checkout

  • Posts: 55
  • Thank you received: 3
9 years 3 months ago #210088

-- 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?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 3 months ago #210093

Hi,

That's possible yes.
Instead of the code:

foreach($this->shipping_groups as $shipping_group_key => $group) {
?>
	<div class="hikashop_shipping_group">
you can use such 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;"'; ?>>
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.

The following user(s) said Thank You: netpastor

Please Log in or Create an account to join the conversation.

  • Posts: 55
  • Thank you received: 3
9 years 3 months ago #212465

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?

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 3 months ago #212479

Hi,

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.060 seconds
Powered by Kunena Forum