Skip to content

Commit

Permalink
Merge pull request #522 from HotcakesCommerce/development
Browse files Browse the repository at this point in the history
Preparing to release HCC 3.9.0
  • Loading branch information
WillStrohl authored Jan 7, 2025
2 parents 153e96f + 418debd commit 9e6df64
Show file tree
Hide file tree
Showing 154 changed files with 6,639 additions and 6,235 deletions.
4 changes: 2 additions & 2 deletions Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

<!-- Version Number -->
<PropertyGroup Condition=" '$(BUILD_NUMBER)' == '' ">
<Version>03.08.02</Version>
<Version>03.09.00</Version>
<FileVersion>01.00.00</FileVersion>
<InformationalVersion>01.00.00</InformationalVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(BUILD_NUMBER)' != '' ">
<!-- Build Server Number -->
<Version>03.08.02</Version>
<Version>03.09.00</Version>
<FileVersion>$(BUILD_NUMBER)</FileVersion>
<InformationalVersion>$(BUILD_NUMBER)</InformationalVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[assembly: CLSCompliant(false)]
[assembly: ComVisible(false)]

[assembly: AssemblyVersion("3.08.02")]
[assembly: AssemblyVersion("3.09.00")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
Expand Down
4 changes: 2 additions & 2 deletions GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[assembly: System.Reflection.AssemblyConfiguration("Release")]
[assembly: System.Reflection.AssemblyCopyright("Copyright © 2024. All rights reserved.")]
[assembly: System.Reflection.AssemblyFileVersion("01.00.00")]
[assembly: System.Reflection.AssemblyVersion("03.08.02")]
[assembly: System.Reflection.AssemblyVersion("03.09.00")]



Expand All @@ -26,7 +26,7 @@ internal sealed partial class ThisAssembly {

internal const string AssemblyFileVersion = "01.00.00";

internal const string AssemblyVersion = "03.08.02";
internal const string AssemblyVersion = "03.09.00";

private ThisAssembly() {
}
Expand Down
3 changes: 3 additions & 0 deletions Libraries/Hotcakes.Commerce.Tests/BaseProductTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public void EditProduct()
edit.Featured = product.Featured;
edit.IsBundle = product.IsBundle;
edit.IsSearchable = product.IsSearchable;
edit.AllowUpcharge = product.AllowUpcharge;
edit.UpchargeAmount = product.UpchargeAmount;
edit.UpchargeUnit = product.UpchargeUnit;
edit.Status = product.Status;
edit.Sku = product.Sku;
edit.ProductName = product.ProductName;
Expand Down
14 changes: 7 additions & 7 deletions Libraries/Hotcakes.Commerce.Tests/CsvData/hcc_Product.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Id,bvin,SKU,ProductTypeId,ListPrice,SitePrice,SiteCost,TaxExempt,TaxClass,NonShipping,ShipSeparately,ShippingMode,ShippingWeight,ShippingLength,ShippingWidth,ShippingHeight,Status,ImageFileSmall,ImageFileMedium,CreationDate,MinimumQty,ManufacturerID,VendorID,GiftWrapAllowed,ExtraShipFee,LastUpdated,TemplateName,PreContentColumnId,PostContentColumnId,RewriteUrl,CustomProperties,GiftWrapPrice,StoreId,Featured,AllowReviews,OutOfStockMode,IsAvailableForSale,IsUserPrice,HideQty,IsSearchable,IsBundle,IsGiftCard,IsRecurring,RecurringInterval,RecurringIntervalType,ShippingCharge
1,"9113e66b-43fb-4eec-b9d1-84cb9750bccc","SAMPLE001",,0.0000000000,42.9500000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"BraceletBlue.png","BraceletBlue.png",07/23/2015 14:19:26,1,,,0,0.0000000000,07/23/2015 14:19:26,"","","","blue-bracelet","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
2,"60d3f285-689f-47f6-b93c-77386f8c6377","SAMPLE004",,0.0000000000,59.8700000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"indiana-jones-hat.jpg","indiana-jones-hat.jpg",07/23/2015 14:19:27,1,,,0,0.0000000000,07/23/2015 14:19:27,"","","","brown-fedora","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
3,"7996037a-d856-4880-a4d6-eb1833d73e10","SAMPLE006",,0.0000000000,29.9500000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"Earrings.jpg","Earrings.jpg",07/23/2015 14:19:27,1,,,0,0.0000000000,07/23/2015 14:19:27,"","","","butterfly-earings","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
4,"55f88d0a-89ca-4786-a4f5-feb963350d85","SAMPLE002",,0.0000000000,1.9900000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"CupCake.jpg","CupCake.jpg",07/23/2015 14:19:27,1,,,0,0.0000000000,07/23/2015 14:19:27,"","","","cupcake-sample","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
5,"2ef85ff8-c706-433f-9cf9-64d937bcd438","SAMPLE005",,1999.0000000000,1299.0000000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"Laptop.png","Laptop.png",07/23/2015 14:19:27,1,,,0,0.0000000000,07/23/2015 14:19:27,"","","","laptop-computer-sample","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
6,"ea6e4488-4ebd-4075-a579-d2c8a208e627","SAMPLE003",,0.0000000000,39.9500000000,0.0000000000,0,"-1",0,0,1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,1,"PurpleTop.jpg","PurpleTop.jpg",07/23/2015 14:19:27,1,,,0,0.0000000000,07/23/2015 14:19:28,"","","","purple-top","<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0.0000000000,1,True,,100,True,False,False,True,False,False,False,0,0,1
Id,bvin,SKU,ProductTypeId,ListPrice,SitePrice,SiteCost,TaxExempt,TaxClass,NonShipping,ShipSeparately,ShippingMode,ShippingWeight,ShippingLength,ShippingWidth,ShippingHeight,Status,ImageFileSmall,ImageFileMedium,CreationDate,MinimumQty,ManufacturerID,VendorID,GiftWrapAllowed,ExtraShipFee,LastUpdated,TemplateName,PreContentColumnId,PostContentColumnId,RewriteUrl,CustomProperties,GiftWrapPrice,StoreId,Featured,AllowReviews,OutOfStockMode,IsAvailableForSale,IsUserPrice,HideQty,IsSearchable,IsBundle,IsGiftCard,IsRecurring,RecurringInterval,RecurringIntervalType,ShippingCharge,AllowUpcharge,UpchargeAmount,UpchargeUnit
1,9113e66b-43fb-4eec-b9d1-84cb9750bccc,SAMPLE001,,0,42.95,0,0,-1,0,0,1,0,0,0,0,1,BraceletBlue.png,BraceletBlue.png,07/23/2015 14:19:26,1,,,0,0,07/23/2015 14:19:26,,,,blue-bracelet,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
2,60d3f285-689f-47f6-b93c-77386f8c6377,SAMPLE004,,0,59.87,0,0,-1,0,0,1,0,0,0,0,1,indiana-jones-hat.jpg,indiana-jones-hat.jpg,07/23/2015 14:19:27,1,,,0,0,07/23/2015 14:19:27,,,,brown-fedora,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
3,7996037a-d856-4880-a4d6-eb1833d73e10,SAMPLE006,,0,29.95,0,0,-1,0,0,1,0,0,0,0,1,Earrings.jpg,Earrings.jpg,07/23/2015 14:19:27,1,,,0,0,07/23/2015 14:19:27,,,,butterfly-earings,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
4,55f88d0a-89ca-4786-a4f5-feb963350d85,SAMPLE002,,0,1.99,0,0,-1,0,0,1,0,0,0,0,1,CupCake.jpg,CupCake.jpg,07/23/2015 14:19:27,1,,,0,0,07/23/2015 14:19:27,,,,cupcake-sample,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
5,2ef85ff8-c706-433f-9cf9-64d937bcd438,SAMPLE005,,1999,1299,0,0,-1,0,0,1,0,0,0,0,1,Laptop.png,Laptop.png,07/23/2015 14:19:27,1,,,0,0,07/23/2015 14:19:27,,,,laptop-computer-sample,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
6,ea6e4488-4ebd-4075-a579-d2c8a208e627,SAMPLE003,,0,39.95,0,0,-1,0,0,1,0,0,0,0,1,PurpleTop.jpg,PurpleTop.jpg,07/23/2015 14:19:27,1,,,0,0,07/23/2015 14:19:28,,,,purple-top,"<?xml version=""1.0"" encoding=""utf-16""?>\r\n<ArrayOfCustomProperty xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" />",0,1,TRUE,,100,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0,0,1,0,3,1
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ private Product GetProduct(XElement element)
TemplateName = Convert.ToString(element.Element("TemplateName").Value),
IsBundle = (element.Element("IsBundle") != null && Convert.ToBoolean(element.Element("IsBundle").Value)),
IsSearchable = (element.Element("IsSearchable") != null || Convert.ToBoolean(element.Element("IsSearchable").Value)),
AllowUpcharge = (element.Element("AllowUpcharge") != null || Convert.ToBoolean(element.Element("AllowUpcharge").Value)),
UpchargeAmount = element.Element("UpchargeAmount") == null ? 1 : Convert.ToInt32(element.Element("UpchargeAmount").Value),
UpchargeUnit = Convert.ToString(element.Element("UpchargeUnit").Value),
Status = (element.Element("Status") == null ? ProductStatus.Active : (ProductStatus)Convert.ToInt32(element.Element("Status").Value)),
Sku = Convert.ToString(element.Element("Sku").Value),
ProductName = Convert.ToString(element.Element("ProductName").Value),
Expand Down
48 changes: 36 additions & 12 deletions Libraries/Hotcakes.Commerce/Accounts/StoreSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ public int SendAbandonedEmailIn
set { SetProp(Constants.STORESETTING_SENDABANDONEDINTERVAL, value); }
}

public bool EnableFailedPaymentNotification
{
get { return GetPropBool(Constants.ENABLED_FAILED_PAYMENT_NOTIFICATION); }
set { SetProp(Constants.ENABLED_FAILED_PAYMENT_NOTIFICATION, value); }
}

public DateTime AllowApiToClearUntil
{
get
Expand Down Expand Up @@ -888,22 +894,16 @@ public bool ShippingUPSDiagnostics
set { SetProp(Constants.STORESETTING_UPSDIAGNOSITCS, value); }
}

public bool ShippingUpsForceResidential
{
get { return GetPropBool(Constants.STORESETTING_UPSFORCERESIDENTIAL); }
set { SetProp(Constants.STORESETTING_UPSFORCERESIDENTIAL, value); }
}

public string ShippingUpsLicense
public bool ShippingUPSTestingMode
{
get { return GetProp(Constants.STORESETTING_UPSLICENSE); }
set { SetProp(Constants.STORESETTING_UPSLICENSE, value); }
get { return GetPropBool(Constants.STORESETTING_UPSTESTINGMODE); }
set { SetProp(Constants.STORESETTING_UPSTESTINGMODE, value); }
}

public string ShippingUpsPassword
public bool ShippingUpsForceResidential
{
get { return GetProp(Constants.STORESETTING_UPSPASSWORD); }
set { SetProp(Constants.STORESETTING_UPSPASSWORD, value); }
get { return GetPropBool(Constants.STORESETTING_UPSFORCERESIDENTIAL); }
set { SetProp(Constants.STORESETTING_UPSFORCERESIDENTIAL, value); }
}

public int ShippingUpsPickupType
Expand All @@ -918,12 +918,36 @@ public bool ShippingUpsSkipDimensions
set { SetProp(Constants.STORESETTING_UPSSHIPDIMENSIONS, value); }
}

public string ShippingUpsClientId
{
get { return GetProp(Constants.STORESETTING_UPSCLIENTID); }
set { SetProp(Constants.STORESETTING_UPSCLIENTID, value); }
}

public string ShippingUpsClientSecret
{
get { return GetProp(Constants.STORESETTING_UPSCLIENTSECRET); }
set { SetProp(Constants.STORESETTING_UPSCLIENTSECRET, value); }
}

public string ShippingUpsLicense
{
get { return GetProp(Constants.STORESETTING_UPSLICENSE); }
set { SetProp(Constants.STORESETTING_UPSLICENSE, value); }
}

public string ShippingUpsUsername
{
get { return GetProp(Constants.STORESETTING_UPSUSERNAME); }
set { SetProp(Constants.STORESETTING_UPSUSERNAME, value); }
}

public string ShippingUpsPassword
{
get { return GetProp(Constants.STORESETTING_UPSPASSWORD); }
set { SetProp(Constants.STORESETTING_UPSPASSWORD, value); }
}

public bool ShippingUPSWriteXML
{
get { return GetPropBool(Constants.STORESETTING_UPSWRITEXML); }
Expand Down
10 changes: 8 additions & 2 deletions Libraries/Hotcakes.Commerce/Catalog/CatalogExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ protected override void WriteHeader()
"StockOut",
"Low Stock at",
"Roles",
"Searchable"
"Searchable",
"AllowUpcharge",
"UpchargeAmount",
"UpchargeUnit"
}, _headerStyle);

_firstRow = 3;
Expand Down Expand Up @@ -275,7 +278,10 @@ protected override int WriteProductRow(Product p, int rowIndex)
invs.Sum(i => i.OutOfStockPoint).ToString(),
invs.Sum(i => i.LowStockPoint).ToString(),
GetRoles(p.Bvin),
GetYesNo(p.IsSearchable)
GetYesNo(p.IsSearchable),
GetYesNo(p.AllowUpcharge),
p.UpchargeAmount.ToString(),
p.UpchargeUnit
}, _rowStyle);

return base.WriteProductRow(p, rowIndex);
Expand Down
42 changes: 40 additions & 2 deletions Libraries/Hotcakes.Commerce/Catalog/CatalogImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
using DocumentFormat.OpenXml.Extensions;
using DocumentFormat.OpenXml.Spreadsheet;
using Hotcakes.Commerce.Contacts;
using Hotcakes.Commerce.Data.EF;
using Hotcakes.Commerce.Shipping;
using Hotcakes.Commerce.Storage;
using Hotcakes.Commerce.Taxes;
Expand Down Expand Up @@ -330,7 +331,7 @@ protected override bool ProcessRow(Row row)
return false;
}

p.UrlSlug = slug;
p.UrlSlug = slug;
p.Status = GetCellBool(row, "B") ? ProductStatus.Active : ProductStatus.Disabled;
p.Featured = GetCellBool(row, "C");
p.Sku = sku;
Expand Down Expand Up @@ -376,8 +377,45 @@ protected override bool ProcessRow(Row row)
var roles = GetCell(row, "AH");

