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

#   Add text before quantity box

##

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#98043](#98043) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98043 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")* was created by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")*

Hello,

I would like to add text before the quantity box. Please see the pictures attached to see what i mean.

Many thanks in advance!

Max

- [ ![MockUp1.JPG](/forum/attachment/9523) ](/forum/attachment/9523 "MockUp1.JPG") [ ](/forum/attachment/9523?download=1 "MockUp1.JPG")
-

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgwMTE0LWFkZC10ZXh0LWJlZm9yZS1xdWFudGl0eS1ib3g/dG1wbD1tYXJrZG93bg==) 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: 86561
- Thank you received: 14307
-
-

13 years 7 months ago [\#98062](#98062) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98062 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi,

You can add your text after the line:
&lt;div class="hikashop_product_stock"&gt;
in the 'quantity' file of the view "product" via the menu display-&gt;Views.

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#98093](#98093) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  Replied by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98093 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi nicolas,

Thanks for the quick reply. How can I make it bold and put it at the same line as the quantity box? Because now it is located on the top of the quantity box. Please see the picture attached.

- [ ![Pic1.JPG](/forum/attachment/9530) ](/forum/attachment/9530 "Pic1.JPG") [ ](/forum/attachment/9530?download=1 "Pic1.JPG")

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#98148](#98148) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  Replied by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98148 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

I also found that if I add the text quantity in the location you suggested, it appears everywhere before add to cart button; not only in product page but everything that has "Add to cart" button, such as product listing and related products.

How can I make it so this change only appears in the product page Nicolas?

Many thanks in advance!

Max

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#98205](#98205) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98205 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi,

To make it bold, you can use the tags &lt;b&gt; &lt;/b&gt;.
If you want to move it on the same line of the input field, you can probably do that via css, or you will have to add divs to display the content one next to the other one.

To make it appear only on the product page, you can add an if condition around the "quantity" text, like: Code:

if(JRequest::getString('task') == 'show'){ // display the quantity text }

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#98412](#98412) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  Replied by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98412 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi Xavier,

Thanks for the reply! Ok I got how to make it bold, no problem there.

I am afraid I don't really get the second instruction. Is it possible for you to explain it more clearly? (or maybe even provide me with a piece of code that can make it work, i would really appreciate this since i am not very savvy with php)

Many thanks in advance.

Max

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#98471](#98471) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98471 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi,

Are you talking about:

> If you want to move it on the same line of the input field, you can probably do that via css, or you will have to add divs to display the content one next to the other one.\[/code\]
>
> If it is, you can use something like:
>
> Code:
>
> &lt;div class="hikashop_product_stock" style="width: 305px;"&gt; &lt;div style="width: 50px; float:left;"&gt; &lt;b&gt;Quantity:&lt;/b&gt; &lt;/div&gt; &lt;div style="width: 250px; float:left;"&gt; // the add to cart part &lt;/div&gt; &lt;/div&gt;
>
>
>
>
> Usually we don't give code for customizations, it's a support forum for bus and config problems.
> Hope you understand. ![:)](/media/kunena/emoticons/3.png ":)")

The following user(s) said Thank You: [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#98726](#98726) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  Replied by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98726 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi Xavier,

Yes, of course I understand ![:)](/media/kunena/emoticons/3.png ":)") I am very thankful for your replies, the solution works very well. Thank you for that.

I hope you would be kind enough to answer one more question of mine regarding quantity text. Currently, the quantity text in the product page appear both in the main product and in the related product section (please see my attachment). I would like to show it only in the main product, and not in the related products (the yellow one).

Would this be possible? If you can give me even just the general information on how to do it, that would be fantastic.

Many thanks in advance Xavier.

- [ ![Pic1&#95;2013-04-11.JPG](/forum/attachment/9598) ](/forum/attachment/9598 "...2013-04-11.JPG") [ ](/forum/attachment/9598?download=1 "...2013-04-11.JPG")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#98767](#98767) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#98767 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Hi,

I think that you can add an if condition aroud the quantity text like: Code:

if($module_id == 0){ // Display quantity text. }

The following user(s) said Thank You: [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

13 years 7 months ago [\#99017](#99017) by [max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")  Replied by *[max.mandias](/forum/user/14291-max-mandias "View max.mandias's Profile")* on topic *[Add text before quantity box](/forum/4-how-to/80114-add-text-before-quantity-box#99017 "Hello,  I would like to add text before the quantity box. Please see the pictures attached to see what i mean.  Many thanks in advance!  Max")*

Thank you so much Xavier!

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

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