- Posts: 37
- Thank you received: 2
My (workaround) for an inventory backorder system
First, I added 1000 to my all of my inventory. this way, if it says 1023, I know I have 23 available.
Second, I found this line, I had no idea what I was doing but it worked, I added "-1000" after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.
class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity-1000).'</span><br/>';
In the following link it explains how to add some code to notify the customers if there is less than a certain quantity.
www.hikashop.com/en/forum/search.html?q=...antity&childforums=1
Here is the code after I changed it.
if($this->row->product_quantity<1001)
echo '<span class="hikashop_product_stock_count">'.JText::_('This size/colour is on backorder so it might take around ten days for delivery').'</span><br/>';
I added the <1001 here, and my backorder message. This way as soon as the item reaches 0, it informs the customer of a longer waiting time, this is where my plan takes effect. Customers can order with the knowledge that it will take a bit longer due to the item not being in stock.
The only negative effect I can see here is that my inventory has plus 1000 products, But this doesn't bother me at all.
Please Log in or Create an account to join the conversation.
Thank you!
Please Log in or Create an account to join the conversation.
The code evloved a bit since then. It's the file "quantity" of the view "product" that you want to edit via the menu Display>Views.
The cod eto change is now:
Please Log in or Create an account to join the conversation.
is it possible to use in stock checkbox filter with this "+1000 quantity" hack?
Where and how do I need to customize the code?
Thanks in advance for your help.
Please Log in or Create an account to join the conversation.
and change the code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Try adding the code:
That should fix the problem.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Then could you provide a screenshot of the settings of your filter and a link to the page where we can try it ?
Please Log in or Create an account to join the conversation.
You can try the result here: montemama.eu/index.php/eshop
I tried to select"product category" in fileld Categories.
but, I got this error in frontend when I used the filter
.
Please Log in or Create an account to join the conversation.
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.
It's not possible that you get the exact same error message if you did that change.
Please provide the new error message you have and check that the code has been modified properly.
Please Log in or Create an account to join the conversation.
there is no error, but the filter doesn´t work. I get a list of all products, but not only those which are on stock, but completely all.
Please Log in or Create an account to join the conversation.
Ok. Then try with this line of code instead:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Yes and please include a link to this thread in your contact message:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
We got the access but we're not able to access to your backend. We're getting the error below:
monosnap.com/file/54PetlwJMPpguC6IHlcTyw0pChNB5H
Could you do something about it ?
Please Log in or Create an account to join the conversation.
could you, please, try it again? I hope I have fixed the problem with access. Please, let me know if it works now. Thank you!
Please Log in or Create an account to join the conversation.
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.