Display message instead of add to cart button

  • Posts: 31
  • Thank you received: 0
10 years 4 months ago #201814

Hi,

Just wondering is there a way to display a message instead of the Add to Cart button if the product weight or product size is over the shipping method recommendations?
For a website we are building at the moment we are only using Australia Post shipping method and in the documentation it has " Australia Post has a weight limit of 20 kg and a volume limit of 0.18 m3"

This results in no shipping method showing up on the checkout page because the product is either over weight or over the volume limit.

Is there a function to check against the shipping methods, if the product is over display a message instead of add to cart button.

Last edit: 10 years 4 months ago by trevor.icon. Reason: Double up in post

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #201826

Hello,

Just wondering is there a way to display a message instead of the Add to Cart button if the product weight or product size is over the shipping method recommendations?

There is no option to do that, available shipping methods are defined during the checkout workflow, so you'll have to write an algorithm on your own regarding your shipping methods so that you can know if there will be an available shipping method for your product page.
You can add your custom code via the "Show_default" file of the "Product" view of your front-end template.

" Australia Post has a weight limit of 20 kg and a volume limit of 0.18 m3"

In your case you'll have to check your products weight/dimensions, and if it exceed the limit, you'll have to display your error message.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum