update add order for popup qty
This commit is contained in:
@@ -339,13 +339,14 @@ $(function(){
|
||||
$(".sx_item_set_detailModal").css({ 'display': "none" });
|
||||
}else{
|
||||
$(".sx_item_set_detailModal").css({ 'display': "block" });
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Please Select Minimum ' + min_qty + " items",
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
btnClass: 'btn-danger',
|
||||
});
|
||||
swal("Alert !", 'Please Select Minimum ' + min_qty + " items", "warning");
|
||||
// $.alert({
|
||||
// title: 'Alert!',
|
||||
// content: 'Please Select Minimum ' + min_qty + " items",
|
||||
// type: 'red',
|
||||
// typeAnimated: true,
|
||||
// btnClass: 'btn-danger',
|
||||
// });
|
||||
}
|
||||
|
||||
}); //End add order Click
|
||||
@@ -420,7 +421,7 @@ $(function(){
|
||||
for(var field in attributes) {
|
||||
value = attributes[field]["values"];
|
||||
type = attributes[field]["type"]
|
||||
row = "<h4>"+attributes[field]["type"]+"</h4>";
|
||||
row = "<h5>"+attributes[field]["type"]+"</h5>";
|
||||
|
||||
$(value).each(function(i){
|
||||
disabled = ""
|
||||
@@ -794,11 +795,10 @@ $(function(){
|
||||
// Get Selected Class
|
||||
function change_qty_plus_minus(id,plus,minus) {
|
||||
|
||||
var count = 1;
|
||||
var count = parseInt($('#'+id).val())
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
$('#'+plus).on("click", function(){
|
||||
|
||||
count++;
|
||||
countEl.value = count;
|
||||
|
||||
@@ -852,6 +852,37 @@ $(function(){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$('.keypress_qty').keyup(function(e){
|
||||
|
||||
id = $(this).attr('id');
|
||||
value = $(this).val();
|
||||
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$("#set_count").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
}else{
|
||||
total_price = value*price;
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}
|
||||
});
|
||||
|
||||
/* $("input").keypress(function(){
|
||||
$("span").text(i += 1);
|
||||
});*/
|
||||
// $("#set_change_qty").change(function(){
|
||||
// qty = $(this).val();
|
||||
// price = $("#set_total_price").text();
|
||||
|
||||
@@ -152,6 +152,6 @@ section.content{
|
||||
|
||||
}
|
||||
|
||||
#count {
|
||||
#count ,#set_count{
|
||||
text-align: center;
|
||||
}
|
||||
Reference in New Issue
Block a user