1

I am creating a product info page, where you can select a product modifier (e.g. size, flavor), I have an issue.

First of all, according the Expresso-Store docs:

min_order_qty

The minimum order quantity for the product. If the product has more than one SKU, this will be the maximum of all minimum order quantities. If the product does not have any minimum order quantity, this will return 1. Useful for pre-populating the item_qty field:

Found that it actually returns the minimum of all min order quantities.

Changed the Product.php file on line 132 from:

if ($item->min_order_qty < $min_order_qty) {

to...

if ($item->min_order_qty > $min_order_qty) {

That seemed to resolve the issue of not returning the maximum of minimum order quantities.

Lastly, the issue remains that I need to be able to retrieve the individual min_order_qty's for each modifier option so that I may, for instance, update the Quantity field in the document dynamically.

Since the fields allow you to map a minimum order quantity to each stock (SKU) variant, I expected to a method to retrieve each of these quantity values.

Attached is an image of an example product modifier options for context: Example of product modifier options with different minimum order quantities.

1 Answer 1

1

This answer comes from Manuel over at DevDemon Support.

Thank you for the follow up! And indeed the fix is correct, we already encountered this and it was fixed for Store 2.4.

And for the minimum order qty inside the modifiers loop? Already possible, just not documented.

{modifier_options}
    {option_name} - Min Order Qty. {option_min_order_qty}
{/modifier_options}

Tested this and it does indeed work without a hitch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.