WebSite X5Help Center

 
Derek K.
Derek K.
User

Setting minimum items in shopping cart query  en

Author: Derek K.
Visited 863, Followers 1, Shared 0  

On https://orangedream.com it is possible to buy products with a discounted price based on the customers selection. However the customer could select say buy 5-9 at £4.00 each item but only put 2 items in the cart and then checkout. Is it possible to have some code that I could put in the expert section that restricts the customer from checking out unless they have purchased a minimum of 5 products. Also the same option for buying 10+.

Thanks

Posted on the
15 ANSWERS - 4 USEFUL - 1 CORRECT
Axel  
Axel  
User

Hello Derek,

Look at my demo: https://wsx5demo.afsoftware to see if it somehting like that !

And also to limit the maximum quantity for one product

Enjoy!
Axel

Read more
Posted on the from Axel  
Derek K.
Derek K.
User
Author

Hi Axel,

I cannot access the URL you provided. The issue I have is setting a minimum number for purchase when different products are chosen. For example someone could buy 4 diiferent vapes and go through checkout when the minimum total order number is 5.

Any ideas would be most appreciated. I suspect that some custome code in expert might work but I do not have the programming skills.

Thanks

Regards

Derek

Read more
Posted on the from Derek K.
Axel  
Axel  
User

Oups sorry...

https://wsx5demo.afsoftware.fr

Scripts here does not provide your needs, but not so far.

May be expert will give you an extra code.

Enjoy!
Axel

Read more
Posted on the from Axel  
Derek K.
Derek K.
User
Author

Thanks anyway

Read more
Posted on the from Derek K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Best User of the month PT

...!... LINK ...?... 

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
Axel  
Axel  
User

@KolAsmin

You can do that on my demo https://wsx5demo.afsoftware.fr
And  after I can integrate your advice to help users like previously.

By example we can decide to have 10 products mini into the cart to continue

Enjoy!
Axel

Read more
Posted on the from Axel  
Derek K.
Derek K.
User
Author

For Axel, I had a look at your website but could not identify the information. Can we communicate directly. My email is *** 

Thanks

Derek

Read more
Posted on the from Derek K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Best User of the month PT
Axel  
@KolAsmin You can do that on my demo https://wsx5demo.afsoftware.fr ... ... ... 

... x CART/INDEX ...
... for at least 5 products >> >> minK=5; //... Minimum value ...

<style>
.hover { opacity:0.7}
#cart-sidebar .proceed-to-order { display:none !important}
#div_K1 { position:relative;width:100%;bottom:35px;text-align:left}
#div_K2 { position:absolute;width:80px;right:0px;height:40px;cursor:pointer}
</style>
<script>
/** -- x CART controllo quantità prodotti by KolAsim -- **/
$( document ).ready(function() { //K>:
ritardoK=3;
minK=5; //... Minimum value ...
setTimeout(function(){ //K1>;
divK1='<div id="div_K1" ><div id="div_K2" title="Procéder >>" > </div></div>';
$("#cart-container .btn-next").append(divK1)
$("#div_K2").click(function(){ totaleProdottiK() })//K2>|<<
$("#div_K1").hover( function() {//K3>
$(".btn-next input").addClass( "hover" );
}, function() {$(".btn-next input").removeClass( "hover" );
});//K3<<
}, ritardoK * 1000); //K1<<;
}); //K<<;
//---------K--------------------------------------
function totaleProdottiK() {//K4>
TotKx=parseInt($(".s-cell-desc").text()); //alert(TotKx)
if(TotKx < minK){ //K5>
alert("Attention!\nPurchase at least five (5) Products\nThank you!");
} else {
setTimeout(function(){
$(".btn-next input").click()
}, 500);
}//K5<<
}//K4<<<
</script>

.

ciao

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Best User of the month PT

Derek K.

... x CART/INDEX ...
... for at least 5 products >> >> minK=5; //... Minimum value ...

<style>
.hover { opacity:0.7}
@media(min-width:480px){
#cart-sidebar .proceed-to-order { display:none !important}
#div_K1 { position:relative;width:100%;bottom:40px}
#div_K2 { position:absolute;width:230px;right:0px;height:40px;cursor:pointer}}
@media(max-width:479px){
#div_K1 { position:relative;width:100%;bottom:45px;text-align:left;}
#div_K2 { position:relative;width:230px;margin:auto;height:50px;cursor:pointer}}
</style>
<script>
/** -- x CART controllo quantità prodotti by KolAsim -- **/
$( document ).ready(function() { //K>:
ritardoK=3;
minK=5; //... Minimum value ...
setTimeout(function(){ //K1>;
divK1='<div id="div_K1" ><div id="div_K2" title="Proceed with the order" > </div></div>';
$("#cart-container .btn-next").append(divK1)
$("#div_K2").click(function(){ totaleProdottiK() })//K2>|<<
$("#div_K1").hover( function() {//K3>
$(".btn-next button").addClass( "hover" );
}, function() {$(".btn-next button").removeClass( "hover" );
});//K3<<
}, ritardoK * 1000); //K1<<;
}); //K<<;
//---------K--------------------------------------
function totaleProdottiK() {//K4>
TotKx=parseInt($(".s-cell-desc").text()); // alert(TotKx)
if(TotKx < minK){ //K5>
alert("Attention!\nPurchase at least five (5) Products\nThank you!");
} else {
setTimeout(function(){
$(".btn-next button").click()
}, 500);
}//K5<<
}//K4<<<
</script>

.

ciao

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
Derek K.
Derek K.
User
Author

Thanks, which page should I enter the code. Cart and Checkout before the header?

Read more
Posted on the from Derek K.
Derek K.
Derek K.
User
Author

Hi KolAsmin,

I cannot get the script to work. My layout looks different to yours.

Read more
Posted on the from Derek K.
Derek K.
Derek K.
User
Author

Thank you very much that works.

Read more
Posted on the from Derek K.