Closed BenderNETs closed 6 years ago
I take it you did put text in for the values.
Did you click the required checkbox?
I'm not aware of any issues with options and your the first to report this for v3.5, whcih has been out for quite a time now.
This is in French (Not had time to do the English, yet), but do a bing translate, see if it points something out. But it's all fairly simple.
Also post question on the forum, I'm trying to save GitHub for known issue.
I checked the required box. See attached. Are there any other settings I missed?
Just found out that the "Buy" button doesn't work on any article (even the ones without options). The only way I get them in the cart is by clicking the cart icon on the image in the product list.
The add to basket is done via ajax, so check for any JS errors. I can't remmeber what template is being used on v3.5.6, but I'll be surprised if this isn't working.
Also make sure you have the mini basket on the page. The JS for the ajax is included in that template.
The templates have been adjusted and there is a language parameter needed to show the options.
At one point the options where missing at my sites too. First the options were missing in the back end. When adjusted the back end template (there was a path genxml/ which became later genxml/lang/genxml/ ) the options were back. The options were stored in the db with language parameters but then the front of the store became empty as the templates needed adjustment too. After adjusting the theme template, all was well
My ProductDisplayDetail.cshtml looks like this now:
@inherits NBrightBuy.render.NBrightBuyRazorTokens
@AddMetaData("resourcepath", "/DesktopModules/NBright/NBrightBuy/App_LocalResources/")
@{ // assign Model, so we can resolve var in VS var product = (ProductData)Model.List.First(); var info = (NBrightInfo)product.Info; }
}
<!-- fields required to send required ajax data to server to purchase product -->
<div class="purchasing entryid@(info.ItemID)">
<input id="@(info.ItemID)_productid" type="hidden" value="@(info.ItemID)">
<input id="lang" type="hidden" value="@(info.Lang)">
<h1 itemprop="name">@(product.ProductName)</h1>
<div class="price">
@if (@info.GetXmlProperty("genxml/checkbox/callforprice").ToLower() == "true") {
<div class="cfp">Prijs op aanvraag</div>
} else {
if (product.IsOnSale)
{
<span>@ResourceKey("ProductView.onsale") : </span>
<span class="old"> @(NBrightBuyUtils.FormatToStoreCurrency(product.FromPrice()))</span>
<span class="sale"> @(NBrightBuyUtils.FormatToStoreCurrency(product.BestPrice()))</span>
}
else
{
if (product.Models.Count > 1 || product.Options.Count >= 1 || product.FromPrice() > product.BestPrice()) // has models or options
{
<span>@ResourceKey("ProductView.from")</span>
}
<span> @(NBrightBuyUtils.FormatToStoreCurrency(product.BestPrice()))</span>
}
}<!-- end call for price -->
</div>
<!-- PAR LOT -->
<div class="bulkprice">
<!-- <div class="bulklot">Par lot :</div>-->
<div class="bulkpromo">
@foreach (NBrightInfo m in product.Models)
{
var unitcost = m.GetXmlPropertyDouble("genxml/textbox/txtunitcost");
var saleprice = m.GetXmlPropertyDouble("genxml/textbox/txtsaleprice");
var unitqty = m.GetXmlPropertyDouble("genxml/textbox/unitqty");
var orginalPrice = Math.Round(product.HighUnitPrice()*unitqty, 2);
var modelbestprice = unitcost;
if (saleprice > 0 && unitcost > saleprice)
{
modelbestprice = saleprice;
}
if (unitqty > 1 & (orginalPrice != modelbestprice)) // display bulk and only if the bulk price is not the highest price.
{
<div class="stamps">
<div class="onsaleflag">-<span>@NBrightBuyUtils.CalcPricePercentageDiff(orginalPrice, modelbestprice).ToString("0")</span>%
</div>
<span class="old">@NBrightBuyUtils.FormatToStoreCurrency(orginalPrice)</span>
<strong>@NBrightBuyUtils.FormatToStoreCurrency(modelbestprice)</strong>
</div>
}
}
</div>
</div>
@if (@info.GetXmlProperty("genxml/lang/genxml/textbox/txtsummary") != "")
{
<div itemprop="description" class="summary">@BreakOf(info, "genxml/lang/genxml/textbox/txtsummary")</div>
}
@if (@product.Models.Count >= 2)
{
var c = 0;
<div class="models">
@if (Model.GetSetting("modeldisplaytype") == "0" && (product.Models.Count >= 2))
{
@ModelsRadio(info)
}
@if (Model.GetSetting("modeldisplaytype") == "1" && (product.Models.Count >= 2))
{
@ModelsDropDown(info)
}
@if (Model.GetSetting("modeldisplaytype") == "2")
{
foreach (NBrightInfo x in product.Models)
{
<div class="quantityoptions">
<a class="qtyminus" index="@(c)" href="javascript:void(0)">-</a>
<input type="text" id="selectedmodelqty@(c)" update="save" class="quantity" style='width: 21px' value="1" />
<!-- use hiddenfield to pass back modelid -->
<input id="selectedmodelid@(c)" type="hidden" value="@(x.GetXmlProperty("genxml/hidden/modelid"))">
<a class="qtyplus" index="@(c)" href="javascript:void(0)">+</a>
<label>@NBrightBuyUtils.GetItemDisplay(x, "{name} ({bestprice})", true) </label>
</div>
c += 1;
}
}
</div>
<div class="clearfix"></div>
}
@if (@product.Options.Count >= 1)
{
<div class="options">
<!-- OPTION HERE -->
@ProductOptions(product)
</div>
<div class="clearfix"></div>
}
@if (product.ClientFileUpload)
{
<div class="options">
<div id="clientfileuploadmsg">
@ResourceKey("ProductView.clientfileuploadmsg")
</div>
<div id="clientfileuploadmsgend" style="display: none;">
@ResourceKey("ProductView.clientfileuploadmsgend")
</div>
<div class="fileUpload dnnSecondaryAction">
<span>@ResourceKey("OrderAdmin.choosefile")</span>
<input id='optionfile' update='save' class="normalFileUpload form-control" type='file' name="files[]" multiple />
</div>
<div id="progressbar" style="display: none;">
<div id="progressbarpercent"></div>
</div>
<input id='optionfilelist' style='display: none;' update='save' type='text' />
<input id='optionfileprefix' update='save' type='hidden' />
</div>
<div class="clearfix"></div>
}
@if (@info.GetXmlProperty("genxml/checkbox/callforprice").ToLower() != "true") { if (Model.GetSetting("cataloguemode") != "True") {
}
} <!-- cla for price -->
<div>
@HtmlOf(product.Info, "genxml/lang/genxml/hidden/promodesc")
</div>
</div>
<div class="clearfix"></div>
<!-- Details -->
@{
var modeltableclass = "tab-content tab-hide";
}
<div class="details">
<ul class="nav-tabs">
@if (info.GetXmlProperty("genxml/lang/genxml/edt/description") != "") {
@m.GetXmlProperty("genxml/lang/genxml/textbox/txtmodelname") | @m.GetXmlProperty("genxml/lang/genxml/textbox/txtextra") | @if (Model.GetSetting("productcode") == "True") { if (m.GetXmlProperty("genxml/textbox/txtmodelref") == "") {NC | } else {@m.GetXmlProperty("genxml/textbox/txtmodelref") | } }@if (product.BestPrice() < product.FromPrice()) { @NBrightBuyUtils.FormatToStoreCurrency(product.FromPrice()) @NBrightBuyUtils.FormatToStoreCurrency(product.BestPrice()) } else { @NBrightBuyUtils.FormatToStoreCurrency(product.BestPrice()) } | @if (!product.IsInStock) { @ResourceKey("ProductView.outofstock") } |
The missing mini basket module on the product details page helped to get the "Buy" button to work. I'm still struggling with the options on the same page. They still don't show up. Are there really any changes I have to make in the template file to get the options to show up? The options show up in the BackOffice as shown in the screenshot.
I got it to work updating the templates. Thanks all...
Hello, I'm trying to add some options to my articles. On the prodcut details page I see the dropdownbox with the options but they are all empty (I can see all empty options with values like "T5nU9bGZ" in the html code). Since I added options I can also not buy the article anymore. When I click on the buy button nothing happens. All options are only "sizes" like "Small", "Medium", "Large" with no extra cost ($0). Is there anything I missed or is this a bug?
Thanks, Harald