- Posts: 1184
- Thank you received: 13
Change behaviour on the instock filter
Is it possible to make filter "instock" to apply on quantity -1 and 0 ? Now its working for 0 only.
Thanks!
Please Log in or Create an account to join the conversation.
Please provide basic details of your current configuration ; starting with the HikaShop version number you're using and details about your product page overrides.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Joomla 3.6.4
I have some overides, like
filter.php
listing_price.php
show_default.php
Please Log in or Create an account to join the conversation.
Please note that you're using an old version of HikaShop (September 2015)
Your issue has been fixed in recent packages.
www.hikashop.com/support/documentation/5...ashop-changelog.html
Here a thread talking about it :
www.hikashop.com/forum/product-category-...duct-micro-data.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
I installed the lastest version. It didn t change anysting with thw instock filter. Maybe you didnt understand the issue. In stock works only with quantity 0 . I needed it to work also for -1 (unlimited quantity.
Please Log in or Create an account to join the conversation.
I'm afraid that does not make any sense.
Here the code in HikaShop 3 :
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
What do you mean by "it doesn t make any sense" ?
You re not helping me, you re judging me .
Please Log in or Create an account to join the conversation.
<meta itemprop="availability" content=" schema.org/ row->product_quantity != 0) ? 'InStock' : 'OutOfstock' ;?>" />
Please Log in or Create an account to join the conversation.
The content you're looking for is in the product page (show_default, show_tabular, show_reverse).
As I mentioned in the the forum thread I gave you before :
www.hikashop.com/forum/product-category-...as-stock.html#253948
And in very old version of HIkaShop, the micro data was split in a lot of view, as you can see in that post :
www.hikashop.com/forum/product-category-...uct-view.html#246902
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Sorry but I believe its not the case.
I need my filter module to work
"Hi!
Is it possible to make filter "instock" to apply on quantity -1 and 0 ? Now its working for 0 only.
Thanks!"
I tried the file and checked the overrides too. Should this file be in filters somewhere, or in a plugin?
Please Log in or Create an account to join the conversation.
You have to know that in his normal and default behavior the stock filter with "in stock" will take ALL product quantity (>0) AND unlimited (-1)
That's a logical way to proceed because unlimited, means available.
And so, your question isn't logical,:
because by default must be the default way to proceed, and so idea judgement isn't the point..."I needed it to work also for -1 (unlimited quantity)."
But maybe there is for some reason a bug ?...
I note that you have some override on your filter view, can you try to remove (after save it on your side) this override?
If after this, your filter behavior is corrected, that's mean that your override make something wrong.
This point isn't easy to understand:
So you mean in stock => 0 stock ?..."Is it possible to make filter "instock" to apply on quantity -1 and 0"
Well, maybe tour have a precise purpose or context but just this is difficult to understand.
Awaiting news from you.
Regards
Please Log in or Create an account to join the conversation.
But -1 which means unlimited, for me in my shop, I want it to mean "not available" when the user uses the instock filter.
Its a matter of time.
Please Log in or Create an account to join the conversation.
Then it's not a bug but some custom coding you want.
You'll have to change the line:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Its on the administrator/..
Please Log in or Create an account to join the conversation.
Sure. You can copy the file to templates/YOUR_TEMPLATE/html/com_hikashop/administrator/classes/filter.override.php and rename the class hikashopFilterClass to hikashopFilterClassOverride in it and the system should automatically use your file and class instead of HikaShop's core one.
Please Log in or Create an account to join the conversation.