'Minimum Order is $15.00' error, even when above threshold

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #273659

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.7.2

I have an interesting issue where, when a user adds a number of items to their cart, they're prompted for a message at checkout saying there is not enough product in their cart to meet minimum order price ($15.00).

However, the cart price is well above this value, and we aren't configured to have a minimum order price anyway.

Here's the step to reproduce:

  1. Visit product URL: Glow Sticks
  2. Add 15 to cart
  3. Checkout
  4. Login and try to go to shipping method
  5. Should get error at top

Here's what I've tried so far:

* Ensured all product has a valid weight
* Ensured product has a valid height, width, depth and unit of measure
* Checked for minimum order quantities on product
* Looked in code where $errors is set and can't seem to see where it'd cause a problem (I dont think any payment_params have anything but zero in them)

I'm very stumped. Not all products exhibit this behavior, but this is a very popular product.

Any help would be appreciated.

Attachments:
Last edit: 7 years 4 months ago by killnine.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 4 months ago #273669

Hi,

There is no such error message in HikaShop.
So either you've modified the error message from the default one of the minimum price restriction of shipping methods, or you have another extension adding that error message.
If it comes from shipping methods minimum price setting, then it's normal as you must have the "include taxes" and/or the "include virtual products price" settings turned off in your shipping methods and thus it ignores the taxes and/or the prices of the products with a weight of zero.

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

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #273852

You're right, the constant for ORDER_TOTAL_TOO_LOW_FOR_SHIPPING_METHODS was customized to that new text. However, that error is set within the Hikashop Shipping class DisplayErrors function for 'min_price'. The error array is only set in the Helper class when the following criteria is met:

  1. shipping_min_price is not null
  2. shipping_min_price is greater than price

There shouldn't be a minimum shipping price set for ANY shipping method. The price is always some non-zero value. And this doesn't happen on every product, just a select few.

I could just comment this code out in the helper but I don't understand why its triggering and I worry it's going to just get re-added any time we update Hikashop.


EDIT: I commented out the logic that sets errors in the Helpers class and it still appears on checkout....WHA? I did grep -lrF "'min_price'" and there's only two files (shipping.php and helpers.php) which reference that. So, I'm thoroughly stumped as to why this error appears on checkout. I know that something is adding an error with that key, though.

Last edit: 7 years 4 months ago by killnine.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 4 months ago #273854

Hi,

So how did you configure your shipping methods ?
Did you check the settings "include taxes" and "include virtual products price" that I was talking about ?
Did you set them accordingly to what you want ?
Could you provide screenshots of your shipping methods settings ?

Changing the code is not a solution. The problem likely doesn't come from the code (it works fine for everyone else with the latest version), but it's probably an issue in the way you setup your shipping methods.
Also, note that the checkout system has caching systems in place in the user session and in the cart in the database. So even if you change the code, you won't see the change until your user session is cleared and your cart is deleted and recreated.
So simply try with a new user/cart to be sure that your changes will be taken into account.

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

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #273921

Thanks Nicolas,

I think I'm seeing the pattern. I tried your suggestion about "include taxes" and "include virtual products price" but the behavior is the same. Let me step back and first say that we only have two shipping methods. First, a "Free Shipping" option for orders above $49. Second, a UPS shipping method.

I now notice that orders above $49 work fine, but I'm not seeing UPS options for shipping. When I disable the Free Shipping method, I get an error tied to NO_SHIPPING_METHOD_FOUND. That suggests to me that UPS isn't returning any rates.

I think the problem may actually be the following:

  1. User adds < $49 of product to card
  2. User goes to checkout
  3. User doesn't qualify for Free Shipping method as it's less than $49 threshold
  4. No UPS rates are returned
  5. min_rate error is the default when there is no rate to compare against

Just a guess. I've attached the configuration of our shipping methods for reference in case you see anything bizarre that sticks out. I haven't changed anything here in a long time, though.


EDIT: Just insanely frustrating. Some items don't work with UPS and I can't figure out a pattern why. Checking in HIKASHOP_PRODUCT table, they're basically identical from a weight, dimension standpoint. The only difference between a product that works (ex: Glow Golf Balls) and a product that doesn't (ex: Adhesive Glow Circles) is that the former does not have any product variants.

