Variants / out of stock / module specific translation

  • Posts: 51
  • Thank you received: 2
6 years 9 months ago #294387

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8

In our store we are selling both courses and products. One course has three different variants (with different price depending on the participants age). We can sell 12 tickets per course, and I set the stock on the main product to 12 and the stock of each variant to 0. That way, when we've sold 12 tickets (regardless of variant) the course is out of stock. But when stock = 0, the text by the "Choose option"-button change from "In stock" to nothing, and you need to go to the product view to see that it is "Out of stock".

1) Is it possible to get the "sold out"-text also in the category view when the main product's stock is zero? I'm aware of the "Hide when out of stock"-choice, but it is positive to show that the courses are fully booked :-)
2) Since we are selling both tickets to courses AND products, the text/translation doesn't always fit both categories. Is there a way to customixe the translation for a specific product category og a specific module (like "Fully booked" for courses and "out of stock" for products)?

Last edit: 6 years 9 months ago by Odda.

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

  • Posts: 83603
  • Thank you received: 13533
  • MODERATOR
6 years 9 months ago #294417

Hi,

I don't understand how your setup is working.
If you set the stock to 0 in the variants, then it's not possible to purchase the product even if you set a stock in the main product.
If you want to have the stock decremented accross the variants, then you indeed need to set a stock in the main product, however, you need to leave the stock of the variants to unlimited and not 0.

If the product is properly configured, then the "choose options" button will disappear and will be replaced by "out of stock" when the stock of the main product reaches 0.

If you want to customize the message for different products, you'll have to edit the code:

echo JText::_('NO_STOCK');
in the file "add_to_cart_ajax.php" (for the listing) and the file "quantity.php" (for the product page) via the menu Display>Views.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum