4

I have EE 2.7.2 and Store 2.0.4, wondering if anyone else have encountered this issue. I can't delete from cart items with a minimum qty set. However I can delete any other items without a min qty as I mentioned here Delete from Store Cart

My template looks like:

{exp:store:checkout
    form_class="form-horizontal"
    next="shop/customer-details"}

    {items}
        <tr>
            <td>{price}</td>
            <td>
                <input name="items[{key}][item_qty]" value="{item_qty}" class="input-mini item_qty" />              
                <a href="#" class="remove-product">Remove</a> 

            </td>
        </tr>
    {/items}

{/exp:store:checkout}

And the script:

$('.remove-product').click(function(){
        // click handler
        if (confirm("Are you sure?")) {
            $(this).parents('td').find('.item_qty').val('0');
            $(this).parents('tr').animate({ "opacity": "hide" }, "slow");
            $('#update_cart').click();

            return false;
        }
});

Any help?

1

I was working on a My Cart page last night and ran into the bug with the Remove From Cart functionality not working. I used jQuery to solve my problem. Here's my basic code.

{exp:store:checkout next="checkout/step1"}
    {items}
        <input type="hidden" name="items[{key}][item_qty]" value="{item_qty}" class="remove-{key}">
        <input id="remove-{key}" type="submit" name="update_cart" value="Remove" class="remove-me">
     {/items}
{/exp:store:checkout}

AND

<script type="text/javascript">
    $(function(){
        $(".remove-me").click(function(){
            var target = $(this).attr("id");
            $("." + target).val("0");
        });
    });
</script>
| improve this answer | |
  • Anna your solution doesn't work for products with a minimum quantity and am looking for a solution for that, as mentioned above i have it working if the product doesn't have min qty set – William Nov 6 '13 at 7:45
  • You find the min qty on the control panel, product details/stock/Min Order Qty – William Nov 6 '13 at 7:59
1

This was a bug in Store 2.0.4 if you upgrade to Store 2.0.5 this should fix the problem for you.

| improve this answer | |
  • I have upgraded to Store 2.0.6 and the issue is still there – William Nov 7 '13 at 14:28
  • Can you add your template code to the original question? – Justin Long Nov 7 '13 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.