Extra fees for EU orders

  • Posts: 5
  • Thank you received: 2
  • Hikashop Business
1 week 2 days ago #372446

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 6.1.1

Hi there,

Due to some new regulations, I need to add an extra fee at the checkout for orders shipping to the EU (I'm in the UK).

I need to add an extra €3 for each product *type* ordered - not the quantity. So if they order 3 x spoons and1 plate, I need to add €6. This is a customs thing apparently.

I see that there is a checkout fee plugin available - will this be able to work it out? Also, my maths isn't great, is it easy enough to work out the calculation?

I already add extra taxes and shipping for EU orders so the zones are all set up.

Many thanks for any help.
Leila

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

  • Posts: 85860
  • Thank you received: 14101
  • MODERATOR
1 week 2 days ago #372454

Hi Leila,

Yes, the Fees plugin (the one named "HikaShop - Fees", not the Global cart fee one) can do exactly this. It adds a fee to the cart from a formula you write, with a condition so it only applies when you want. You will not have to do any maths yourself, the two lines below are all you need.

Add one formula with:

Condition (so it only applies to EU orders):

{cart.cart_shipping_ids}==X
Replace X with the id of your EU shipping method (System > Shipping methods, the id is shown in the listing). Since your EU shipping is already restricted to your EU zones, this is what limits the fee to EU-bound orders. If you have more than one EU shipping method, add one formula per method.

Formula (3 per product type, quantity ignored):
{item.cart_product_quantity}*0+3

How it works: as soon as a formula contains an item or product tag, HikaShop evaluates it once for each product line in the cart and adds the results together. The "*0" cancels the quantity, so every distinct product adds a flat 3 whatever the number of units. So 3 spoons (one line) + 1 plate (one line) = 3 + 3 = 6, which is what you need. The quantity is never multiplied in.

Give the formula a Label (for example "EU customs fee"); it will show as its own line at the checkout.

One thing to check: the amount is added in the cart's currency, so a customer paying in euros gets a 3 EUR fee and a customer paying in pounds gets a 3 GBP fee. Make sure the currency shown at checkout for your EU customers is the one you intend.

The following user(s) said Thank You: HatsukoiUK

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

  • Posts: 5
  • Thank you received: 2
  • Hikashop Business
1 week 2 days ago #372460

That's great! Thanks for your help with that, it sounds just what I need. I'll take a look at the plugin.

Best regards
Leila

The following user(s) said Thank You: nicolas

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

  • Posts: 5
  • Thank you received: 2
  • Hikashop Business
1 week 21 hours ago #372479

Hi there,

I'm having trouble getting the fee to show up for the right shipping methods.

The shipping method ID is not shown in the backend listing so I used the shipping_id from the 'hikashop_shipping' table in the database - is this the correct ID number?

I know the plugin works because if I leave the Condition blank, it adds the fee in the checkout. But once I add the condition {cart.cart_shipping_ids}==xx it no longer appears.

Thanks for your help.
Leila

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

  • Posts: 85860
  • Thank you received: 14101
  • MODERATOR
1 week 17 hours ago #372482

Hi Leila,

Sorry for that, I was a bit too fast and didn't properly check what I wrote on this point in my previous message.

The id you took from the hikashop_shipping table is the correct one. The catch is that HikaShop does not store the bare number in the cart: it stores the shipping id together with the warehouse, like

2@0
So
{cart.cart_shipping_ids}==2
never matches, which is why the fee vanishes the moment you add that condition.

Use the "matches" operator
=~
instead of
==
with this condition:
{cart.cart_shipping_ids}=~/^2(@|$)/

Replace the 2 with your shipping id and leave the formula as it is. That matches your method whatever warehouse is attached to it, while still keeping the fee off your other shipping methods.

Last edit: 1 week 18 hours ago by nicolas.
The following user(s) said Thank You: HatsukoiUK

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

  • Posts: 5
  • Thank you received: 2
  • Hikashop Business
4 days 20 hours ago #372502

That's brilliant - works perfectly! Thank you for taking the time to sort that out for me.

Leila

The following user(s) said Thank You: nicolas

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

Time to create page: 0.066 seconds
Powered by Kunena Forum