/// <summary>
        /// Get product variant attribute values
        /// </summary>
        /// <param name="Attributes">Attributes</param>
        /// <returns>Product variant attribute values</returns>
        public static ProductVariantAttributeValueCollection ParseProductVariantAttributeValues(string Attributes)
        {
            ProductVariantAttributeValueCollection pvaValues     = new ProductVariantAttributeValueCollection();
            ProductVariantAttributeCollection      pvaCollection = ParseProductVariantAttributes(Attributes);

            foreach (ProductVariantAttribute pva in pvaCollection)
            {
                if (!pva.ShouldHaveValues)
                {
                    continue;
                }

                List <string> pvaValuesStr = ParseValues(Attributes, pva.ProductVariantAttributeID);
                foreach (string pvaValueStr in pvaValuesStr)
                {
                    if (!String.IsNullOrEmpty(pvaValueStr))
                    {
                        int pvaValueID = 0;
                        if (int.TryParse(pvaValueStr, out pvaValueID))
                        {
                            ProductVariantAttributeValue pvaValue = ProductAttributeManager.GetProductVariantAttributeValueByID(pvaValueID);
                            if (pvaValue != null)
                            {
                                pvaValues.Add(pvaValue);
                            }
                        }
                    }
                }
            }
            return(pvaValues);
        }
        /// <summary>
        /// Formats attributes
        /// </summary>
        /// <param name="productVariant">Product variant</param>
        /// <param name="Attributes">Attributes</param>
        /// <param name="customer">Customer</param>
        /// <param name="Serapator">Serapator</param>
        /// <param name="HTMLEncode">A value indicating whether to encode (HTML) values</param>
        /// <returns>Attributes</returns>
        public static string FormatAttributes(ProductVariant productVariant, string Attributes,
                                              Customer customer, string Serapator, bool HTMLEncode)
        {
            StringBuilder result = new StringBuilder();

            ProductVariantAttributeCollection pvaCollection = ParseProductVariantAttributes(Attributes);

            foreach (ProductVariantAttribute pva in pvaCollection)
            {
                List <string> valuesStr = ParseValues(Attributes, pva.ProductVariantAttributeID);
                foreach (string valueStr in valuesStr)
                {
                    string pvaAttribute = string.Empty;
                    if (!pva.ShouldHaveValues)
                    {
                        pvaAttribute = string.Format("{0}: {1}", pva.ProductAttribute.Name, valueStr);
                    }
                    else
                    {
                        ProductVariantAttributeValue pvaValue = ProductAttributeManager.GetProductVariantAttributeValueByID(Convert.ToInt32(valueStr));
                        if (pvaValue != null)
                        {
                            pvaAttribute = string.Format("{0}: {1}", pva.ProductAttribute.Name, pvaValue.Name);
                            decimal priceAdjustmentBase = TaxManager.GetPrice(productVariant, pvaValue.PriceAdjustment, customer);
                            decimal priceAdjustment     = CurrencyManager.ConvertCurrency(priceAdjustmentBase, CurrencyManager.PrimaryStoreCurrency, NopContext.Current.WorkingCurrency);
                            if (priceAdjustmentBase > 0)
                            {
                                string priceAdjustmentStr = PriceHelper.FormatPrice(priceAdjustment, false, false);
                                pvaAttribute += string.Format(" [+{0}]", priceAdjustmentStr);
                            }
                        }
                    }

                    if (!String.IsNullOrEmpty(pvaAttribute))
                    {
                        result.Append(Serapator);
                        if (HTMLEncode)
                        {
                            result.Append(HttpUtility.HtmlEncode(pvaAttribute));
                        }
                        else
                        {
                            result.Append(pvaAttribute);
                        }
                    }
                }
            }
            return(result.ToString());
        }