Ok, I tried this solution:
To override values of product properties like the price, you need to change primarily two things:
Perform a value override in \SmartStore.Services\Catalog\ProductExtensions.cs::MergeWithCombination.
Modify the price property of \SmartStore.Core\Domain\Catalog\Product.cs like it has been done with SKU for instance.
I create a field inside ProductVariantAttributeCombination Database Table with name Price (decimal 18,4).
I Inserted into SmartStore.Data\Mapping\ProductVariantAttributeCombinationMap file :
this.Property(pvac => pvac.Price).HasPrecision(18, 4);
On SmartStore.Core\Domain\Catalog\Product.cs I inserted the following details:
private decimal _price;
/// <summary>
/// Gets or sets the override price
/// </summary>
[DataMember]
public decimal Price
{
get
{
return this.GetMergedDataValue<decimal>("Price", _price);
}
set
{
_price = value;
}
}
on SmartStore.Service\Catalog\ProductExtensions.cs inside MergeWithCombination(this)..
if (combination.Price.HasValue)
product.MergedDataValues.Add("Price", combination.Price);
inside SmartStore.Admin\Models\ProductVariantAttributeCombinationModel.cs I inserted
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.Price")]
public decimal? Price { get; set; }
consequently then I opened the admin area for product AttributeCombinationEditPopup.cshtml to test the field price but its not appearing on the webpage.
any idea will be welcome.
brgds