How to create a longer list of numbers that customers can choose to buy?

  • Posts: 48
  • Thank you received: 1
6 years 3 months ago #286211

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.3
-- PHP version -- : 7.0
-- Browser(s) name and version -- : chrome lates

Hi,

On the product pages I created a list instead of using the plus and minus buttons.

So the customer chooses the desired quantity via the list. However I need to make this list longer .. Now it doubles the minium quantity x 15 but I need to have this x100

Where can I change this?

Attachments:

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #286213

Hi,

You'll want to edit the "product / show_quantity.php" and / or the "layouts / quantity.php" view files via the menu Display>Views in order to change that.
There, you'll want to change the line:
$r = range($min_quantity, $max_quantity, $min_quantity);
to:
$r = range($min_quantity, XXX, YYY);
where XXX is to be replaced by the maximum number you want in the dropdown and YYY by the increment value for each choice of the dropdown between the min and the max.

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

  • Posts: 48
  • Thank you received: 1
6 years 3 months ago #286266

Hi,
Thanks for your answer.
I can not find the line you are talking about.

Could you tell me about which line this code should be?

Thanks!

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #286301

Hi,

With the 3.2.2 it's on line 91 in "product / show_quantity.php" and on line 81 in "layouts / quantity.php"

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

  • Posts: 48
  • Thank you received: 1
6 years 3 months ago #286391

Thanks for your answer. However I had to fix it in another way.

I found this line: $max_quantity = (int)$increment * 15;

And changed this to $max_quantity = (int)$increment * 300;

Now the minimum numbers to order go to (times) 300 in the list. Works good. Also had to change this in another file.

I have one question left .. I also need to change this in the shopping cart module. There you can also change the quantity. And this one is still set to the old default settings. (times) x 15.

Looked in many files but can not find it. Which file can I find this?

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #286392

Hi,

I would recommend that you activate the "Display view files" setting in the HikaShop configuration. You'll easily see which view file is used where by HikaShop.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum