Divisible quantity

  • Posts: 171
  • Thank you received: 9
10 years 4 months ago #200707

Hi!

As I see there's no option to set a quantity amount divisible by a set quantity, is there a way (probably a modification in Hikashop core) to achieve that?

I thought on that I should add minimum quantity a product in parameters, and if this quantity is different than 0, then cart should check whether the set amont is divisible by that number.

Would be great to have at least that solution for that "problem".
Thanks in advance!

Regards,
PePe

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

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #200717

Hello,

As I see there's no option to set a quantity amount divisible by a set quantity, is there a way (probably a modification in Hikashop core) to achieve that?

Can you give me more information about it ? what do you exatly mean by divisible quantity ?

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

  • Posts: 171
  • Thank you received: 9
10 years 4 months ago #200816

Mohamed Thelji wrote: Hello,

As I see there's no option to set a quantity amount divisible by a set quantity, is there a way (probably a modification in Hikashop core) to achieve that?

Can you give me more information about it ? what do you exatly mean by divisible quantity ?


Hi,

Yes, maybe I should be a little clearer. I write a small example to understand fully:
There's a product, for example gloves. We can sell now just by 400 pairs, so user should be able to take in cart 400,800,1200...etc.
For that "quantity step" I thought I use the min.order quantity, so I can set 400, but in cart when pressing +, the next value should be not 401, but 800. Also in checkout/cart system should check the quantity/min.quantity to be an integer (that's what I named no really clearly divisible earlier).

Regards,
PePe

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 4 months ago #200836

Hi,

You need to set the "quantity layout on product page" option of your product (or in the main configuration) to "Show select" and set the "minimum quantity" setting to 400 in your product and that will do it.

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

  • Posts: 171
  • Thank you received: 9
10 years 4 months ago #200884

nicolas wrote: Hi,

You need to set the "quantity layout on product page" option of your product (or in the main configuration) to "Show select" and set the "minimum quantity" setting to 400 in your product and that will do it.


Thanks Nicolas for the trick!

I've tested it on your demo site, it works well, but I use an earlier version Hikashop 2.3.2, before my subscription expired I also downloaded 2.3.5. Which files should I overwrite to have that work, as now we have a few core hacks/mods that's why we do not refreshed. Also now if I set it as you described only a select list is shown starting from 1 to 15.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #200921

Hi,

It will require many views and core file editions, about 12 files to add this complete option.

Else you can create a plugin an use the function "hikashop_quantity_render($html,$i,$max_quantity,$min_quantity);"
Topics can be found about that on the forum ;)

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

  • Posts: 171
  • Thank you received: 9
10 years 4 months ago #200985

Hi Xavier,

Thanks. I've just looked over the changelog, and this feature has been put in version 2.3.5, so my version should be enough.
I just wanted to get info which 12 files should be updated, no code needed, I thought on just the files list.

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 4 months ago #200989

Hi,

In a previous message you stated that you had the version 2.3.2 and the feature is listed in the changelog for the 2.3.5 version. So to me is sounds that it is not enough.
For a file list, I would say:
administrator/components/com_hikashop/helpers/cart.php
components/com_hikashop/views/product/view.html.php
components/com_hikashop/views/product/show_quantity.php
Beware that just replacing the files will probably break some stuff so you'll had to compare the content of the files.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum