- Posts: 3
- Thank you received: 0
Is it possible to activate the waiting list for product options
5 years 3 months ago #334815
by sheenltsc
-- url of the page with the problem -- :
tennislife.sheenltsc.co.uk/index.php/sho...d-ball-week-9-13-aug
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4.21
-- Browser(s) name and version -- : Firefox
Hello,
I have set up a product with product options. Each product option has a stock of 12. When the stock is down to 0 the product option disappears from the list.
- Is it possibe to show the waiting list option when the product option is 0?
- is it possible to show the stock amount for product options?
Many thanks
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4.21
-- Browser(s) name and version -- : Firefox
Hello,
I have set up a product with product options. Each product option has a stock of 12. When the stock is down to 0 the product option disappears from the list.
- Is it possibe to show the waiting list option when the product option is 0?
- is it possible to show the stock amount for product options?
Many thanks
Please Log in or Create an account to join the conversation.
5 years 3 months ago #334821
by nicolas
Replied by nicolas on topic Is it possible to activate the waiting list for product options
Hi,
Displaying the stock for each option is possible with a small customization.
You'll have to edit the file product / option.php via the menu Display>Views.
There, the "yes" choice is displayed with the code:
so to add the stock to it, you would have to change it to:
To add a waitlist link, you would have to add the code:
However, it's a bit more tricky as you need to still display the name of the option, and display that waitlist button only when the option doesn't have stock. So it needs rearranging the code of the view. It requires a developer to work a bit on it to rearrange the code.
Displaying the stock for each option is possible with a small customization.
You'll have to edit the file product / option.php via the menu Display>Views.
There, the "yes" choice is displayed with the code:
Code:
$option_values[] = JHTML::_('select.option', $optionElement->product_id, $text);
Code:
$option_values[] = JHTML::_('select.option', $optionElement->product_id, $text. ' '.$optionElement->product_quantity);
To add a waitlist link, you would have to add the code:
Code:
<a class="hikabtn" rel="nofollow" href="<?php echo hikashop_completeLink('product&task=waitlist&cid='.$optionElement->product_id); ?>"><span><?php echo JText::_('ADD_ME_WAITLIST'); ?></span></a>
Please Log in or Create an account to join the conversation.
5 years 3 months ago #334836
by sheenltsc
Replied by sheenltsc on topic Is it possible to activate the waiting list for product options
That's great thanks, I can now see the stock amount.
It it possible to show a product option even if it is out of stock?
On this page I wanted the option Red Ball 09/08/2021 to appear in the options list.
tennislife.sheenltsc.co.uk/index.php/sho...d-ball-week-9-13-aug
Thanks
It it possible to show a product option even if it is out of stock?
On this page I wanted the option Red Ball 09/08/2021 to appear in the options list.
tennislife.sheenltsc.co.uk/index.php/sho...d-ball-week-9-13-aug
Thanks
Please Log in or Create an account to join the conversation.
5 years 3 months ago #334838
by nicolas
Replied by nicolas on topic Is it possible to activate the waiting list for product options
Hi,
While showing the option even if it is out of stock is quite easy (you can just change the code
to
in the same view file), the add to cart will be refused if the option is selected since it doesn't have stock anymore.
While showing the option even if it is out of stock is quite easy (you can just change the code
Code:
if(!$optionElement->product_published || empty($optionElement->product_quantity))
Code:
if(!$optionElement->product_published)
Please Log in or Create an account to join the conversation.
5 years 3 months ago #334871
by sheenltsc
Replied by sheenltsc on topic Is it possible to activate the waiting list for product options
Perfect. Thanks.
Would it be possible to add static text next to the stock amount in the dropdown?
Would it be possible to add static text next to the stock amount in the dropdown?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
5 years 3 months ago #334873
by Mohamed Thelji
Replied by Mohamed Thelji on topic Is it possible to activate the waiting list for product options
Hello,
To do it, you'll probably just have to edit the line you previously changed :
And replace it by :
Kind regards,
Mohamed.
To do it, you'll probably just have to edit the line you previously changed :
Code:
$option_values[] = JHTML::_('select.option', $optionElement->product_id, $text. ' '.$optionElement->product_quantity);
And replace it by :
Code:
$option_values[] = JHTML::_('select.option', $optionElement->product_id, $text. ' Your_Static_Text'.$optionElement->product_quantity);
Kind regards,
Mohamed.
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds