Shipping price per product multiplying by quantity

  • Posts: 42
  • Thank you received: 1
8 years 7 months ago #212739

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.12
-- Browser(s) name and version -- : Firefox 40.0.3

Hi,

in my "Hikashop manual shipping plugin" I have enabled "Use the prices per products". In my product I have set shipping price = 25, on my frontend if I add this product to cart (qty = 1), then shipping price is ok (=25), but if I add second one (qty = 2), then my shipping price is 50, that's not true because I'm not sending each product separately, I want to have shipping price = 25 (no matter if quantity = 1 or 2 or 10). Which settings do I have to modify, so the shipping price will not be multiplying by quantity?

What's more, if I add product which have shipping price = 25 and other product which have shipping price = 50, then I have shipping price total = 75. I would like to have shipping price = max product shipping price in my cart, so in my example shipping price total should be 50. Is it possible or also not?

Best regards,
Chris

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 7 months ago #212741

Hi,

When configuring the shipping price per product, you have a "price" and a "fee".
The price is related to the quantity ; the fee is not.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 42
  • Thank you received: 1
8 years 7 months ago #213442

Hi,

ok, that solved problem with multiplying by quantitny, but what about second part of my question? Still if one product shipping price is 25 and second product shipping is 50 I have total shipping 75, but I would like to have total shipping price = 50 (not adding to each other, but using most expensive product shipping price in cart). How can I achieve this?

Best regards,
Chris

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
8 years 7 months ago #213445

Hi,

There is no option to do that. The "shipping price per product" is a feature which allows you to set a shipping price per product and not a price for the whole cart.

If you want to do that while still having different shipping prices, if you have only two shipping prices like you explained, it's possible with a trick:
- You set a weight to the products with a shipping price of 25.
- You set a volume to the products with a shipping price of 50.
- You create a shipping method for products with weight and with a volume below 0.1
- You create a shipping method for products with a volume above 0.1
That way, when you have only products with weight and with a volume of 0, you'll see the 25 shipping method.
And when you have only products with volume, or a mix of products with volume and weight, you'll see the 50 shipping method.

The problem is that this method won't work if you have more shipping prices. In such case, it would require the development of a custom shipping plugin in order to handle the rule "only keep the most expensive shipping price per product as the shipping price for the whole cart".

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

  • Posts: 42
  • Thank you received: 1
8 years 7 months ago #213455

Hello,

will do, thank you for the hints.

Best regards,
Chris

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

  • Posts: 8
  • Thank you received: 0
8 years 7 months ago #214479

I have exactly the same challenge, but with 21 different kinds of shipping prices for two countries now.
Also, they can not be calculated to dimensions or weights.

Am I right to conclude I will need custom development on that?
And/or: could I (ab)use the warehouse function for that?

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
8 years 7 months ago #214482

Hi,

If you have exactly the same requirement, the warehouse system can't cut it as it will sum the shipping fee of each group of products (warehouse) instead of taking the higher fee and using it for the whole cart.
In that case, a custom development of a shipping plugin will be required is.

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

  • Posts: 8
  • Thank you received: 0
8 years 7 months ago #215057

Hello,

I do need some custom work done then. Never had it before in Hikashop so: Where is the best place to look for that?

The requirement - in short - would be: only use the highest shipping fee when more than one product is in the cart.

Thank you.

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

  • Posts: 42
  • Thank you received: 1
8 years 7 months ago #215099

Hi ejh,

I'm not a developer, but I was able to solve this by editing /administrator/components/com_hikashop/helpers/helper.php around line 2783 there's:

' ORDER BY a.shipping_id, a.shipping_price_ref_id, a.shipping_price_min_quantity';

I just commented that line and placed below:
' ORDER BY a.shipping_fee_value DESC LIMIT 1';

so query is ordering shipping prices of products in cart by shipping fee descending and it's taking only first highest value.
If it's proper way of doing it should tell someone from HS dev team, however as I sad it did the trick for me.

Best regards,
Chris

The following user(s) said Thank You: ejh

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

  • Posts: 8
  • Thank you received: 0
8 years 7 months ago #215105

Hello Gnsbud,

Yep, It DOES the trick. Have done a simple test with all the possible options and: the correct shipping fee and no errors.

Thank you very very much.

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
8 years 7 months ago #215106

Hi,

That solution will work in your case, but is not a valid solution for many cases I can see. So we can't include that, and even if we did, it would be more complex as it would have to be made as an option, in order to not change the normal behavior for everyone else who doesn't want the system to work like that.
So it's great that you found an easy solution that works for you, but we won't be able to include it in HikaShop.

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

  • Posts: 235
  • Thank you received: 4
5 years 5 months ago #300573

This worked for my customer until we updated to HikaShop 4.

Is there such a statement for this version?

Jan

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
5 years 5 months ago #300575

Hi,

It's still the same change I think. However, that code is in the file administrator/components/com_hikashop/helpers/shippingplugin.php since HikaShop 3.5.0
So that's probably why you didn't find it if you looked for it in /administrator/components/com_hikashop/helpers/helper.php where it was before.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum