Skip to content

Commit c2359cd

Browse files
committed
Updated widget and shipping plugins
1 parent 290d849 commit c2359cd

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/Libraries/SmartStore.Services/Tax/ITaxService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ decimal GetTaxRate(Product product, int taxCategoryId,
7171
/// <param name="price">Price</param>
7272
/// <param name="taxRate">Tax rate</param>
7373
/// <returns>Price</returns>
74-
decimal GetProductPrice(ProductVariant product, decimal price,
74+
decimal GetProductPrice(Product product, decimal price,
7575
out decimal taxRate);
7676

7777
/// <summary>

src/Plugins/Widgets.GoogleAnalytics/Controllers/WidgetsGoogleAnalyticsController.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Web.Mvc;
66
using SmartStore.Core;
77
using SmartStore.Core.Domain;
8+
using SmartStore.Core.Domain.Catalog;
89
using SmartStore.Core.Domain.Orders;
910
using SmartStore.Plugin.Widgets.GoogleAnalytics.Models;
1011
using SmartStore.Services.Catalog;
@@ -213,14 +214,14 @@ private string GetEcommerceScript(Order order)
213214
string analyticsEcommerceDetailScript = googleAnalyticsSettings.EcommerceDetailScript;
214215
//get category
215216
string categ = "";
216-
var defaultProductCategory = _categoryService.GetProductCategoriesByProductId(item.ProductVariant.ProductId).FirstOrDefault();
217+
var defaultProductCategory = _categoryService.GetProductCategoriesByProductId(item.ProductId).FirstOrDefault();
217218
if (defaultProductCategory != null)
218219
categ = defaultProductCategory.Category.Name;
219220
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{ORDERID}", order.GetOrderNumber());
220221
//The SKU code is a required parameter for every item that is added to the transaction
221-
item.ProductVariant.MergeWithCombination(item.AttributesXml);
222-
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{PRODUCTSKU}", FixIllegalJavaScriptChars(item.ProductVariant.Sku));
223-
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{PRODUCTNAME}", FixIllegalJavaScriptChars(item.ProductVariant.FullProductName));
222+
((IProduct)item.Product).MergeWithCombination(item.AttributesXml);
223+
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{PRODUCTSKU}", FixIllegalJavaScriptChars(item.Product.Sku));
224+
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{PRODUCTNAME}", FixIllegalJavaScriptChars(item.Product.Name));
224225
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{CATEGORYNAME}", FixIllegalJavaScriptChars(categ));
225226
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{UNITPRICE}", item.UnitPriceInclTax.ToString("0.00", usCulture));
226227
analyticsEcommerceDetailScript = analyticsEcommerceDetailScript.Replace("{QUANTITY}", item.Quantity.ToString());

src/Plugins/Widgets.GoogleAnalytics/Description.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FriendlyName: Google Analytics
22
SystemName: Widgets.GoogleAnalytics
3-
Version: 1.4
3+
Version: 1.5
44
MinAppVersion: 1.2.1
55
DisplayOrder: 1
66
FileName: SmartStore.Plugin.Widgets.GoogleAnalytics.dll

0 commit comments

Comments
 (0)