Add text before quantity box

  • Posts: 12
  • Thank you received: 0
11 years 7 months ago #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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82761
  • Thank you received: 13348
  • MODERATOR
11 years 7 months ago #98062

Hi,

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

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 7 months ago #98093

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.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 7 months ago #98148

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #98205

Hi,

To make it bold, you can use the tags <b> </b>.
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:

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

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #98412

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #98471

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:

<div class="hikashop_product_stock" style="width: 305px;">
	<div style="width: 50px; float:left;">
		<b>Quantity:</b>
	</div>
	<div style="width: 250px; float:left;">
                // the add to cart part
        </div>
</div>

Usually we don't give code for customizations, it's a support forum for bus and config problems.
Hope you understand. :)

The following user(s) said Thank You: max.mandias

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #98726

Hi Xavier,

Yes, of course I understand :) 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.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #98767

Hi,

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

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

The following user(s) said Thank You: max.mandias

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #99017

Thank you so much Xavier!

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum