WebSite X5Help Center

 
Derek K.
Derek K.
User

Setting minimum items in shopping cart query  en

Autor: Derek K.
Visitado 1037, Followers 1, Compartido 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

Publicado en
15 RESPUESTAS - 4 úTIL - 1 CORRECTO
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

Leer más
Publicado en de Axel  
Derek K.
Derek K.
User
Autor

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

Leer más
Publicado en de 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

Leer más
Publicado en de Axel  
Derek K.
Derek K.
User
Autor

Thanks anyway

Leer más
Publicado en de Derek K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

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

.

Leer más
Publicado en de  ‪ 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

Leer más
Publicado en de Axel  
Derek K.
Derek K.
User
Autor

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

Thanks

Derek

Leer más
Publicado en de Derek K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
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

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

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

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
Derek K.
Derek K.
User
Autor

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

Leer más
Publicado en de Derek K.
Derek K.
Derek K.
User
Autor

Hi KolAsmin,

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

Leer más
Publicado en de Derek K.
Derek K.
Derek K.
User
Autor

Thank you very much that works.

Leer más
Publicado en de Derek K.