Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
leedavi committed Feb 16, 2021
2 parents 37f6919 + 75bb391 commit e8fbb98
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 71 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,4 @@ Installation/OpenStore_4.1.4_Upgrade.zip
Installation/OpenStore_4.1.4_Upgate.zip
Installation/OpenStore_4.1.4_Upgrade-OLD.zip
dnnpack.config
*.zip
2 changes: 1 addition & 1 deletion App_LocalResources/Notification.ascx.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<value>De bestelling is geannuleerd, of de betaling is mislukt. Controleer uw bankgegevens of neem contact op met ons op als u denkt dat het probleem bij ons zit.</value>
</data>
<data name="checkoutsuccessmessage.Text" xml:space="preserve">
<value>Dank voor uw bestelling. U ontvangt per e-mail een bevestiging met alle informatie. Controleer uw ongewenste e-mail als u na 30 minuten nog niets ontvangen heeft. Indien u contact met ons opneemt vernemen wij graag uw ordernummer.</value>
<value>Dank voor uw bestelling. U ontvangt per e-mail een bevestiging met alle informatie. Controleer uw ongewenste e-mail als u na 30 minuten nog niets ontvangen heeft. Indien u contact met ons opneemt vernemen wij graag uw bestelnummer.</value>
</data>
<data name="Collection.Text" xml:space="preserve">
<value>Details van de bestelling</value>
Expand Down
2 changes: 1 addition & 1 deletion App_LocalResources/OrderAdmin.ascx.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<value xml:space="preserve">Kwitantie</value>
</data>
<data name="PaymentMethod.Text">
<value xml:space="preserve">Betalingsmethode: </value>
<value xml:space="preserve">Betaalmethode: </value>
</data>
<data name="PaymentStatus.Text" lastModified="2014-11-29 13:56:22">
<value xml:space="preserve">Status betaling</value>
Expand Down
6 changes: 6 additions & 0 deletions App_LocalResources/ProductView.ascx.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,10 @@
&lt;i class="fa fa-star fa-stack-1x fa-inverse"&gt;&lt;/i&gt;
&lt;/span&gt;</value>
</data>
<data name="article.Text" xml:space="preserve">
<value>artikel</value>
</data>
<data name="articles.Text" xml:space="preserve">
<value>artikelen</value>
</data>
</root>
2 changes: 1 addition & 1 deletion App_LocalResources/plugins.ascx.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<value>&lt;i class="fa fa-bar-chart-o fa-fw"&gt;&lt;/i&gt;</value>
</data>
<data name="assembly.Text" xml:space="preserve">
<value>Vergadering</value>
<value>Assembly</value>
</data>
<data name="bomenuattributes.Text" xml:space="preserve">
<value>class="nav main-menu"</value>
Expand Down
2 changes: 1 addition & 1 deletion App_LocalResources/settings.ascx.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<value>Fiscale codeveld</value>
</data>
<data name="copyorderto.Text" xml:space="preserve">
<value>Kopiëren van bestelling naar E-mail</value>
<value>Kopie van bestelling naar e-mail</value>
</data>
<data name="currencysymbol.Text" xml:space="preserve">
<value>Valutasymbool</value>
Expand Down
118 changes: 65 additions & 53 deletions Components/NBrightBuyUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,7 @@ public static string RazorTemplRenderList(string razorTemplName, int moduleid, s
return RazorTemplRenderList(razorTemplName, moduleid, cacheKey, objList, templateControlPath, theme, lang, settings, null);
}

private static string lockobjectRazorTemplRenderList = "lockitRazorTemplRenderList";
public static string RazorTemplRenderList(string razorTemplName, int moduleid, string cacheKey, List<NBrightInfo> objList, string templateControlPath, string theme, string lang, Dictionary<string, string> settings, NBrightInfo headerData)
{
// do razor template
Expand All @@ -1560,51 +1561,59 @@ public static string RazorTemplRenderList(string razorTemplName, int moduleid, s
var razorTempl = (string)GetModCache(ckey);
if (razorTempl == null || StoreSettings.Current.DebugMode)
{
razorTempl = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTempl != "")
lock (lockobjectRazorTemplRenderList)
{
var nbRazor = new NBrightRazor(objList.Cast<object>().ToList(), settings, HttpContext.Current.Request.QueryString);
nbRazor.ModuleId = moduleid;
nbRazor.FullTemplateName = theme + "." + razorTemplName;
nbRazor.TemplateName = razorTemplName;
nbRazor.ThemeFolder = theme;
nbRazor.Lang = lang;

nbRazor.HeaderData = headerData;

var razorTemplateKey = "NBrightBuyRazorKey" + theme + razorTemplName + PortalSettings.Current.PortalId.ToString();
razorTempl = RazorRender(nbRazor, razorTempl, razorTemplateKey, StoreSettings.Current.DebugMode);
if (cacheKey != "") SetModCache(moduleid, ckey, razorTempl); // only save to cache if we pass in a cache key.
razorTempl = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTempl != "")
{
var nbRazor = new NBrightRazor(objList.Cast<object>().ToList(), settings, HttpContext.Current.Request.QueryString);
nbRazor.ModuleId = moduleid;
nbRazor.FullTemplateName = theme + "." + razorTemplName;
nbRazor.TemplateName = razorTemplName;
nbRazor.ThemeFolder = theme;
nbRazor.Lang = lang;

nbRazor.HeaderData = headerData;

var razorTemplateKey = "NBrightBuyRazorKey" + theme + razorTemplName + PortalSettings.Current.PortalId.ToString();
razorTempl = RazorRender(nbRazor, razorTempl, razorTemplateKey, StoreSettings.Current.DebugMode);
if (cacheKey != "") SetModCache(moduleid, ckey, razorTempl); // only save to cache if we pass in a cache key.
}
}
}
return razorTempl;
}

private static string lockobjectRenderGroupCategoryList = "lockitRenderGroupCategoryList";
public static string RazorTemplRenderGroupCategoryList(string razorTemplName, int moduleid, string cacheKey, List<GroupCategoryData> objList, string templateControlPath, string theme, string lang, Dictionary<string, string> settings)
{
// do razor template
var cachekey = "NBrightBuyRazorOutputGrp" + theme + razorTemplName + "*" + cacheKey + PortalSettings.Current.PortalId.ToString();
var razorTempl = (string)GetModCache(cachekey);
if (razorTempl == null || StoreSettings.Current.DebugMode)
{
razorTempl = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTempl != "")
lock (lockobjectRenderGroupCategoryList)
{
var nbRazor = new NBrightRazor(objList.Cast<object>().ToList(), settings, HttpContext.Current.Request.QueryString);
nbRazor.ModuleId = moduleid;
nbRazor.FullTemplateName = theme + "." + razorTemplName;
nbRazor.TemplateName = razorTemplName;
nbRazor.ThemeFolder = theme;
nbRazor.Lang = lang;

var razorTemplateKey = "NBrightBuyRazorKey" + theme + razorTemplName + PortalSettings.Current.PortalId.ToString();
razorTempl = RazorRender(nbRazor, razorTempl, razorTemplateKey, StoreSettings.Current.DebugMode);
if (cacheKey != "") SetModCache(moduleid, cachekey, razorTempl); // only save to cache if we pass in a cache key.
razorTempl = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTempl != "")
{
var nbRazor = new NBrightRazor(objList.Cast<object>().ToList(), settings, HttpContext.Current.Request.QueryString);
nbRazor.ModuleId = moduleid;
nbRazor.FullTemplateName = theme + "." + razorTemplName;
nbRazor.TemplateName = razorTemplName;
nbRazor.ThemeFolder = theme;
nbRazor.Lang = lang;

var razorTemplateKey = "NBrightBuyRazorKey" + theme + razorTemplName + PortalSettings.Current.PortalId.ToString();
razorTempl = RazorRender(nbRazor, razorTempl, razorTemplateKey, StoreSettings.Current.DebugMode);
if (cacheKey != "") SetModCache(moduleid, cachekey, razorTempl); // only save to cache if we pass in a cache key.
}
}
}
return razorTempl;
}

private static string lockobjectRazorPreProcessTempl = "lockitRazorPreProcessTempl";
public static Dictionary<string, string> RazorPreProcessTempl(string razorTemplName, string templateControlPath, string theme, string lang, Dictionary<string, string> settings, string moduleid = "")
{
// match the "AddPreProcessMetaData()" cachekey.
Expand All @@ -1618,37 +1627,40 @@ public static Dictionary<string, string> RazorPreProcessTempl(string razorTemplN
if (cachedlist != null) return cachedlist;
}

// build cache data from template.
var razorTemplate = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTemplate != "" && razorTemplate.Contains("AddPreProcessMetaData"))
{
var obj = new NBrightInfo(true);
obj.Lang = lang;
obj.ModuleId = -1;
var l = new List<object>();
l.Add(obj);
var modRazor = new NBrightRazor(l, settings, HttpContext.Current.Request.QueryString);
modRazor.FullTemplateName = theme + "." + razorTemplName;
modRazor.TemplateName = razorTemplName;
modRazor.ThemeFolder = theme;
modRazor.Lang = lang;
try
lock (lockobjectRazorPreProcessTempl)
{
// build cache data from template.
var razorTemplate = GetRazorTemplateData(razorTemplName, templateControlPath, theme, lang);
if (razorTemplate != "" && razorTemplate.Contains("AddPreProcessMetaData"))
{
// do razor and cache preprocessmetadata
razorTemplate = RazorRender(modRazor, razorTemplate, cachekey, false);
var obj = new NBrightInfo(true);
obj.Lang = lang;
obj.ModuleId = -1;
var l = new List<object>();
l.Add(obj);
var modRazor = new NBrightRazor(l, settings, HttpContext.Current.Request.QueryString);
modRazor.FullTemplateName = theme + "." + razorTemplName;
modRazor.TemplateName = razorTemplName;
modRazor.ThemeFolder = theme;
modRazor.Lang = lang;
try
{
// do razor and cache preprocessmetadata
razorTemplate = RazorRender(modRazor, razorTemplate, cachekey, false);
}
catch (Exception ex)
{
// Only log exception, could be a error because of missing data. The preprocessing doesn't care.
}
cachedlist = (Dictionary<string, string>)Utils.GetCache(cachekey);
if (cachedlist == null) cachedlist = new Dictionary<string, string>();
Utils.SetCache(cachekey, cachedlist);
}
catch (Exception ex)
else
{
// Only log exception, could be a error because of missing data. The preprocessing doesn't care.
cachedlist = new Dictionary<string, string>();
Utils.SetCache(cachekey, cachedlist);
}
cachedlist = (Dictionary<string, string>) Utils.GetCache(cachekey);
if (cachedlist == null) cachedlist = new Dictionary<string, string>();
Utils.SetCache(cachekey, cachedlist);
}
else
{
cachedlist = new Dictionary<string, string>();
Utils.SetCache(cachekey, cachedlist);
}
return cachedlist;
}
Expand Down
2 changes: 1 addition & 1 deletion DNNpackager.dnnpack
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<websitedestrelpath>\DesktopModules\NBright\NBrightBuy</websitedestrelpath>
<websitedestbinrelpath>\bin</websitedestbinrelpath>
<!-- Include only files that match the regular expression -->
<regexpr>(\.cshtml|\.html|\.resx|\.dnn|\.png|\.css|\.js|\.xml|\.txt|\.md|\.aspx|\.ascx|\.ashx)$</regexpr>
<regexpr>(\.cshtml|\.html|\.resx|OpenStore\.dnn|\.png|\.gif|\.jpg|\.jpeg|\.css|\.js|\.xml|\.txt|\.md|\.aspx|\.ascx|\.ashx)$</regexpr>
<directory include='false'>
<!-- All paths should be from the source root (project root) -->
<value>\.git</value>
Expand Down
Loading

0 comments on commit e8fbb98

Please sign in to comment.