Option when price is empty item can't be stored

  • Posts: 198
  • Thank you received: 7
6 years 10 months ago #286227

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.3

I client forget sometimes to fill the price field, so the product is for free :-)

Is there an option (or hack) to that when the price field is empty a warning appears?

Regards René

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 10 months ago #286229

Hi,

There is no option.
The best would be to develop a small plugin and implement in it the onBeforeProductCreate(&$product, &$do) trigger. In it, just check the prices in $product->prices and if empty, set $do to false and add a message with Joomla's enqueueMessage:
docs.joomla.org/Display_error_messages_and_notices

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

Time to create page: 0.053 seconds
Powered by Kunena Forum