News:

Looking for documentation? Take a look on our wiki

Main Menu

Default Minimum Quantity for product in a category?

Started by SoTrue, December 13, 2016, 23:03:05 PM

Previous topic - Next topic

SoTrue

Hi All,

Is it possible to set a default minimum order quantity for products in a particular category? I don't mind if this requires  a core hack. I have a client who sells wholesale, they have a category called 'Wholesale' so all products in this category have a minimum order quantity of '6'. Is there a way to automatically create this minimum order quantity if this category is selected? i.e add some code such as:

if 'category' == ID17 then Minimum Quantity = 6

Im not a php coder, but would be happy to try and figure this out if there is anyone that can provide guidance?

Some questions:

Which file would require to be modified to include this on product creation and update the quantity in the database when the product is created?

Thank you in advance,
Donna

SoTrue

Ok, I've just found product_edit_status.php which contains:

<th style="text-align:right;">
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_MIN_ORDER'?>
</th>
<td>
<input type="text" class="inputbox"  name="min_order_level" value="<?php echo $this->product->min_order_level?>" size="10" />
</td>


Can this be modified to do what I need?