Globally Set the Product Qty select box default

  • Posts: 28
  • Thank you received: 0
  • Hikashop Business
5 years 1 week ago #305824

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.4
-- PHP version -- : 7.0.32
-- Browser(s) name and version -- : Firefox, Chrome
-- Error-message(debug-mod must be tuned on) -- : No Errors

Hi I was wondering if in HikaShop Business there is a way to set the product qty select box to allow for selection of up 100 by default. I see this appears to be set from the products specifications in the back-end for each product.
For example my products Restrictions and Dimensions settings are set to allow "unlimited" quantity per order. When set like this, it appears to default the select box to a maximum of 15.
Can I change this default to 100 somewhere or would I need to specify "100" in each product. I'm hoping for a Global option. My settings under Configuration -> Display -> Product Options settings are Quantity Input Method - Show Select, see attachments. Also attached is a front end view of the qty select box.

Thanks in advance.

Attachments:

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
5 years 1 week ago #305832

Hi,

If you set the "quantity per order" to 100 in the "max" field (the second one), the dropdown will go up to a 100.

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

  • Posts: 28
  • Thank you received: 0
  • Hikashop Business
5 years 1 week ago #305848

Hi Nicolas,

Yes that does work. I was wondering if there was somewhere you could set this value globally, so that it is 100 by default. Is that possible or do I have to update this value for each product? Thanks!

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
5 years 1 week ago #305849

Hi,

There is no central option. However, there are two ways you can do that easily for all the products:
1. You can create a massaction to update the product_max_per_order field of the products all at once:
www.hikashop.com/support/documentation/167-massaction-form.html
You can even configure the mass action with a trigger on the product creation so that you won't have to set it for new products.

2. You can edit the file "quantity.php" of the view "layouts" via the menu Display>Views and change the line:
$max_quantity = (int)$min_quantity * 15;
However, this is only for the product listing and product page. For the checkout, cart, and legacy views, you would have to change that same line in other view files:
checkout/show_block_cart.php
checkout/cart.php
product/show_block_characteristic.php
product/show_quantity.php
product/add_to_cart_listing.php
You might not need to change all of them. It depends on how your shop is configured. At least show_block_cart.php and quantity.php will be necessary.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum