Manual shipping plugin displays wrong choices

  • Posts: 10
  • Thank you received: 1
12 years 2 months ago #66732

I am trialling Hikashop Starter 1.6.0 + J2.5.6 on a localhost installation. I have set up the Manual Shipping plugin and defined a series of non-overlapping, mutually exclusive methods based only on weight i.e. 0-750g, 751-1000g, 1001-1250g, etc. The products have weights in the same units (g). If I add a product weighing 500g to the cart and then checkout, the shipping module correctly displays only one shipping option/price. However, if I add a product weighing 850g to the cart and then checkout, the shipping module displays both 0-750 and 751-1000g options. Storyboard attached. [If I add a product weighing 1200g I get the correct option plus the two invalid ones for lighter weights too.]

In reality, I am trying to set up a rather more complex set of choices (modelling the UK 1st and 2nd class packet charges), but even this simple implementation is causing problems so the project is on hold while this is resolved :(

Thanks in advance.

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

  • Posts: 10
  • Thank you received: 1
12 years 2 months ago #66734

Attachment failed to upload - here it is (I hope!)

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #67016

Hi,

Can you check that your main weight unit (the first one) is also 'g' in the main tab of the configuration ?

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

  • Posts: 10
  • Thank you received: 1
12 years 1 month ago #67554

Hi

Thanks for the response. I tried setting "g" as the first entry and it made no difference.

I had a look at the raw data in the database (in the *_hika_shipping table) and while it didn't exactly leap off the page at me, I did discover that some of the weights defined in the shipping_params field had leading spaces. If you look very carefully at the screen shots I attached, you can see that this is so. To be on the safe side, all the weights were re-entered ensuring that only numeric data was input; after this data fix all worked as expected :)

In terms of closure comments, in terms of product enhancement it would seem to me that it would be useful if the input functions had some form of data validation. I have observed that these fields will take alphabetic characters, so my guess is that the conversion to a number (I presume that the final comparison operators are numeric based?) occurs late on in the overall process.

Incidentally, now I know what the problem is I can confirm that the ordering of the weights in the configuration was not relevant i.e. I reset kg as the first entry and everything was still OK.

The following user(s) said Thank You: nicolas

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #67611

That's a good idea. We'll add a check on these fields.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum