You are talking about B2B, but you don't even have simpliest support of "quantity" on category listing...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
There is no way to allow customer to put product quantity on the category page... Which is very bad...
4 years ago
You can do it by small customization in _ProductBox.cshtml. Update your code as below.

<input type="number" id="[email protected]" value="1" >
<input type="button" value="@(addToCartText)" class="button-2 product-box-add-to-cart-button" onclick="add_to_cart_@(Model.Id)()" />

<script>
    function add_to_cart_@(Model.Id)() {
        var qty = $('#quantity_@(Model.Id)').val();
        var url = "/addproducttocart/catalog/@(Model.Id)/@shoppingCartTypeId/" + qty;
        AjaxCart.addproducttocart_catalog(url);
        return false;
    }
</script>


Screenshots:


4 years ago
zaf wrote:
There is no way to allow customer to put product quantity on the category page...

Is it a specification of B2B site? I don't think so.
4 years ago
mhsjaber wrote:
You can do it by small customization in _ProductBox.cshtml. Update your code as below.

<input type="number" id="[email protected]" value="1" >
<input type="button" value="@(addToCartText)" class="button-2 product-box-add-to-cart-button" onclick="add_to_cart_@(Model.Id)()" />

<script>
    function add_to_cart_@(Model.Id)() {
        var qty = $('#quantity_@(Model.Id)').val();
        var url = "/addproducttocart/catalog/@(Model.Id)/@shoppingCartTypeId/" + qty;
        AjaxCart.addproducttocart_catalog(url);
        return false;
    }
</script>



Works perfect! Thank you! :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.