add plus sign qty
This commit is contained in:
@@ -373,7 +373,7 @@ $(function() {
|
|||||||
$('.add_to_order').removeAttr('data-attributes');
|
$('.add_to_order').removeAttr('data-attributes');
|
||||||
$('.add_to_order').removeAttr('data-options');
|
$('.add_to_order').removeAttr('data-options');
|
||||||
|
|
||||||
$('.change_qty').val(1);
|
$('#count').val(1);
|
||||||
|
|
||||||
change_qty_plus_minus("count","plus","minus");
|
change_qty_plus_minus("count","plus","minus");
|
||||||
|
|
||||||
@@ -824,18 +824,11 @@ $(function() {
|
|||||||
|
|
||||||
// Get Selected Class
|
// Get Selected Class
|
||||||
function change_qty_plus_minus(id,plus,minus) {
|
function change_qty_plus_minus(id,plus,minus) {
|
||||||
|
var count = parseInt($('#'+id).val());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#'+plus).on("click", function(){
|
$('#'+plus).on("click", function(){
|
||||||
|
|
||||||
var count = parseInt($('#'+id).val());
|
|
||||||
var countEl = document.getElementById(id);
|
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
countEl.value = count;
|
$('#'+id).val(count);
|
||||||
|
|
||||||
|
|
||||||
if (id == "count") {
|
if (id == "count") {
|
||||||
price = $("#unit_price").text();
|
price = $("#unit_price").text();
|
||||||
@@ -899,7 +892,7 @@ $(function() {
|
|||||||
|
|
||||||
if ($.isNumeric(value)) {
|
if ($.isNumeric(value)) {
|
||||||
if (id=="count") {
|
if (id=="count") {
|
||||||
$('.change_qty').attr('value',value);
|
$('#count').attr('value',value);
|
||||||
price = $("#unit_price").text();
|
price = $("#unit_price").text();
|
||||||
$("#total_price").text(value*price);
|
$("#total_price").text(value*price);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ $(document).ready(function() {
|
|||||||
date: false
|
date: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// first input focus for all form
|
||||||
|
$("body").has("form").find("input:first").focus();
|
||||||
|
|
||||||
// Image Upload
|
// Image Upload
|
||||||
$("#simple_menu_item_image_path").fileinput({
|
$("#simple_menu_item_image_path").fileinput({
|
||||||
previewFileType: "image",
|
previewFileType: "image",
|
||||||
|
|||||||
Reference in New Issue
Block a user