Skip to content

Cart items can not be exceeded then Maximum quantity #35

Open
@nomi-ramzan

Description

@nomi-ramzan

Hi
In cart view using + button you can exceed the max quantity of item. like if you have max 1 quantity in cart view you can add more then 1 items.
1st suggestion can be before this line we can add
if(this._data.quantityMax && this._data.maxQuantity < ( this._quantity+quantityInt )) return;
Exactly that variable which we are using here like
<ngcart-addtocart id="{{ item.id }}" name="{{ item.name }}" price="{{ item.price }}" quantity="{{item.quantity}}" quantity-max="{{ item.maxQuantity }}" data="item">Add to Cart</ngcart-addtocart>
In my case maxQuantity is that variable which can be use for this.

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions