找到你要的答案

Q:How to show product variation in detail page in ASP.NET

Q:如何在ASP.NET产品详细页面的变化

I am totally stuck in product variation in my upcoming e-commerce website. Like I have multiple variations for single product. For example Product is available in different Color and Size Variation but this is not fixed that variation is only available in Color and Size it may be more or less.

If you have any solution for this problem then please give me some hint.I am developing website in ASP.NET and I want to make my own e-commerce application so I'm not using any CMS.

我完全停留在产品变化在我即将到来的电子商务网站。像我有多种多样的单一产品。例如,产品可在不同的颜色和大小变化,但这是不固定的变化仅在颜色和大小可能会或多或少。

如果您有这个问题,那么请给我一些提示任何解决方案。我的网站在ASP.NET的发展,我想做我自己的电子商务应用程序,所以我没有使用任何CMS。

answer1: 回答1:

Usually this is managed by the hierarchy of creating attributes, product types and then products, in that order bottom up.

Attributes are at the discrete level. So you have numeric, string, list or Boolean kind of attributes. E.g. Size is an attribute, that is a list of String values (S,M,L,XL etc). Same with Color. Age can be a numeric attribute.

Now you can build product types, that represent what kind of product it is. E.g. a product type can be "T-Shirt". Now you can associate attributes with this product type. Say size and color.

When you want to create product, let admin choose product type. Using that, show them and let them configure the attributes they will have on the product. So if they choose T shirt product type, they will be able to choose values for Color and Size (since those are lists).

So if you want to update the product type and add age attribute to it, you can do so easily. And then all products that use that product type will start showing Age as another attribute. And Age being numeric, you can show text box to customers for accepting value for that field.

Hope this helps!

通常这是由创建属性、产品类型和产品的层次结构管理的,按顺序自下而上。

属性处于离散级别。所以你有数字,字符串,列表或布尔类型的属性。大小是一个属性,这是一个列表的字符串值(S,M,L,XL等)。颜色相同。年龄可以是数字属性。

现在你可以建立产品类型,它代表什么样的产品。产品类型可以是“T恤”。现在可以将属性与该产品类型关联。说尺寸和颜色。

当您想要创建产品时,让管理员选择产品类型。使用它们,显示它们,并让它们配置产品上的属性。因此,如果他们选择T恤产品类型,他们将能够选择值的颜色和大小(因为这些列表)。

因此,如果您想更新产品类型并添加年龄属性,您可以这样做很容易。然后所有使用该产品类型的产品将开始显示年龄作为另一个属性。当数值为数字时,您可以向客户显示文本框以接受该字段的值。

希望这有助于!

asp.net  e-commerce