如何在ASP.NET中的详细页面中显示产品变化 [英] How to show product variation in detail page in ASP.NET

查看:74
本文介绍了如何在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.

如果任何解决此问题的方法,请给我一些提示。我正在ASP.NET中开发网站,并且希望创建自己的电子商务应用程序,因此我不使用任何CMS。

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.

推荐答案

通常,此操作由创建属性,产品类型然后是产品的层次结构来管理,顺序是自下而上。

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

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

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.

现在,您可以构建产品类型,以表示产品类型。例如。产品类型可以是 T恤。现在,您可以将属性与此产品类型关联。说出尺寸和颜色。

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.

要创建产品时,让管理员选择产品类型。使用它们,向他们展示并让他们配置将在产品上拥有的属性。因此,如果他们选择T恤产品类型,他们将能够选择颜色和尺寸值(因为它们是列表)。

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).

因此,如果要更新产品输入年龄属性并添加年龄属性,即可轻松实现。然后,所有使用该产品类型的产品都将开始显示Age作为另一个属性。而且年龄是数字,您可以向客户显示文本框以接受该字段的值。

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.

希望这会有所帮助!

这篇关于如何在ASP.NET中的详细页面中显示产品变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