Post by dramony » Thu May 13, 2010 3:25 pm

Hi,

I am trying out something with the quantity input box(beside Add to Cart) on the product page and now stuck with a problem. I want to set a minimum order for products from the BO, already set up the things there and its working. Let say for example i have set 3 as a minimum number of order on a certain product at the BO.

Now the quantity input box is calling $min_order set from the BO.
Image

Code: Select all

<input type="text" name="quantity" value="<?php echo $min_order; ?>" onchange=" -?- "/>
The problem is on the Front: how to validate it from the input box if the customer puts a qty lower than the minimum order?

I know what i need is to call a function to validate it. But too bad my php/javascript is not yet that good. :P
Can somebody please help me?
Thank you.

Active Member

Posts

Joined
Sat Oct 24, 2009 12:34 pm

Post by ssjal » Wed May 19, 2010 8:20 pm

hi,
i have implemented the Product level minimum quantity.

My procedure was:
1) created minimum_qty field in BO.
2) fetched the minimum_qty value on product page.
3) compared using javascript fetched minimum_qty value and user entered value.

i have posted in the contributions section of the forum

Link is:
http://forum.opencart.com/viewtopic.php ... ity#p49444" onclick="window.open(this.href);return false;

Hope this will help you.

New member

Posts

Joined
Thu Sep 17, 2009 4:45 pm

Post by DaniellY » Tue Sep 27, 2011 4:01 pm

ssjal wrote:hi,
i have implemented the Product level minimum quantity.

My procedure was:
1) created minimum_qty field in BO.
2) fetched the minimum_qty value on product page.
3) compared using javascript fetched minimum_qty value and user entered value.

i have posted in the contributions section of the forum

Link is:
http://forum.opencart.com/viewtopic.php ... ity#p49444" onclick="window.open(this.href);return false;

Hope this will help you.
yeap, i made much use of it! thank you for step-by-step instruction.

Newbie

Posts

Joined
Thu Sep 08, 2011 4:45 pm
Who is online

Users browsing this forum: No registered users and 132 guests