Please refer below code for this purpose. You would need to paste it in Settings ---> Advanced Feature --> Third party Javascript.



 

<style>
#buynow, #adding_in_cart,#continue_button .btnuni a {
background-color: #0089BC !important;
background-image: none !important;
border: 1px solid #0089BC;
</style>

<script>
  function addToCart(c){$j("#adding_in_cart").removeAttr("href");if(elementExists("product_option_id")){if($j("#product_option_id").val()==""){alert("Please select option");exit()}else{var b=parseInt($j("#max_available_quantity").val());var a=parseInt($j("#quantity").val());if(isNaN($j("#quantity").val())){alert("Please  select valid quantity");exit()}else{if($j("#quantity").val()==""){alert("Please select quantity");exit()}else{if(a<1){alert("Minimum select quantity is 1(one)");exit()}else{if(a>b&&b!=-1){alert("Max order quantity allowed for this product is "+b);exit()}else{var d="productId="+$j("#product_id").val()+"&productOptionId="+$j("#product_option_id").val()+"&quantity="+$j("#quantity").val();if(elementExists("userText")&&elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&productOptionId="+$j("#product_option_id").val()+"&quantity="+$j("#quantity").val()+"&userText="+$j("#userText").val()+"&userPhotoName="+$j("#userPhotoName").val()}else{if(elementExists("userText")&&!elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&productOptionId="+$j("#product_option_id").val()+"&quantity="+$j("#quantity").val()+"&userText="+$j("#userText").val()}else{if(!elementExists("userText")&&elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&productOptionId="+$j("#product_option_id").val()+"&quantity="+$j("#quantity").val()+"&userPhotoName="+$j("#userPhotoName").val()}}}$j.ajax({type:"get",url:"addtocart.action",data:d,success:function(e){$j("#emptycart").html(e);$j("#number_of_item").html($j("#numberOfItems").val());if(c!=null&&c!=undefined&&c==2){showDialog("enquiryOnly")}else{if(c!=null&&c!=undefined&&(c==3||c==4||c==5)){}else{showNoti()}}},error:function(f,e){if(f.getResponseHeader("ajax-server-side-error")==null){alert("Either your session is expired or Service is under maintainance! Try after some time.")}else{alert(f.getResponseHeader("ajax-server-side-error"));if(f.status==406){if(c!=null&&c!=undefined&&(c==3||c==4||c==5)){$j("html, body").animate({scrollTop:"0px"},300)}else{}}}}})}}}}}}else{var b=parseInt($j("#max_available_quantity").val());var a=parseInt($j("#quantity").val());if(isNaN($j("#quantity").val())){alert("Please select valid quantity.");exit()}else{if($j("#quantity").val()==""){alert("Please select quantity");exit()}else{if(a<1){alert("Minimum order quantity is 1(one)");exit()}else{if(a>b&&b!=-1){alert("Max order quantity allowed for this product is "+b);exit()}else{var d="productId="+$j("#product_id").val()+"&quantity="+$j("#quantity").val();if(elementExists("userText")&&elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&quantity="+$j("#quantity").val()+"&userText="+$j("#userText").val()+"&userPhotoName="+$j("#userPhotoName").val()}else{if(elementExists("userText")&&!elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&quantity="+$j("#quantity").val()+"&userText="+$j("#userText").val()}else{if(!elementExists("userText")&&elementExists("userPhotoName")){d="productId="+$j("#product_id").val()+"&quantity="+$j("#quantity").val()+"&userPhotoName="+$j("#userPhotoName").val()}}}$j.ajax({type:"get",url:"addtocart.action",data:d,success:function(e){$j("#emptycart").html(e);$j("#number_of_item").html($j("#numberOfItems").val());if(c!=null&&c!=undefined&&c==2){showDialog("enquiryOnly")}else{if(c!=null&&c!=undefined&&(c==3||c==4||c==5)){}else{showNoti()}}},error:function(f,e){if(f.getResponseHeader("ajax-server-side-error")==null){alert("Either your session is expired or Service is under maintainance! Try after some time.")}else{alert(f.getResponseHeader("ajax-server-side-error"));if(f.status==406){if(c!=null&&c!=undefined&&(c==3||c==4||c==5)){$j("html, body").animate({scrollTop:"0px"},300)}else{}}}}})}}}}}if(c!=null&&c!=undefined&&c==4){$j("#adding_in_cart").attr("href","javascript:addToCart(4);");$j("html, body").animate({scrollTop:"0px"},300)}else{if(c!=null&&c!=undefined&&c==3){$j("#adding_in_cart").attr("href","javascript:addToCart(3);");$j("html, body").animate({scrollTop:"0px"},300)}else{$j("#adding_in_cart").attr("href","javascript:addToCart();")}}}function quickAddToCart(a,b){$j.ajax({type:"post",url:"quickaddtocart.action",data:"productId="+a,success:function(c){$j("#emptycart").html(c);$j("#number_of_item").html($j("#numberOfItems").val());if(b!=null&&b!=undefined&&(b==3||b==4||b==5)){$j("html, body").animate({scrollTop:"0px"},300)}else{showNoti()}},error:function(d,c){if(d.getResponseHeader("ajax-server-side-error")==null){alert("Either your session is expired or Service is under maintainance! Try after some time.")}else{alert(d.getResponseHeader("ajax-server-side-error"));if(d.status==406){if(b!=null&&b!=undefined&&(b==3||b==4||b==5)){$j("html, body").animate({scrollTop:"0px"},300)}else{showNoti()}}}}})}var productId=0;function showProductEnquiryDialog(a){this.productId=a;showDialog("enquiryOnly")}function showNoti(){$j(".showNotiCart").remove();$j("body").prepend("<div class='showNotiCart'>Product added to the cart successfully!</div>");$j(".showNotiCart").fadeIn("slow");setTimeout(function(){$j(".showNotiCart").fadeOut("fast").remove()},5000)};
</script>

<style>
  .showNotiCart{position:fixed;overflow:hidden;bottom:20px;right:70px;z-index:9999;text-align:center;width:300px;margin:0 auto;color:#FFF;font-size:16px;padding:10px;background:#2eb92e}.templatecartitems{width:54em}.templatecartitems li.item,.templatecartdata li.item{width:28em}.templatecart #scrollbar1{width:715px}#scrollbar1 .viewport{max-height:250px;height:21em}.cartpanel{width:54em}.templatecart #scrollbar1 .viewport{width:54em}.cartprodname,.overview div.cartbox ul.templatecartdata li.item div{max-width:20em}a.templateclose,.templateclose a{z-index:100000}
</style>

<style>
   .cartprodname span {
       overflow: hidden;
       white-space: nowrap;
       text-overflow: ellipsis;
   }
</style>

<style>
.cartprodname span.ellipsis{
font-weight: bold;
}
</style>

<style>
#buynow, #adding_in_cart,#continue_button .btnuni a {
background-color: #0072BC !important;
background-image: none !important;
border: 1px solid #0072BC;
</style>

<style>
   .catalogprodprice span{
color: #0072BC !important;
   }