Thank you for your answer, but that solution didn't work for me. Maybe there are some differents between v3 and v4 or maybe I have made some mistakes or understood wrong.
In orders_basket.tpl I inserted line below <input type="hidden" value="$aData[sProductsSummary]" alt="minOrd">
In core/checkForm.js I inserted function below and i think i made something wrong here. My minimum order value will be without any seperators. It's straight 50.
function checkOrderValue (oObj, sInfo) { var ordVal = oObj.value.replace (",", "."); var bCheck = true; if (parseFloat (ordVal) < minOrder) { bCheck = false; if (! sInfo) { var sInfo = cfToSmallOrder; cfLangNoWord = ""; } } return fieldOperations (oObj, bCheck, sInfo);
yes, you are right. the solution: the changes only in orders_basket.tpl in block: BEGIN BASKET_HEAD under the line: <script type="text/javascript" src="$config[dir_core]checkForm.js"></script> put: <script type="text/javascript"> <!-- var buttonNext=false; //--> </script> then the line: <form method="post" action="" onsubmit="return checkForm(this);"/> exchange with: <form method="post" action="" onsubmit="if(buttonNext==true){return checkForm(this);buttonNext=false;};"> then the line: <input type="submit" value="$lang[Basket_update]" class="submit"/> exchange with: <input type="submit" value="$lang[Basket_update]" class="submit" onclick="buttonNext=false;"/> then the line: <input type="submit" name="sSave" value="$lang[Save_basket]" class="submit"/> exchange with: <input type="submit" name="sSave" value="$lang[Save_basket]" class="submit" onclick="buttonNext=false;"/> and finally the line: <input type="submit" id="nextButton" name="sNext" value="$lang[Basket_next] >>" class="submit"/> exchange with: <input type="submit" id="nextButton" name="sNext" value="$lang[Basket_next] >>" class="submit" onclick="buttonNext=true;"/>
The changes perform the 'checkForm'-procedure only if the 'next'-button (go to order page) is clicked.
-------------------------------- yes, you are right. the solution: the changes only in orders_basket.tpl in block: BEGIN BASKET_HEAD under the line: <script type="text/javascript" src="$config[dir_core]checkForm.js"></script> put: <script type="text/javascript"> ------------------------------------- Here I can not understand. Everything else got up and running
with: 'yes, you are right' I mean, that the bug was there. It was not possible to recount basket (to achieve the minimum), if its value was smaller then the min_order. so I have put then the solution, that excludes the checkForm-procedure if the recount- or saveBasket button has been clicked.
I've got one more question. Above is solution for minimum order value in the basket, but how about minimum order summary on the order form page? I mean basket summary + shipping charge. I would like to set minimum total order value.
just put the 'alt="minOrd"' into the 'td' tag (in orders_form.tpl) with id="orderSummary". I mean exchange the line: <td id="orderSummary">$aData[sProductsSummary]</td> to: <td id="orderSummary" alt="minOrd">$aData[sProductsSummary]</td> should work. but I haven't tested yet.
Here is a bug too. All is ok till I choose payment and delivery I want. For example:
Min allowed order summary is 20 USD. I added to my cart products for 15 USD and filled out all gaps with my info except delivery and payment. Know I got an allert "Your total order summary must be at least 20 USD". Ok. But when I choose my delivery option (no matter it's free or it's 10 USD) I can finish my order successfully af 15 USD amount as well 20 USD or more.
when I find some more time, I'll try to workaroud this. If not till tomorrow evening, then beginning of the next week. Over the weekend I'm not in front of 'screen'.
I know this is a very old post but would you know where this script is located in Quick.cart 6.2? I don't find orders_basket.tpl or container.tpl page in this version.