p.IsSearchable = GetCellBool(row, "AI");
bool allowUpcharge;
var cellValueAJ = GetCell(row, "AJ");
if (string.IsNullOrWhiteSpace(cellValueAJ))
{
allowUpcharge = false;
}
else
{
allowUpcharge = GetCellBool(row, "AJ");
}

p.AllowUpcharge = allowUpcharge;

decimal upchargeAmount;
var cellValueAK = GetCell(row, "AK");
if (string.IsNullOrWhiteSpace(cellValueAK))
{
upchargeAmount = 3m;
}
else
{
upchargeAmount = GetCellDecimal(row, "AK");
}
p.UpchargeAmount = upchargeAmount;

string upchargeUnit;
var cellValueAL = GetCell(row, "AL");
if (string.IsNullOrWhiteSpace(cellValueAL))
{
upchargeUnit = "1";
}
else
{
upchargeUnit = cellValueAL;
}
p.UpchargeUnit = upchargeUnit;


if (string.IsNullOrWhiteSpace(p.ProductName))
if (string.IsNullOrWhiteSpace(p.ProductName))
{
Log(string.Format("- Product name is empty for row {0}", row.RowIndex));
return false;
Expand Down
10 changes: 9 additions & 1 deletion Libraries/Hotcakes.Commerce/Catalog/CatalogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@
using System.Linq;
using System.Text;
using Hotcakes.Commerce.Analytics;
using Hotcakes.Commerce.Common;
using Hotcakes.Commerce.Content;
using Hotcakes.Commerce.Globalization;
using Hotcakes.Commerce.Orders;
using Hotcakes.Commerce.Storage;
using Hotcakes.Commerce.Utilities;
using Hotcakes.CommerceDTO.v1.Catalog;
using Hotcakes.Web;
using Hotcakes.Web.Data;

Expand Down Expand Up @@ -721,7 +724,12 @@ public bool ProductsCreateWithInventory(Product item, bool rebuildSearchIndex)
{
item.UrlSlug = Text.Slugify(item.ProductName, true);
}

if (string.IsNullOrWhiteSpace(item.UpchargeUnit))
{
item.UpchargeAmount = Constants.UpchargeAmount;
item.UpchargeUnit = ((int)UpchargeAmountTypesDTO.Percent).ToString();
}

var result = Products.Create(item);
if (rebuildSearchIndex)
{
Expand Down
13 changes: 13 additions & 0 deletions Libraries/Hotcakes.Commerce/Catalog/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,9 @@ public bool CustomPropertiesFromXml(string data)
/// If true, this product will be indexed and returned in the search results.
/// </summary>
public bool IsSearchable { get; set; }
public bool AllowUpcharge { get; set; }
public decimal UpchargeAmount { get; set; }
public string UpchargeUnit { get; set; }

/// <summary>
/// If set to true, this product will allow reviews to be saved by customers.
Expand Down Expand Up @@ -1012,6 +1015,9 @@ public Product Clone(bool cloneProductChoicesAndInputs, bool cloneProductImages)
}
result.InventoryMode = InventoryMode;
result.IsSearchable = IsSearchable;
result.AllowUpcharge = AllowUpcharge;
result.UpchargeAmount = UpchargeAmount;
result.UpchargeUnit = UpchargeUnit;
result.IsAvailableForSale = IsAvailableForSale;
result.IsBundle = IsBundle;
result.IsUserSuppliedPrice = IsUserSuppliedPrice;
Expand Down Expand Up @@ -1368,6 +1374,10 @@ public void FromDto(ProductDTO dto)

IsSearchable = dto.IsSearchable;

AllowUpcharge = dto.AllowUpcharge;
UpchargeAmount = dto.UpchargeAmount;
UpchargeUnit = dto.UpchargeUnit;

ShippingCharge = (ShippingChargeType) (int) dto.ShippingCharge;
}

