Quantity of product

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 Jahre weitere
Hi,

NopCommerce 3.9

How to hide in the product template the choice - "quantity of the product" and put always - 1.

The buyer can not buy the product - two pieces. Always, only - 1.

Thanks :)
7 Jahre weitere
Hi,

To hide from product input field, just open your theme Views/Product/_AddToCart.cshtml and find line (at 3.90 is #38)
@Html.TextBoxFor(model => model.EnteredQuantity, new { @class = "qty-input" })

Next add type just shown below
@Html.TextBoxFor(model => model.EnteredQuantity, new { @class = "qty-input", type = "hidden" })


Please note, at the cart customer may change number of items. So you would need also made modification there.

Regards,
Tomasz
7 Jahre weitere
nop4you wrote:
Hi,

To hide from product input field, just open your theme Views/Product/_AddToCart.cshtml and find line (at 3.90 is #38)
@Html.TextBoxFor(model => model.EnteredQuantity, new { @class = "qty-input" })

Next add type just shown below
@Html.TextBoxFor(model => model.EnteredQuantity, new { @class = "qty-input", type = "hidden" })


Please note, at the cart customer may change number of items. So you would need also made modification there.

Regards,
Tomasz


Thanks, Tomasz!

Regards,
Vladislav
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.