How to set minimum order value

baronjon

Avatar: baronjon

2011-05-15 11:19

How to set minimum order value (with included and excluded carrier price)? There should be two a little different solutions.

Thank you for your help and Have a nice day

» Quick.Cart v3.x

boboo

Avatar: boboo

2011-05-15 15:48

Try to translate this:
http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=7296

http://it-service.kimla.de QC- & QCMS-plugins

baronjon

Avatar: baronjon

2011-05-16 10:12

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.

What did I do:

en.php, lang_en.php, container.tpl - that's simple.

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);

}

baronjon

Avatar: baronjon

2011-05-16 10:22

I'm sorry. It work's fine. That was fault of translator before. Thank you a lot.

baronjon

Avatar: baronjon

2011-05-16 10:33

I have got a bug. When I press on Recount or Save basket button, I see the same alert "Your order must be at least 50...".

boboo

Avatar: boboo

2011-05-16 12:57

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]&nbsp;&nbsp;>>" class="submit"/>
exchange with:
<input type="submit" id="nextButton" name="sNext" value="$lang[Basket_next]&nbsp;&nbsp;>>" class="submit" onclick="buttonNext=true;"/>

The changes perform the 'checkForm'-procedure only if the 'next'-button (go to order page) is clicked.

http://it-service.kimla.de QC- & QCMS-plugins

mfoma

Avatar: mfoma

2011-05-17 08:59

Hello, boboo!
Please give detailed instructions for Quick.Cart v4.x for minimum order.
Thank you.

mfoma

Avatar: mfoma

2011-05-17 09:04

--------------------------------
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

boboo

Avatar: boboo

2011-05-17 09:23

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.

http://it-service.kimla.de QC- & QCMS-plugins

baronjon

Avatar: baronjon

2011-05-18 08:07

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.

boboo

Avatar: boboo

2011-05-18 08:29

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.

http://it-service.kimla.de QC- & QCMS-plugins

baronjon

Avatar: baronjon

2011-05-18 09:15

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.

boboo

Avatar: boboo

2011-05-18 09:24

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'.

http://it-service.kimla.de QC- & QCMS-plugins

baronjon

Avatar: baronjon

2011-05-18 09:25

my td's block where i made changes looks like shown below:

<td id="orderSummary" alt="minOrd">
<input type="hidden" value="$aData[sProductsSummary]" alt="minOrd">
$aData[sProductsSummary]</td>

baronjon

Avatar: baronjon

2011-05-23 13:02

boboo, what's new about this?

baronjon

Avatar: baronjon

2011-05-28 10:14

the solution was found :)

jpfreelance

Avatar: jpfreelance

2013-11-07 21:21

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.

JP

jpfreelance

Avatar: jpfreelance

2014-02-01 21:47

baronjon, can you post a link to your solution or give me a few pointers please?

JP Freelance

Back to top
about us | contact