If there is a business requirement to limit the number of items to be added in cart, no need to go with customizing the code. This can be achieved by modifying the configurations in
wc-admin-component.xml inside WC/xml/config/com.ibm.commerce.order
folder.
The following attributes inside the grouping ShoppingCartThreshold can be modified for this.
- size for maximum allowed items in an cart.
- quantity for maximum quantity of an item in cart.
<_config:configgrouping name="ShoppingCartThreshold">
<_config:property name="size"
value="10"/>
<_config:property name="quantity"
value="5"/>
<_config:property name="defaultPageSize"
value="100"/>
<_config:property name="maximumPageSize"
value="100"/>
</_config:configgrouping>
No comments:
Post a Comment