Attachments:
Last edit: 7 years 4 months ago by killnine.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 4 months ago #273922

Hi,

The way I see it, the issue comes from your translation.
You must have written the $15 limit in hard in the translation but you changed the minimum price from 15 to 49 in the free shipping method.
Thus, you get the message correctly as you're below the $49 threshold but the message says $15 instead of $49 because it hasn't been updated.

Now the fact that the UPS plugin doesn't return any rates is a separate matter and it comes from how the shipping method is configured and/or how the products are configured and/or how your checkout is configured.
For example:
- not all the services will be available for all the products and the group package setting can also grealty influence what rates will be available
- if no weight/dimensions are specified for the product or if they are too big, UPS would also not return any rate
- if you have not yet entered your shipping address, the UPS plugin cannot return any rate since UPS needs the address for its calculations

Last edit: 7 years 4 months ago by nicolas.

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

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #273989

I agree with your assessment on the Free Shipping method. But that's just masking the issue of the fact that UPS rates aren't appearing (since Free Shipping only appears when an order is > $49).

The issue I have with UPS rates not appearing is that I have not made any site changes recently that should affect the plugin. The weights and dimensions are all specified for the products and its only products with VARIANTS that seem to have problems with getting rates.

The shipping address thing is just wrong because the first step in the checkout process is selecting a shipping location and you have to click 'Next' to go to the next step. The address defaults to selected when you go to check out so I think something else is happening there.

I guess I'm just really confused as to what might have changed to cause rates to stop returning. My client generally doesn't muck around in his website so I don't think he changed anything. I have UPS debug turned on but never see anything in the console for it, unfortunately (a longstanding problem).

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 4 months ago #273999

Hi,

If you didn't modify the code of HikaShop and didn't update it and it worked before, then it can only be that you (or your client) changed something or your hosting or UPS.
I doubt UPS changed anything so that leaves 2 options.
And if it works for products without variants, then it's not coming from the hosting blocking the shipping rates requests to UPS servers.
Now I know that we've fixed several things with the variants and UPS shipping methods, so updating might help. Now, since you apparently have an old version prior to the 3.0, it's going to be a big task, so what you can try is to just get the UPS files from the back/extensions/ folder of the install package, and replace them in plugins/hikashopshipping/ups (make a backup before in case there is some incompatibility I didn't think about between the UPS plugin of HikaShop 3.1.1 and your version of HikaShop).

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

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #274232

Yes, we're running an older version. I've re-upped our subscription to get the latest bits.

However, I re-enabled our FedEx shipping method as a test and it seems to do just about the same thing. Rates don't return and so it gives the same issue. I'm not convinced it's even UPS-specific.

Kinda at the end of my rope here. I am probably going to try and run the instance in a Docker container and see if updating Hikashop resolves the issue. But, as you said, moving up a major version gives me a lot of anxiety. Updates haven't gone super smooth in the past for this client because the original developer did so much custom work on the view side.

Lastly, is there any way to get the most recent 2.x (2.6.4) before the jump to 3.x? It would really help me compare the baseline to what's installed for my client. Thanks.

Last edit: 7 years 4 months ago by killnine.

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

  • Posts: 32
  • Thank you received: 1
7 years 4 months ago #274233

So I think I have found the culprit.

All the variants have a weight and dimensions set, as I said before. However, I made a copy of one of my variant products and REMOVED the weight (set to 0) of the variant version and it worked with UPS shipping again.

I'm thinking about running something like this to get the values cleared for the variants:

UPDATE `wuwfg_hikashop_product`
SET `product_weight` = 0.0
WHERE `product_parent_id` <> 0 AND `product_weight` <> 0 AND `product_type` = 'variant'

Does this seem like a bug? Maybe something that got resolved between 2.6.2 and 2.6.4?

Last edit: 7 years 4 months ago by killnine.

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

  • Posts: 12953
  • Thank you received: 1778
7 years 4 months ago #274256

Hello,

If that resolved your issue, your problem is probably coming from the fact that the weight/dimensions are not properly set through your variant, or are not properly took in account by shipping plugins, but I can't reproduce that issue with the last Hikashop version so it was properly after the 2.6.X.

Also, If only using the weight/dimensions of the main product and not its variants fix your issue, then you should probably do it for every products.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum