Jump to content

customized textfield product canno't be removed by the cart ps 1.5


Recommended Posts

hello, i created a configuration module for a product.
I used customization, i add a custom text field in php like: $this->context->cart->addTextFieldToProduct($idproduct, $num, Product::CUSTOMIZE_TEXTFIELD, $value);
I use an ajax call from .tpl:

 $.ajax({
        url: '{$my_module_link}',
        type: 'POST',
        dataType: 'json',
        data: {


            ajax: true,
            type: 2,
            giugio: JSON.stringify(objAttr)

        },

        success: function (data) {

            //i add the product id 8, is always 8, in data there is the                                    combination_id
            ajaxCart.add(8, data, false, this);

        }
    });

in the controller i do the configuration of the product and add the customization textfield, look above,then i write the combination attribute and at the end of ajax call i add the product to the cart with the combination attribute that is in data var.

works fine, the problem is that the customized product can't be removed from the cart, the delete icon is not show, there is an x icon but does nothing.

How i can delete the customized product from the cart?
may be it's an error in my theme ?or a prestashop bug? i use prestashop 1.5
there aren't errors in the console.....
there is a php method to try for add a product programmatically?
If i remove the customized textfield all works fine , and the product can be removed by the cart simply
thanks.
Link to comment
Share on other sites

×
×
  • Create New...