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

#   How to change the text of availability of product

##

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

Less More

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

10 years 6 months ago [\#239852](#239852) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#239852 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")* was created by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")*

-- url of the page with the problem -- : [ kosmima-gkiotli.gr](http://kosmima-gkiotli.gr)
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.4.45
-- Browser(s) name and version -- : Firefox 46.0.1

Hi,
I was able to display the text "Available in 3 to 5 days" when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product_quantity == -1) {“
and I have put the code :
$text = JText::_('Παράδοση σε 3 με 5 μέρες');
echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;';

But I don't know how to make a code which will display the text "Available in 1 to 15 days" when the value in field "quantity" of the product is "-2"
Could you help me;

Thanks in Advances

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 6 months ago [\#239858](#239858) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#239858 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

It's quite similar: Code:

if($this-&gt;row-&gt;product_quantity == -1) { $text = JText::_('Παράδοση σε 3 με 5 μέρες'); echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;'; } if($this-&gt;row-&gt;product_quantity == -2) { $text = JText::_('Παράδοση σε 5 με 15 μέρες'); echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;'; }

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

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

Less More

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

10 years 6 months ago [\#239895](#239895) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#239895 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

I try it, but the page is like the photo that I have attached and named "with changed code", you can see the photo named "with normal code" to see the difference. Also I have attached the "normal quantity.php.txt" and the "changed quantity.php.txt" to see the differece, I believe that it will help.

- [ ![with&#95;changed&#95;code.jpg](/forum/attachment/31364) ](/forum/attachment/31364 "...anged&#95;code.jpg") [ ](/forum/attachment/31364?download=1 "...anged&#95;code.jpg")
- [ ![with&#95;normal&#95;code.jpg](/forum/attachment/31365) ](/forum/attachment/31365 "...ormal&#95;code.jpg") [ ](/forum/attachment/31365?download=1 "...ormal&#95;code.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 6 months ago [\#239899](#239899) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#239899 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

Turn on the "error reporting" setting of the Joomla configuration and you'll get the error message with the line number where the problem is.
I would guess that it might be coming from JText.
Try:
$text = 'Παράδοση σε 3 με 5 μέρες';
instead of:
$text = JText::_('Παράδοση σε 3 με 5 μέρες');
(and same for the other quantity)

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

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

Less More

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

10 years 6 months ago [\#240241](#240241) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#240241 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,
I have turn on the "error reporting" and when I change the code as you said to me display the follow message:

"Parse error: syntax error, unexpected '}' in /var/www/vhosts/kosmima-gkiotli.gr/httpdocs/templates/protostar/html/com_hikashop/product/quantity.php on line 186"

Could you take a look?
If you want I could send you the username and the password of the site.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 6 months ago [\#240248](#240248) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#240248 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

As there error says, there is a problem with what you wrote on line 186.
Please provide the full file content and we can tell you what's wrong.

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

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

Less More

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

10 years 6 months ago [\#240623](#240623) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#240623 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,
I have attached the full file content .

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 6 months ago [\#240627](#240627) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#240627 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

The problem is that you removed the line:
if($this-&gt;row-&gt;product_quantity == -1) {
that should be just before the code:
?&gt;
&lt;div class="hikashop_product_stock"&gt;&lt;?php
in that file, as it is by default.
Add it back and it will work.

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

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

Less More

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

10 years 6 months ago [\#240720](#240720) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#240720 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,
Ok now it works correct with the above code:

if($this-&gt;row-&gt;product_quantity == -1) {
$text = JText::_('Διαθέσιμο σε 1 έως 5 μέρες');
echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;';
}
if($this-&gt;row-&gt;product_quantity == -2) {
$text = JText::_('Διαθέσιμο σε 1 έως 15 μέρες');
echo '&lt;span class="hikashop_product_stock_count"&gt;'.$text.'&lt;br/&gt;&lt;/span&gt;';
}

if(($this-&gt;row-&gt;product_quantity == -1 &#124;&#124; $this-&gt;row-&gt;product_quantity == -2)) {

Thanks for your support ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

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

10 years 1 month ago [\#251584](#251584) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#251584 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,
I have made the changes and appears perfect but when a customer try to complete a order with a product that has "quantity == -2" the system doesn't complete the order, because the system thinks that the product it is not available. Can I disable that property or via code or via option of the system. So to can the customer to complete the order without problem?

Thanks in advances

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 1 month ago [\#251585](#251585) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#251585 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

Yes, the value -2 is normally not a valid quantity.
You would have to edit the file administrator/components/com_hikashop/classes/cart.php to change that.
For example, that line:
if($product-&gt;product_quantity!=-1 &amp;&amp; $product-&gt;product_quantity &lt; $product-&gt;cart_product_quantity){
should be:
if($product-&gt;product_quantity&gt;0 &amp;&amp; $product-&gt;product_quantity &lt; $product-&gt;cart_product_quantity){

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

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

Less More

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

10 years 1 month ago [\#251697](#251697) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#251697 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,
as you can see on the image that I have attached the folder "classes" does't exist on "administrator/components/com_hikashop", I have found the file "cart.php" on folder "controllers" but there aren't the line
"if($product-&gt;product_quantity!=-1 &amp;&amp; $product-&gt;product_quantity &lt; $product-&gt;cart_product_quantity){"
what is wrong?

-

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

10 years 1 month ago [\#251770](#251770) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#251770 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

Hi,

You're looking at components/com_hikashop/ and not administrator/components/com_hikashop/

The following user(s) said Thank You: [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")

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

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

Less More

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

10 years 1 month ago [\#251780](#251780) by [Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")  Replied by *[Poukamisas](/forum/user/37304-poukamisas "View Poukamisas's Profile")* on topic *[How to change the text of availability of product](/forum/4-how-to/884460-how-to-change-the-text-of-availability-of-product#251780 "-- url of the page with the problem -- :   kosmima-gkiotli.gr  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 46.0.1  Hi, I was able to display the text &quot;Available in 3 to 5 days&quot; when I put nothing in the field quantity (on product), as I have change the code in file “quantity” as I have found the line : if($this-&gt;row-&gt;product&#95;quantity == -1) {“ and I have put the code : $text = JText::&#95;('Παράδοση σε 3 με 5 μέρες'); echo ''.$text.'';  But I don't know how to make a code which will display the text &quot;Available in 1 to 15 days&quot; when the value in field &quot;quantity&quot; of the product is &quot;-2&quot; Could you help me;  Thanks in Advances")*

It works! thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NDQ2MC1ob3ctdG8tY2hhbmdlLXRoZS10ZXh0LW9mLWF2YWlsYWJpbGl0eS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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.091 seconds

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