[Skip to main content](#vessel-content)

#   My (workaround) for an inventory backorder system

##

- **[karlvann](/forum/user/7701-karlvann "View karlvann's Profile")**
- [![karlvann's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7701-karlvann "View karlvann's Profile") Topic Author
- [ Offline](/forum/user/7701-karlvann)

Less More

- Posts: 37
- Thank you received: 2
-
-

13 years 11 months ago [\#80961](#80961) by [karlvann](/forum/user/7701-karlvann "View karlvann's Profile")  *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#80961 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")* was created by *[karlvann](/forum/user/7701-karlvann "View karlvann's Profile")*

I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.

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"&gt;'.JText::sprintf('X_ITEMS_IN_STOCK',$this-&gt;row-&gt;product_quantity-1000).'&lt;/span&gt;&lt;br/&gt;';

---

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&amp;childforums=1](http://www.hikashop.com/en/forum/search.html?q=if%28%24this-%3Erow-%3Eproduct_quantity&childforums=1)

Here is the code after I changed it.

if($this-&gt;row-&gt;product_quantity&lt;1001)
echo '&lt;span class="hikashop_product_stock_count"&gt;'.JText::_('This size/colour is on backorder so it might take around ten days for delivery').'&lt;/span&gt;&lt;br/&gt;';

I added the &lt;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.

[ ![Ice&#95;Base&#95;2012-12-08&#95;20-29-33.png](/forum/attachment/7450) ](/forum/attachment/7450 "...8&#95;20-29-33.png")

- [ ![Ice&#95;Base&#95;2012-12-08&#95;20-29-33.png](/forum/attachment/7450) ](/forum/attachment/7450 "...8&#95;20-29-33.png") [ ](/forum/attachment/7450?download=1 "...8&#95;20-29-33.png")

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 11 months ago [\#257619](#257619) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#257619 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi, could you, please, advise where to find and change mentioned codes? I cannot find it and the link doesn´t work.
Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 11 months ago [\#257620](#257620) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#257620 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

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&gt;Views.
The cod eto change is now: Code:

if($this-&gt;row-&gt;product_quantity == 1 &amp;&amp; JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') $text = JText::sprintf('X_ITEM_IN_STOCK', $this-&gt;row-&gt;product_quantity); else $text = JText::sprintf('X_ITEMS_IN_STOCK', $this-&gt;row-&gt;product_quantity); echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;';

The following user(s) said Thank You: [montemama](/forum/user/43131-montemama "View montemama's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#259536](#259536) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259536 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#259538](#259538) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259538 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

No. You'll have to customize the file administrator/components/com_hikashop/classes/filter.php
and change the code: Code:

if($filter-&gt;filter_type=='instockcheckbox' &amp;&amp; $infoGet[0]=='in_stock'){ $filters[]=' b.product_quantity!=0 '; }

to: Code:

if($filter-&gt;filter_type=='instockcheckbox' &amp;&amp; $infoGet[0]=='in_stock'){ $filters[]=' (b.product_quantity==-1 OR b.product_quantity&lt;=1000 ) '; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#259560](#259560) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259560 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi Nicolas,

thank you for your effort, but when I use it, I get this error in frontend.
[ ![error.jpg](/forum/attachment/35584) ](/forum/attachment/35584 "error.jpg")

Error is still there also when I use the originial piece of code. I had to unpublish the filter and e-shop works again.
Any ideas why?

- [ ![error.jpg](/forum/attachment/35584) ](/forum/attachment/35584 "error.jpg") [ ](/forum/attachment/35584?download=1 "error.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#259588](#259588) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259588 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

Try adding the code: Code:

function getFieldToLoad($filter, $divName, &amp;$parent){ return ''; }

after the line: Code:

class hikashopInStockCheckboxClass extends hikashopFilterTypeClass{

in the file administrator/components/com_hikashop/classes/filter.php
That should fix the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#259628](#259628) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259628 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Error is gone, but the filter doesn´t work ![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#259657](#259657) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259657 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago -  9 years 9 months ago [\#259671](#259671) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259671 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Here is the filter setting.  [ ![filter0.jpg](/forum/attachment/35620) ](/forum/attachment/35620 "filter0.jpg")

You can try the result here: [ montemama.eu/index.php/eshop](http://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
[ ![error2&#95;2017-01-17-2.jpg](/forum/attachment/35624) ](/forum/attachment/35624 "...17-01-17-2.jpg")

.

- [ ![filter0.jpg](/forum/attachment/35620) ](/forum/attachment/35620 "filter0.jpg") [ ](/forum/attachment/35620?download=1 "filter0.jpg")
- [ ![filter1.jpg](/forum/attachment/35621) ](/forum/attachment/35621 "filter1.jpg") [ ](/forum/attachment/35621?download=1 "filter1.jpg")
- [ ![error2.jpg](/forum/attachment/35622) ](/forum/attachment/35622 "error2.jpg") [ ](/forum/attachment/35622?download=1 "error2.jpg")
- [ ![error2&#95;2017-01-17.jpg](/forum/attachment/35623) ](/forum/attachment/35623 "...2017-01-17.jpg") [ ](/forum/attachment/35623?download=1 "...2017-01-17.jpg")
- [ ![error2&#95;2017-01-17-2.jpg](/forum/attachment/35624) ](/forum/attachment/35624 "...17-01-17-2.jpg") [ ](/forum/attachment/35624?download=1 "...17-01-17-2.jpg")

Last edit: 9 years 9 months ago by [montemama](/forum/user/43131-montemama "View montemama's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#259673](#259673) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259673 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

Change the line: Code:

$filters[]=' (b.product_quantity==-1 OR b.product_quantity&lt;=1000 ) ';

to: Code:

$filters[]=' (b.product_quantity=-1 OR b.product_quantity&lt;=1000 ) ';

I made a typo in my previous code.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#259721](#259721) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259721 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Nicolas, without change. Any other ideas?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#259740](#259740) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#259740 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#260361](#260361) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260361 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi Nicolas,
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#260362](#260362) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260362 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

Ok. Then try with this line of code instead: Code:

$filters[]=' (b.product_quantity=-1 OR b.product_quantity&gt;=1000 ) ';

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#260462](#260462) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260462 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Without change. Filter still doesn´t work. May I send you admin login in private message? Would you try to check it?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#260467](#260467) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260467 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

Yes and please include a link to this thread in your contact message:
[ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)

The following user(s) said Thank You: [montemama](/forum/user/43131-montemama "View montemama's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

9 years 9 months ago [\#260851](#260851) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260851 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

We got the access but we're not able to access to your backend. We're getting the error below:
[ monosnap.com/file/54PetlwJMPpguC6IHlcTyw0pChNB5H](https://monosnap.com/file/54PetlwJMPpguC6IHlcTyw0pChNB5H)
Could you do something about it ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[montemama](/forum/user/43131-montemama "View montemama's Profile")**
- [![montemama's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43131-montemama "View montemama's Profile")
- [ Offline](/forum/user/43131-montemama)

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 9 months ago [\#260995](#260995) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#260995 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi Nicolas,
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#261102](#261102) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[My (workaround) for an inventory backorder system](/forum/2-general-talk-about-hikashop/76536-my-workaround-for-an-inventory-backorder-system#261102 "I really needed this function and I have no idea how to code, I found a simple solution that I wanted to share just in case anybody else was in the same situation.  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 &quot;-1000&quot; after product quantity. This way my front end displays the product inventory -1000, which is the real inventory.  class=&quot;hikashop&#95;product&#95;stock&#95;count&quot;&gt;'.JText::sprintf('X&#95;ITEMS&#95;IN&#95;STOCK',$this-&gt;row-&gt;product&#95;quantity-1000).'';  -----  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&amp;childforums=1  Here is the code after I changed it.  if($this-&gt;row-&gt;product&#95;quantity1001) echo ''.JText::&#95;('This size/colour is on backorder so it might take around ten days for delivery').'';  I added the y 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.")*

Hi,

Unfortunately, it's still the same.
[ pasteboard.co/t9p8f2hiE.png](http://pasteboard.co/t9p8f2hiE.png)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2NTM2LW15LXdvcmthcm91bmQtZm9yLWFuLWludmVudG9yeS1iYWNrb3JkZXItc3lzdGVtP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.158 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
