Total weights

  • Posts: 16
  • Thank you received: 1
6 years 6 months ago #292765

-- url of the page with the problem -- : authenticapets.com
-- Joomla version -- : 3.8.5
-- PHP version -- : 7.0

Hi,

our shop is set up so that the customer can only order over a certain amount of weight.

have you got any code so the total weight of order placed so far will display in the drop down cart module?

it should say:

"The total weight of your cart is not enough to place your order yet. You weight now is <total weight>"

This will need to be in English and Spanish depending on what language the customer has chosen.

Thank you

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

  • Posts: 12953
  • Thank you received: 1778
6 years 6 months ago #292778

Hello,

The only solution to do what you want will be to directly use shipping methods and set the "Minimum Weight" option to your minimum order total weight requirement.

Best regards,
Mohamed Thelji.

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

  • Posts: 16
  • Thank you received: 1
6 years 6 months ago #292876

Thank you but I have already done that.

What I want is the current weight to show in the drop down cart so the customer know if they are underweight or not

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 6 months ago #292879

Hi,

If you've already done that, then on the checkout, you should get that error message:
"The cart items combined weight is too small for all the possible shipping methods"

And that error message can be customized with a translation override:
www.hikashop.com/download/languages.html#modify
And in your translation override, you can add a %s parameter which will automatically be filled with weight missing to reach the limit after which shipping methods will display.
So you could for example customize the message to:
ITEMS_WEIGHT_TOO_SMALL_FOR_SHIPPING_METHODS="The cart items combined weight is too small for all the possible shipping methods. You need %s kg more to be able to place your order."

Now if you want to add such message directly in the cart module. Then, you'll have to edit the file "cart" of the view "product" via the menu Display>Views and add custom PHP code in it to check on the total weight and generate the message yourself.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum