Как снова добавить товар в корзину или кнопка «Добавить в корзину» не работает?

   Intent callIntent = new Intent(Intent.ACTION_CALL);
   callIntent .setData(Uri.parse("tel:+91-XXXXXXXXX"));
   startActivity(callIntent );

для получения дополнительной информации нажмите здесь http://androiddhina.blogspot.in/2015/10/how-to-make-phone-call-from-android.html

0
задан user9437856 16 January 2019 в 05:06
поделиться

1 ответ

Измените функцию добавления в корзину с .click на .on

$(document).on('click', '.add_cart', function() {
    var product_name = $(this).data("productname");
    var product_id = $(this).data("productid");
    var product_price = $(this).closest('tr').find('.calActivitylPrice').text();
    var quantity = 1;

    var changeToRemoveBTNSec = $(this).closest('tr').find('.display_table');

    $.ajax({
        url: "<?php echo base_url(); ?>Member_controller/addToCart",
        method: "POST",
        data: {
            product_id: product_id,
            product_name: product_name,
            product_price: product_price,
            quantity: quantity
        },
        success: function(data) {
            var obj = JSON.parse(data);

            $(changeToRemoveBTNSec).html('<button type="button" name="remove" class="btn btn-danger remove_inventory" id="' + obj.removebtn + '">Remove</button>');

            $('#totalDetails').html(obj.cart_total);
            $('#totalQty').html(obj.totalQty);
        }
    });

});
.
0
ответ дан Nilesh Yadav 16 January 2019 в 05:06
поделиться
Другие вопросы по тегам:

Похожие вопросы: