Can I use the total order price in the shipping formula?

  • Posts: 173
  • Thank you received: 8
  • Hikashop Essential
4 weeks 1 day ago #365348

-- HikaShop version -- : 5.1.0
-- Joomla version -- : 5.1.0
-- PHP version -- : 8.2
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : None

Hi All,
Hope you had a good new year.
Can I access the total order price in the shipping formula? What I need to do is adjust the shipping cost by x amount if the value exceeds the current insurance level.

If total_price > £50 shipping_cost + £2 etc
If so, what are the formula fields?
Is there any way to do this with the formula?

Many thanks
Ian

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

  • Posts: 83303
  • Thank you received: 13467
  • MODERATOR
4 weeks 21 hours ago #365349

Hi,

Thanks. Happy new year to you !

In the shipping formula field, you can use the tags {price}, {volume}, {weight} and {quantity}
The tag {price} corresponds to the subtotal amount.

However, you can't use conditions in there. You can only use normal operations.
For example, if you have the formula: {price}*0.1
it means that the shipping fee would be 10% of the subtotal amount.

So I don't think you can use the shipping formula in order to do what you want.
However, you can do what you want without this field.
Suppose you currently have one shipping method, with a shipping price of £10.
Then, you could enter 50 in its "maximum price" field.
Then, configure another shipping method with the same settings, but instead of a shipping price of £10, set it to £12, leave the "maximum price" field empty, and enter 50.001 in the "minimum price" field.

That way, on the checkout, if the subtotal amount is 50 or lower, the second shipping method will be filtered out and the only shipping method left will be the £10 shipping method which will be automatically selected. Similarly, if the subtotal amount is higher, the first shipping method will be filtered out and the only shipping method left will be the £12 shipping method, which will be automatically selected.

The following user(s) said Thank You: ianspeed

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

  • Posts: 173
  • Thank you received: 8
  • Hikashop Essential
3 weeks 3 days ago #365405

Thanks Nicolas,
I'll have a look at that, but Royal Mail changed all their international postage rates, so that would be a huge amount of individual replications per certain countries, France being one of them as they are now individually costed.
Just wondering if I could put a request in for this feature in the future?
i.e
if price > xxx.xx then shipping cost + xxx.xx = shipping cost
This would save having to duplicate all of the shipping methods?

Many thanks
Ian

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

  • Posts: 83303
  • Thank you received: 13467
  • MODERATOR
3 weeks 3 days ago #365406

Hi,

In that case, you want to use this shipping plugin:
www.brainforge.co.uk/shop/downloads/prod...pping-extra-features
It has that specific capability implemented already.

The following user(s) said Thank You: ianspeed

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

Time to create page: 0.059 seconds
Powered by Kunena Forum