Changing display message to "invalid configuration"

  • Posts: 17
  • Thank you received: 0
6 years 2 weeks ago #294836


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?


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

  • Posts: 82065
  • Thank you received: 13193
6 years 2 weeks ago #294855


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:
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.057 seconds
Powered by Kunena Forum