Multiple quantities

  • Posts: 15
  • Thank you received: 1
11 years 2 months ago #90009

Hi there,

First of all: Great component! Works just great and easy to customize!

Before I used Virtuemart, but due to some limitations I'm using Hikashop for the first time now.
So far everything is working fine. There is only one thing that I can't get to work.

Some products are only sold in quantities of (for example) 5. So if someone wants to order this product it can only be in multiples of 5 (5,10,15,20,25,etc.)
Is it possible to do something like this in Hikashop?

Thanks in advance!

PS: Before, when working with Virtuemart someone made this addition for me forum.virtuemart.net/index.php?topic=101894.30 .

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #90049

Hi,

Yes it's possible, you have to create a file in the template folder to override the buttons.
Here is some documentation:
www.hikashop.com/fr/support/documentatio...tation.html#override

Chapter "for the quantity input", you can see the view "product / quantity" to use the default code for add to cart buttons.

www.hikashop.com/fr/forum/4-how-to/60489...-quanties.html#60489

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

  • Posts: 15
  • Thank you received: 1
11 years 2 months ago #90882

Okay, Thanks :)!

I'll read the documentation and hopefully I will be able to succesfully modify it..!

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

  • Posts: 15
  • Thank you received: 1
11 years 2 months ago #90886

Ok.. I've used the code that was given in the forum and the products now show a list of quantity options.
Unfortunately this still isn't the solution for me.

1- I'd prefer to have a plus/minus button since I don't want to limit the quantity (I could make a very long list, but that would be pretty ugly).
2- Some products have other quantities. The product in my first example was sold in quantities of 5, but we also sell produts in quantities of 6,7,8, and so on. With the solution provided there is only one override possible.

Too bad the HTML5 input type="number" isn't widely accepted yet, since you can specify a 'step' quantity for that :(.

Thanks again for helping out! Hopefully you will be able to point me in the right direction :)..

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

  • Posts: 26028
  • Thank you received: 4006
  • MODERATOR
11 years 2 months ago #90980

Hi,

I understand.
At this moment an javascript library could be useful in order to create a dynamic interface for the number selection.
I don't have any name but I guess that some should exists.

In Joomla3.0, they have added "chosen" which is pretty nice with long dropdown lists. Maybe it could help you.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 15
  • Thank you received: 1
11 years 2 months ago #91054

Hi,

Thanks for the information.
I probably have to go with Javascript then. I'll try to fix it myself, but I'll probably post a topic on the 'Commercial Jobs' forum in the near future :laugh:

Can you maybe tell me where it's specified that the plus and minus buttons add 1? Can't really find it in the product pages.
Thanks again!

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

  • Posts: 81658
  • Thank you received: 13089
  • MODERATOR
11 years 2 months ago #91155

Hi,

The code is actually in the file administrator/components/com_hikashop/helpers/cart.php

It can be overridden with a quantity field template override as explained on our developer documentation:
www.hikashop.com/en/support/documentatio...tation.html#override

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

Time to create page: 0.076 seconds
Powered by Kunena Forum