Skip to main content

Quantity Pulldown / Bulk Ordering Feature

More
13 years 6 months ago #93907 by mindstorm
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.

More
13 years 6 months ago #93924 by nicolas
The following user(s) said Thank You: mindstorm

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

More
13 years 6 months ago #94698 by mindstorm
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.

More
13 years 6 months ago #94717 by nicolas
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.

More
13 years 6 months ago #94724 by mindstorm
any advice on where to start with this?

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

More
13 years 6 months ago #94728 by nicolas
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.212 seconds
Powered by Kunena Forum