Expand Down Expand Up @@ -1435,6 +1445,9 @@ public ProductDTO ToDto()
dto.ShippingCharge = (ShippingChargeTypeDTO) (int) ShippingCharge;

dto.IsSearchable = IsSearchable;
dto.AllowUpcharge = AllowUpcharge;
dto.UpchargeAmount = UpchargeAmount;
dto.UpchargeUnit = UpchargeUnit;

return dto;
}
Expand Down
6 changes: 6 additions & 0 deletions Libraries/Hotcakes.Commerce/Catalog/ProductRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,9 @@ protected override void CopyItemToModel(hcc_Product data, Product model)
model.CustomPropertiesFromXml(data.CustomProperties);
model.Featured = data.Featured;
model.IsSearchable = data.IsSearchable;
model.AllowUpcharge = data.AllowUpcharge;
model.UpchargeAmount = data.UpchargeAmount;
model.UpchargeUnit = data.UpchargeUnit;
model.GiftWrapAllowed = data.GiftWrapAllowed == 1 ? true : false;
model.GiftWrapPrice = data.GiftWrapPrice;
model.ImageFileMedium = data.ImageFileMedium;
Expand Down Expand Up @@ -770,6 +773,9 @@ protected override void CopyModelToItem(JoinedItem<hcc_Product, hcc_ProductTrans
data.Item.CustomProperties = model.CustomPropertiesToXml();
data.Item.Featured = model.Featured;
data.Item.IsSearchable = model.IsSearchable;
data.Item.AllowUpcharge = model.AllowUpcharge;
data.Item.UpchargeAmount = model.UpchargeAmount;
data.Item.UpchargeUnit = model.UpchargeUnit;
data.Item.GiftWrapAllowed = model.GiftWrapAllowed ? 1 : 0;
data.Item.GiftWrapPrice = model.GiftWrapPrice;
data.Item.ImageFileMedium = model.ImageFileMedium;
Expand Down
Loading

0 comments on commit 9e6df64

Please sign in to comment.