Quantity Pulldown / Bulk Ordering Feature

  • Posts: 69
  • Thank you received: 5
11 years 8 months ago #93907

Can we make the quantity a pulldown or make quantity required by 100's?

We only want to allow orders in bulk... by the 100's:

100
200
300
400
500
600
and so on...

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

  • Posts: 82795
  • Thank you received: 13354
  • MODERATOR
11 years 8 months ago #93924

Yes, that's possible as explained on that thread:
www.hikashop.com/en/forum/4-how-to/15254...uantity-ordered.html

The following user(s) said Thank You: mindstorm

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

  • Posts: 69
  • Thank you received: 5
11 years 7 months ago #94698

I have one product that needs a different pulldown quantity? is this possible?

Meaning ALL products use: 100/200/300/400
EXCEPT ONE product needs: 5/10/15/20

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

  • Posts: 82795
  • Thank you received: 13354
  • MODERATOR
11 years 7 months ago #94717

Yes, such overrides allow to do that but it's more complex as you need to write PHP code to change the quantity values based on the product where you are.

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

  • Posts: 69
  • Thank you received: 5
11 years 7 months ago #94724

any advice on where to start with this?

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

  • Posts: 82795
  • Thank you received: 13354
  • MODERATOR
11 years 7 months ago #94728

It's the same as the code of the thread I already gave a link to.
Simply add an if/else based on the product where you are. For example: if you want a specific dropdown for the product with the id 18 :

<?php
function hikashop_quantity_render($html,$i,$max_quantity,$min_quantity){
if(hikashop_getCID('product_id')==18){
return '<select id="hikashop_product_quantity_field_'.$i.'" name="quantity"><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select>'.$html;
}else{
return '<select id="hikashop_product_quantity_field_'.$i.'" name="quantity"><option value="50">50</option><option value="100">100</option><option value="200">200</option><option value="500">500</option></select>'.$html;
}
}

The following user(s) said Thank You: nui_meibao

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

Time to create page: 0.063 seconds
Powered by Kunena Forum