- Posts: 209
- Thank you received: 18
Missing quantity box on product page
-- Joomla version -- : 3.4.5
I cannot get a quantity input box to display on a product that has characteristics&variants.
- The product is a t-shirt and is accessible only as a "related product" on another product. I have set up the t-shirt product as a "related" module and set that module to show at the bottom of the parent's product page. The module has "Quantity field on 'Add to cart' button" set to YES.
- The t-shirt product has variants - 5 sizes and 2 colors.
- All variants are the same price but have different images.
- On the product page for the t-shirt, the size and color variants show as radio buttons and there is an "Add to cart" button.
- However there is no quantity box, therefore a customer can only buy 1 t-shirt in a particular size/color combo. In order to buy more of the same size/combo it must be done in the checkout.
How do I get a quantity box to show above the Add to cart button?
My module settings
Please Log in or Create an account to join the conversation.
Check "Display the quantity field on the product page" ( www.hikashop.com/support/support/documen...ig.html#main_product )
Just FYI, for the input method you also have:
"Quantity input method" ( www.hikashop.com/support/support/documen...tml#display_products )
and, for individual products, "Quantity input" ( www.hikashop.com/support/documentation/i...ct-form.html#display )
And in 2.6.0 you then have an Inherit/Yes/No button group for "Quantity input" in product & category listing menu items and modules, too.
There you go. And you see, the product documentation works wonder, also for someone who's as long around as you are, lol! Entering "quantity input" in the search there would have given you the results you needed...
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
Just FYI, I did spend quite a bit of time searching the forum/documentation and also googling same - this forum is not the only place that discusses Hikashop solutions - and I do prefer to only annoy the Hikashop guys if all else has failed and particularly when threads in the search result have been around as long as I have!
Vive le France!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
This option is deprecated, we have to remove it. Thank you for this report.
Now there is the possibility to set the "Quantity input method" for each products, so this option can be used instead.
I just added an option to not have quantity input, please edit the file "administrator/components/com_hikashop/types/quantitydisplay.php" and replace:
Add the following translation override:
SHOW_NONE="None"
And finally replace the view "product / show_quantity" by:
Then you just have to select "None" in the global configuration of HikaShop and select the desired value for the products.
Please Log in or Create an account to join the conversation.
Mine looks different but I still think I have everything correctly checked.
Please Log in or Create an account to join the conversation.
Did you change the code snippets as Xavier explained ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Your version can support the modifications given.
So you can give it a try
www.hikashop.com/support/documentation/s...ize-the-display.html
Please Log in or Create an account to join the conversation.
Add the following translation override:
SHOW_NONE="None"
And after that I'll be stuck on the third part :}
Where do I add the translation override?
Please Log in or Create an account to join the conversation.
Here is how to translate in HikaShop: hikashop.com/support/faq.html#tran
But this is not mandatory.
For the third part, you have to go through HikaShop > Display > Views, then edit the view "product / show_quantity" and remove all the current code, then paste the given one.
This is explained in this tutorial:
www.hikashop.com/support/documentation/s...ize-the-display.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You seems to have restrictions due to your server.
But there is another way to edit a view, by using the template override in Joomla directly or via FTP.
Joomla method: In Extensions > Templates click on your template name in the "Templates" column, then "Create an overrride" tab, select com_hikashop > product. Go in the "Editor" tab and click on "html/com_hikashop/product/show_quantity". Paste the modifications and save. The bad thing with this method is that it creates an override for all the product views and not only on the desired one.
FTP method: Go in the folder templates/YOUR_TEMPLATE/html/ and create a folder "com_hikashop", then a folder "product" and finally the file "show_quantity.php" and paste the code in that file.
Please Log in or Create an account to join the conversation.
The first image is my admin panel after going to system>configuration and the second image is my product page.
Please Log in or Create an account to join the conversation.
Can you do a screenshot of the code that you have in the quantitydisplay view file so that we can check what you did ?
You must have made a mistake there.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The issue is in the file "administrator/components/com_hikashop/types/quantitydisplay.php" at the line 14 there is a missing simple quote. I guess that your current code is:
hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.