nbrightproject / NBrightBuy

NBrightStore - E-Commerce for DNN (NBSv3)
http://www.nbrightproject.org/
21 stars 15 forks source link

group discount not being applied to cart #150

Closed mcastano24 closed 6 years ago

mcastano24 commented 6 years ago

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

leedavi commented 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.

mcastano24 commented 6 years ago

Hello David,

As requested

5

The items in the category indeed show the discounted price, 6

When you try and add the item to the card it gets added on full price:

7

However I noticed that this only seems to happen on products with different models

8

leedavi commented 6 years ago

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 @using System.Linq @using System.Web @using NBrightDNN @using Nevoweb.DNN.NBrightBuy.Components;

@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>
leedavi commented 6 years ago

Here is the product detail... probably a little more helpful...

@inherits NBrightBuy.render.NBrightBuyRazorTokens @using System.Linq @using NBrightDNN @using Nevoweb.DNN.NBrightBuy.Components;

@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; }

@CategoryBreadCrumb(true, Model)
@if (product.Imgs.Count > 0) { } else {
@(Model.GetSettingHtmlOf("noimageicon"))NO IMAGE
}
@if (@info.GetXmlProperty("genxml/lang/genxml/textbox/extrafield") != "") {
@info.GetXmlProperty("genxml/lang/genxml/textbox/extrafield")
}
@if (@product.HasProperty("chkAOP")){
} @if (@product.HasProperty("chkNaturland")){
} @if (@product.HasProperty("chkBiokreis")){
} @if (@product.HasProperty("chkDemeter")){
} @if (@product.HasProperty("chkBioland")){
} @if (@product.HasProperty("chkBioeurope")){
} @if (@product.HasProperty("chkAB")){
} @if (@product.HasProperty("chkEcocert")){
} @if (@product.HasProperty("chkSimple")){
} @if (@product.HasProperty("chkCosmebio")){
} @if (@product.HasProperty("chkNatprog")){
} @if (@product.HasProperty("chkEcogarantie")){
} @if (@product.HasProperty("chkEcocontrol")){
} @if (@product.HasProperty("chkMSC")){
}

@(product.ProductName)

@info.GetXmlProperty("genxml/lang/genxml/textbox/manufacturer")

@if (info.GetXmlProperty("genxml/textbox/publicref") != "") {
Réf. @info.GetXmlProperty("genxml/textbox/publicref")
}
@if (product.IsOnSale) {
-@NBrightBuyUtils.CalcPricePercentageDiff(product.HighUnitPrice(), product.BestUnitPriceAll()).ToString("0")%
} @if (@product.HasProperty("New")) {
Nouveau
}
@if (product.IsOnSale) {
@ResourceKey("ProductView.from") @NBrightBuyUtils.FormatToStoreCurrency(product.HighUnitPrice())@NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())
} else {
@ResourceKey("ProductView.from") @NBrightBuyUtils.FormatToStoreCurrency(product.BestUnitPriceAll())
}
@if (@info.GetXmlProperty("genxml/lang/genxml/textbox/txtsummary") != "") {
@BreakOf(info, "genxml/lang/genxml/textbox/txtsummary")
} else {
@HtmlOf(info, "genxml/lang/genxml/edt/description")
} @if (product.HasProperty("chkLot")) {
Par lot :
-10%
} @if (product.FromBulkPrice() > 0) {
Par lot :
@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. {
-@NBrightBuyUtils.CalcPricePercentageDiff(orginalPrice, modelbestprice).ToString("0")%
@NBrightBuyUtils.FormatToStoreCurrency(orginalPrice) @NBrightBuyUtils.FormatToStoreCurrency(modelbestprice)
} }
} @if (@product.Models.Count >= 2) { var c = 0;
@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) {
- +
c += 1; } }
} @if (@product.Options.Count >= 1) {
@ProductOptions(product)
} @if (product.ClientFileUpload) {
@ResourceKey("ProductView.clientfileuploadmsg")
@ResourceKey("OrderAdmin.choosefile")
} @if (@product.IsInCategory("2")) {
Pas de livraison hors département 12
} @if (Model.GetSetting("cataloguemode") != "True") {
@if (@product.IsInStock) { if (Model.GetSetting("modeldisplaytype") != "2") {
- @TextBox(info, "genxml/textbox/selectedaddqty", "class='quantity selectedaddqty'", "1") +
} @ResourceKey("ProductView.addtobasket") } else { Actualisation des prix en cours }
}
@{ var modeltableclass = "tab-content tab-hide"; }
@if (Model.GetSetting("addthispubid") != "") {
} @if (@info.GetXmlProperty("genxml/lang/genxml/edt/description") != "") {

Description du produit

@HtmlOf(info, "genxml/lang/genxml/edt/description")
}

