Closed mcastano24 closed 6 years ago
Just test here on my dev machine (a few bug fixes/features above the downloadable beta version) and it works OK. (I don't think the group promo has been touched.)
Check the settings and take a screen shot of them and send it to me, I'll copy your settings to see if there is a problem with a specific path through the code.
Hello David,
As requested
The items in the category indeed show the discounted price,
When you try and add the item to the card it gets added on full price:
However I noticed that this only seems to happen on products with different models
I think this is display, the models are showing the price value against the model.. If you go into the checkout do the correct discount values appear?
The group promo was sponsored by this website: http://www.mangerbiochezmoi.com/
So it is configured especially for them.
here's a copy of their product list template as an exmaple...
@inherits NBrightBuy.render.NBrightBuyRazorTokens
@AddMetaData("resourcepath", "/DesktopModules/NBright/NBrightBuy/App_LocalResources/")
@AddPreProcessMetaData("itemlistname", Model.GetSetting("itemlistname"), Model.FullTemplateName, Model.ModuleId.ToString())
@AddPreProcessMetaData("searchpagesize", Model.GetSetting("pagesize"), Model.FullTemplateName, Model.ModuleId.ToString())
@AddPreProcessMetaData("orderby", "{bycategoryproduct}", Model.FullTemplateName, Model.ModuleId.ToString()) @AddPreProcessMetaData("orderby0", "{bycategoryproduct}", Model.FullTemplateName, Model.ModuleId.ToString()) @AddPreProcessMetaData("orderby1", "NB3.FromPrice", Model.FullTemplateName, Model.ModuleId.ToString()) @AddPreProcessMetaData("orderby2", "NB3.FromPrice DESC", Model.FullTemplateName, Model.ModuleId.ToString()) @AddPreProcessMetaData("orderby3", "NB3.ProductRef", Model.FullTemplateName, Model.ModuleId.ToString()) @AddPreProcessMetaData("orderby4", "NB3.ProductName", Model.FullTemplateName, Model.ModuleId.ToString())
@AddPreProcessMetaData("selectpagesize", "True", Model.FullTemplateName, Model.ModuleId.ToString())
<div class="nbs">
<!-- Product List header -->
@if (Model.GetSettingInt("displaytype") == 0)
{
<div class="categorybreadcrumbs">@CategoryBreadCrumb(true, Model)</div>
}
<!-- Show category details -->
<div class="categorydetails">
@if (Model.GetSettingInt("displaytype") == 0) {
<h1>@Category("categoryname", Model)</h1>
}
@if (Model.GetSettingInt("displaytype") == 1) {
<h1>Résultats de recherche</h1>
}
</div>
@if (!Model.GetSettingBool("staticlist"))
{
<div class="productlistheader">
<!-- Product sort -->
<div class="productsort">
<label>@ResourceKey("General.pagesize") :</label>@PageSizeDropDownList("8,16,32,64,128", Model)
<label>@ResourceKey("General.OrderBy") :</label>@SortOrderDropDownList("ResourceKey:ProductView.orderby", Model)
</div>
</div>
}
<div id="listwrapper" class="productlist">
<!-- Product List Body -->
@{
var lang = "";
}
@foreach (NBrightInfo info in Model.List)
{
var product = new ProductData(info.ItemID, info.Lang);
lang = info.Lang;
<div class="product">
<!-- Product container -->
<div class="productimg">
<div class="stamps">
<!-- PAR LOT (for migrated products) -->
@if (product.HasProperty("chkLot"))
{
<div class="onsaleflag">-10%</div>
}
@if (product.IsOnSale)
{
<div class="onsaleflag">-<span>@NBrightBuyUtils.CalcPricePercentageDiff(product.HighUnitPrice(), product.BestUnitPriceAll()).ToString("0")</span>%</div>
}
@if (@product.HasProperty("New"))
{
<div class="newflag">Nouveau</div>
}
</div>
<div class="labels">
@if (@product.HasProperty("chkAOP")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/aop_small.png" /></div>}
@if (@product.HasProperty("chkNaturland")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/naturland_small.png" /></div>}
@if (@product.HasProperty("chkBiokreis")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/biokreis_small.png" /></div>}
@if (@product.HasProperty("chkDemeter")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/demeter_small.png" /></div>}
@if (@product.HasProperty("chkBioland")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/bioland_small.png" /></div>}
@if (@product.HasProperty("chkBioeurope")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/bioeurope_small.png" /></div>}
@if (@product.HasProperty("chkAB")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ab_small.png" /></div>}
@if (@product.HasProperty("chkEcocert")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecocert_small.png" /></div>}
@if (@product.HasProperty("chkSimple")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/simples_small.png" /></div>}
@if (@product.HasProperty("chkCosmebio")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/cosmebio_small.png" /></div>}
@if (@product.HasProperty("chkNatprog")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/natureprogres_small.png" /></div>}
@if (@product.HasProperty("chkEcogarantie")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecogarantie_small.png" /></div>}
@if (@product.HasProperty("chkEcocontrol")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecocontrol_small.png" /></div>}
@if (@product.HasProperty("chkMSC")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/msc_small.png" /></div>}
</div>
@if (product.Imgs.Count > 0)
{
<div class="image" style="height:140px;">
<img title="@ProductName(info)" src="@ProductImage(info, Model.GetSetting("classicthumbnailwidth"), "-1")">
</div>
}
else
{
<div class="noimage" style="height:140px;">
@(Model.GetSettingHtmlOf("noimageicon"))
</div>
}
</div>
<div class="description">
@if (info.GetXmlProperty("genxml/textbox/publicref") != "")
{
<div class="productref">Réf. @info.GetXmlProperty("genxml/textbox/publicref")</div>
}
<h2><a href="@EntryUrl(info,Model)">@ProductName(info)</a></h2>
<h3>@info.GetXmlProperty("genxml/lang/genxml/textbox/manufacturer")</h3>
<div class="buyinfos">
<div class="price">
@if (product.IsOnSale)
{
<div class="sale"><span class="from">@ResourceKey("ProductView.from") </span><span class="old">@NBrightBuyUtils.FormatToStoreCurrency(product.HighUnitPrice())</span>@NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())</div>
}
else
{
<div><span class="from">@ResourceKey("ProductView.from") </span>@NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())</div>
}
</div>
<a href="#quickview@(info.ItemID)" class="standardbutton quickviewbtn">Ajouter au panier</a>
<a href="@EntryUrl(info,Model)" class="standardbutton detailbtn">Voir le produit</a>
</div>
</div>
<!-- QUICK VIEW -->
<div style="display:none">
<div id="quickview@(info.ItemID)" class="quickview">
<div class="productimg">
@if (product.Imgs.Count > 0)
{
<div class="image" style="height:400px">
<img title="@ProductName(info)" src="@ProductImage(info, Model.GetSetting("classicimagewidth"), "-1")">
</div>
}
@if (@info.GetXmlProperty("genxml/lang/genxml/textbox/extrafield") != "")
{
<div class="complement">
<i class="fa fa-quote-left"></i>
@info.GetXmlProperty("genxml/lang/genxml/textbox/extrafield")
<i class="fa fa-quote-right"></i>
</div>
}
</div>
<div class="purchasing">
<div class="labels">
@if (@product.HasProperty("chkAOP")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/aop.png" /></div>}
@if (@product.HasProperty("chkNaturland")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/naturland.png" /></div>}
@if (@product.HasProperty("chkBiokreis")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/biokreis.png" /></div>}
@if (@product.HasProperty("chkDemeter")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/demeter.png" /></div>}
@if (@product.HasProperty("chkBioland")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/bioland.png" /></div>}
@if (@product.HasProperty("chkBioeurope")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/bioeurope.png" /></div>}
@if (@product.HasProperty("chkAB")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ab.png" /></div>}
@if (@product.HasProperty("chkEcocert")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecocert.png" /></div>}
@if (@product.HasProperty("chkSimple")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/simples.png" /></div>}
@if (@product.HasProperty("chkCosmebio")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/cosmebio.png" /></div>}
@if (@product.HasProperty("chkNatprog")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/natureprogres.png" /></div>}
@if (@product.HasProperty("chkEcogarantie")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecogarantie.png" /></div>}
@if (@product.HasProperty("chkEcocontrol")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/ecocontrol.png" /></div>}
@if (@product.HasProperty("chkMSC")){<div><img src="/Portals/0/Themes/ClassicRazor/img/labels/msc.png" /></div>}
</div>
<div class="h1-headline"><a href="@EntryUrl(info,Model)">@ProductName(info)</a></div>
<div class="h2-headline">@info.GetXmlProperty("genxml/lang/genxml/textbox/manufacturer")</div>
<div class="stamps">
<!-- PAR LOT (for migrated products) -->
@if (product.HasProperty("chkLot"))
{
<div class="onsaleflag">-10%</div>
}
@if (product.IsOnSale)
{
<div class="onsaleflag">-<span>@NBrightBuyUtils.CalcPricePercentageDiff(product.HighUnitPrice(), product.BestUnitPriceAll()).ToString("0")</span>%</div>
}
@if (@product.HasProperty("New"))
{
<div class="newflag">Nouveau</div>
}
</div>
<div class="price">
@if (product.IsOnSale)
{
<div class="sale">@ResourceKey("ProductView.from") <span class="old">@NBrightBuyUtils.FormatToStoreCurrency(product.HighUnitPrice())</span>@NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())</div>
}
else
{
<div>@ResourceKey("ProductView.from") @NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())</div>
}
</div>
@if (@info.GetXmlProperty("genxml/lang/genxml/textbox/txtsummary") != "")
{
<div itemprop="description" class="summary">@BreakOf(info, "genxml/lang/genxml/textbox/txtsummary")</div>
}
else
{
<div itemprop="description" class="summary truncate">@HtmlOf(info, "genxml/lang/genxml/edt/description")</div>
}
<!-- PAR LOT -->
@if (product.FromBulkPrice() > 0)
{
<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>
}
<!-- fields required to send required ajax data to server -->
<div class="entryid@(info.ItemID)">
<input id="@(info.ItemID)_productid" type="hidden" value="@(info.ItemID)">
<input id="lang" type="hidden" value="@(info.Lang)">
@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>
}
<!-- Test if product is in category Produits frais -->
@if (@product.IsInCategory("2"))
{
<div class="livraison12">
<i class="fa fa-exclamation-circle"></i>Pas de livraison hors département 12
</div>
}
<div class="buy">
@if (product.IsInStock)
{
<div class="quantityoptions">
<a class="qtyminus" href="javascript:void(0)">-</a>
<!-- "selectedaddqty"" expected by server as name of qty field -->
@TextBox(info, "genxml/textbox/selectedaddqty", "class='quantity selectedaddqty'", "1")
<a class="qtyplus" href="javascript:void(0)">+</a>
</div>
<a class="addtobasket bigbutton" itemid="@(info.ItemID)" href="javascript:void(0)">@ResourceKey("ProductView.addtobasket")</a>
}
else
{
<span class="outofstock">Actualisation des prix en cours</span>
}
</div>
</div>
</div>
</div>
</div>
</div>
}
<!-- Product List footer -->
</div>
</div>
Here is the product detail... probably a little more helpful...
@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; }
@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") | } }@{ var unitcost = m.GetXmlPropertyDouble("genxml/textbox/txtunitcost"); var saleprice = m.GetXmlPropertyDouble("genxml/textbox/txtsaleprice"); var dealercost = m.GetXmlPropertyDouble("genxml/textbox/txtdealercost"); var dealersale = m.GetXmlPropertyDouble("genxml/textbox/txtdealersale"); } @if (saleprice > 0 || dealercost > 0) { @NBrightBuyUtils.FormatToStoreCurrency(unitcost) if (saleprice > 0 && saleprice < dealercost && saleprice < dealersale) { @NBrightBuyUtils.FormatToStoreCurrency(saleprice) } else { if (dealersale > 0) { @NBrightBuyUtils.FormatToStoreCurrency(dealersale) } else { if (dealercost > 0) { @NBrightBuyUtils.FormatToStoreCurrency(dealercost) } else { @NBrightBuyUtils.FormatToStoreCurrency(saleprice) } } } } else { @NBrightBuyUtils.FormatToStoreCurrency(unitcost) } | @if(!product.IsInStock) { @ResourceKey("ProductView.outofstock") } |
Valeur énergétique kJ en g | @info.GetXmlProperty("genxml/textbox/energiekj") |
Valeur énergétique kcal en g | @info.GetXmlProperty("genxml/textbox/energiekcal") |
Lipides en g | @info.GetXmlProperty("genxml/textbox/lipides") |
dont acides gras saturés en g | @info.GetXmlProperty("genxml/textbox/agsatures") |
dont acides gras mono-insaturés en g | @info.GetXmlProperty("genxml/textbox/agmono") |
dont acides gras polyinsaturés en g | @info.GetXmlProperty("genxml/textbox/agpoly") |
Glucides en g | @info.GetXmlProperty("genxml/textbox/glucides") |
dont sucres en g | @info.GetXmlProperty("genxml/textbox/sucres") |
Protéines en g | @info.GetXmlProperty("genxml/textbox/proteines") |
Fibres alimentaires en g | @info.GetXmlProperty("genxml/textbox/fibres") |
Sel en g | @info.GetXmlProperty("genxml/textbox/sel") |
Céréales contenant du gluten et produits dérivés | |
Crustacés et produits dérivés | |
Oeufs et produits dérivés | |
Poissons et produits dérivés< | |
Cacahuète et produits dérivés | |
Soja et produits dérivés | |
Lait et produits dérivés | |
Fruits à coque | |
Céleri et produits dérivés | |
Moutarde et produits dérivés | |
Sésame et produits dérivés | |
Dioxyde de soufre (SO2) et sulfites | |
Lupin et produits dérivés | |
Mollusques et produits dérivés |
yes even in the checkout it shows the incorrect price
seems like i am not the only one who experienced this however thread seems to be inactive for a while https://forum.nbrightproject.org/posts/t169-Group-Promotion-not-reflecting-after-we-add-to-the-basket
OK, looks like your problem is with the product setup, you have the sale price disabled on the 2 models visible. so the calculation is correct.
I don;t know how you use DNN9!!!, I simply can;t find the scheudler. but enable the sale price and rerun the scheduler and see if that then work.
honestly i don't like DNN9 thanks for the help must have missed this..
Hello,
the group discount is not being applied to the item when it is in the cart however it does appear in the store front.
the Scheduler is running so i'm not sure what the issue is