Dynamicweb 8 Documentation
Price Class
Members  Example 

Represents information about price.
Object Model
Price ClassCurrency ClassPriceCollection ClassPrice ClassPeriodCollection ClassPeriod ClassVariantOptionCollection ClassVariantOption ClassVariantOptionCollection ClassVariantOption Class
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class Price 
[SerializableAttribute()] 
public class Price 
Example
class MyPage : System.Web.UI.Page
{
   public Dynamicweb.eCommerce.Variants.VariantOptionCollection getVariantOptions(Dynamicweb.eCommerce.Prices.Price price)
   {
       string SQL = "SELECT EcomVariantsOptions.* FROM EcomVariantsOptions ";
       SQL += "INNER JOIN EcomVariantGroups ON EcomVariantGroups.VariantGroupID = EcomVariantsOptions.VariantOptionGroupID ";
       SQL += "WHERE EcomVariantsOptions.VariantOptionLanguageID = '" + price.LanguageID + "' ";
       SQL += "AND EcomVariantsOptions.VariantOptionID = '" + price.UnitID + "' ";
       SQL += "AND EcomVariantGroups.VariantGroupUnit = " + Database.SqlBool(true) + " ";
       SQL += "ORDER BY VariantOptionSortOrder, VariantOptionId";

       return GetVariantOptionCollection(SQL);
   }

   private Dynamicweb.eCommerce.Variants.VariantOptionCollection GetVariantOptionCollection(string sql)
   {
       Dynamicweb.eCommerce.Variants.VariantOptionCollection col = default(Dynamicweb.eCommerce.Variants.VariantOptionCollection);
       string CacheKey = "Variant.Option.Collection." + sql;

       if (HttpContext.Current.Items.Contains(CacheKey))
       {
           col = (Dynamicweb.eCommerce.Variants.VariantOptionCollection)HttpContext.Current.Items[CacheKey];
       }
       else
       {
           col = new Dynamicweb.eCommerce.Variants.VariantOptionCollection();
           col.Load(sql);
           HttpContext.Current.Items.Add(CacheKey, col);
       }
       return col;
   }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Prices.Price

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Price Members
Dynamicweb.eCommerce.Prices Namespace

Send Feedback