Article(s)

@foreach (var m in product.Models) { if (!bool.Parse(m.GetXmlProperty("genxml/checkbox/chkishidden"))) { @if (Model.GetSetting("productcode") == "True") { if (m.GetXmlProperty("genxml/textbox/txtmodelref") == "") { } else { } } } }
@m.GetXmlProperty("genxml/lang/genxml/textbox/txtmodelname") @m.GetXmlProperty("genxml/lang/genxml/textbox/txtextra")NC@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") }
@if(product.Docs.Count >= 1) {

@ResourceKey("ProductView.documentation")

    @foreach(var doc in product.Docs) {
  • @ResourceKey("ProductView.filebullets")@doc.GetXmlProperty("genxml/textbox/txttitle")@doc.GetXmlProperty("genxml/textbox/txtdocdesc") @ResourceKey("ProductView.download")
  • }
} @if (info.GetXmlPropertyBool("genxml/checkbox/cbinfosnutri")) {

Informations nutritionnelles pour 100g du produit consommable

@if (info.GetXmlProperty("genxml/textbox/energiekj") != "") { } @if (info.GetXmlProperty("genxml/textbox/energiekcal") != "") { } @if (info.GetXmlProperty("genxml/textbox/lipides") != "") { } @if (info.GetXmlProperty("genxml/textbox/agsatures") != "") { } @if (info.GetXmlProperty("genxml/textbox/agmono") != "") { } @if (info.GetXmlProperty("genxml/textbox/agpoly") != "") { } @if (info.GetXmlProperty("genxml/textbox/glucides") != "") { } @if (info.GetXmlProperty("genxml/textbox/sucres") != "") { } @if (info.GetXmlProperty("genxml/textbox/proteines") != "") { } @if (info.GetXmlProperty("genxml/textbox/fibres") != "") { } @if (info.GetXmlProperty("genxml/textbox/sel") != "") { }
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")
} @if (info.GetXmlPropertyBool("genxml/checkbox/cballergenes")) {

Allergènes dans le produit

@if (info.GetXmlPropertyBool("genxml/checkbox/cbgluten")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbcrustaces")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cboeufs")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbpoissons")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbcacahuete")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbsoja")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cblait")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbcoque")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbceleri")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbmoutarde")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbsesame")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbsoufre")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cblupin")) { } @if (info.GetXmlPropertyBool("genxml/checkbox/cbmollusques")) { }
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
}
@if(@product.GetRelatedProducts().Count >= 1) {

@ResourceKey("ProductView.recommend")

@foreach(var rp in product.GetRelatedProducts()) { var rproduct = new ProductData(rp.ItemID, rp.Lang);
@if (rproduct.IsOnSale) {
-@NBrightBuyUtils.CalcPricePercentageDiff(rproduct.HighUnitPrice(), rproduct.BestUnitPriceAll()).ToString("0")%
} @if (@rproduct.HasProperty("New")) {
Nouveau
}
@if (@rproduct.HasProperty("chkAOP")){
} @if (@rproduct.HasProperty("chkNaturland")){
} @if (@rproduct.HasProperty("chkBiokreis")){
} @if (@rproduct.HasProperty("chkDemeter")){
} @if (@rproduct.HasProperty("chkBioland")){
} @if (@rproduct.HasProperty("chkBioeurope")){
} @if (@rproduct.HasProperty("chkAB")){
} @if (@rproduct.HasProperty("chkEcocert")){
} @if (@rproduct.HasProperty("chkSimple")){
} @if (@rproduct.HasProperty("chkCosmebio")){
} @if (@rproduct.HasProperty("chkNatprog")){
} @if (@rproduct.HasProperty("chkEcogarantie")){
} @if (@rproduct.HasProperty("chkEcocontrol")){
} @if (@rproduct.HasProperty("chkMSC")){
}
@if(rp.GetXmlProperty("genxml/imgs/genxml[1]/hidden/imageurl") != "") {
} else {
@(Model.GetSettingHtmlOf("noimageicon"))
}

@rproduct.ProductName

@rp.GetXmlProperty("genxml/lang/genxml/textbox/manufacturer")

@if (product.IsOnSale) {
@NBrightBuyUtils.FormatToStoreCurrency(rproduct.HighUnitPrice())@NBrightBuyUtils.FormatToStoreCurrency(rproduct.BestUnitPriceAll())
} else {
@NBrightBuyUtils.FormatToStoreCurrency(rproduct.BestUnitPriceAll())
}
Voir le produit
}
}

mcastano24 commented 6 years ago

yes even in the checkout it shows the incorrect price

mcastano24 commented 6 years ago

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

leedavi commented 6 years ago

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.

image

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.

mcastano24 commented 6 years ago

honestly i don't like DNN9 thanks for the help must have missed this..