Hi,
I have problem with the quantities in BOMProducts.
I can select different quantities for the BOMProducts. So thats fine.
But if a select for example 100 of the main product, all the BOMProducts also get 100 in quantity.
And if an select "3" for one of the BOMProducts and "10" on the main product, the BOMProduct gets "13" as quantity.
Testpage: http://rapidodemo.softgear.se/english/testproducts/massa-och-event/visitkort-standard
Code:
<form action="" method="post" class=""> <div class="row no-gutters product-quantity-controller"> <div class="col-3 col-lg-2 amount"> <input type="hidden" name="productid" value='@GetValue("Ecom:Product.ID")'> <input type="hidden" name="cartcmd" value="add"> Antal:<input id="quantity" ="NumericQuantityText w-100 h-100 text-center border-0" maxlength="4" name="quantity" type="text" value="1"> </div> <div> @* BOMProducts *@ @if (GetLoop("BOMProducts").Count > 0) { <h2 class="section-title">Dessa följer med</h2> foreach (LoopItem BOMProductItem in GetLoop("BOMProducts")) { string link = "/" + BOMProductItem.GetString("Ecom:Product.LinkGroup.Clean") + (!String.IsNullOrEmpty(BOMProductItem.GetString("Ecom:Product.VariantID")) ? "&VariantID=" + BOMProductItem.GetString("Ecom:Product.VariantID") : ""); <div class="grid__col--border grid"> <div class="grid__cell grid__cell--align-middle-left"> <a href="@link" class="u-pull--left u-margin-right"> <img src="/Admin/Public/GetImage.ashx?width=50&image=@BOMProductItem.GetString("Ecom:Product.ImageSmall.Default.Clean")&Compression=99" /> </a> <a href="@link">@BOMProductItem.GetString("Ecom:Product.Name") - @BOMProductItem.GetString("Ecom:Product.Price")</a> </div> </div> } } <h2>Välj utrustning:</h2> @foreach(LoopItem li in GetLoop("BOMConfigurators")){ <div> <h4>@li.GetValue("Ecom:Product.Configurator.NoneSelected.Text")</h4> <input type="text" value="1" name='@li.GetValue("Ecom:Product.Configurator.ID")Quantity' /> <select name='@li.GetValue("Ecom:Product.Configurator.ID")'> @foreach(LoopItem cp in li.GetLoop("ConfiguratorProducts")){ <option value='@cp.GetValue("Ecom:Product.ID")' >@cp.GetValue("Ecom:Product.Name") (@cp.GetValue("Ecom:Product.ActualPrice") SEK) </option> } </select> </div> } </div> <div class="col-12 col-lg-4 cart-button-wrapper"> <input type="submit" alt="KÖÖP" value="KÖP" class="btn btn-primary btn-buy float-right w-100"> </div> </div> </form>