Changing display message to "invalid configuration"

  • Posts: 17
  • Thank you received: 0
5 years 9 months ago #294836

Hello,

We have many products with a number of variants, but with those characteristic selections, certain configurations do not exist. When this happens, the master product code shows up on our site. If that product doesn't exist, I would instead like it to say "invalid configuration." (Think: You have a shirt sizes and colors, but a green medium does not exist.) I think my answer is in this string of code that I have attached, however, I cannot get the message to populate properly. How should I be rewriting this code?

Attachments:

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

  • Posts: 81476
  • Thank you received: 13060
  • MODERATOR
5 years 9 months ago #294855

Hi,

Normally, when a variant doesn't exist for a combination of characteristic values, the stock (quantity) is 0 and the product variant cannot be purchased. So in such case, instead of the "add to cart" button, you should see a "no stock" message.
If you want to customize that message, you can use a translation override:
www.hikashop.com/download/languages.html#modify
Note that you can also change the "characteristic selection method" setting in the HikaShop configuration to "list" or "table" which will prevent the customer from being able to select / see variants that don't exist.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum