Asp.Net Storefront产品列表页面

时间:2014-08-26 07:37:46

标签: asp.net vb.net aspdotnetstorefront

我使用的是Asp.Net Storefront 7.0版本。我想创建自定义页面,允许用户浏览单个页面中的所有产品。我搜索了负责执行此产品浏览任务的网站解决方案中的页面,但我没有找到任何特定页面(因为该系统是由其他开发人员开发的)。

我可以通过示例查询数据库中有折扣和其他信息的产品。用户可以从该自定义页面下订单吗?

由于

1 个答案:

答案 0 :(得分:0)

我会说从两个方面看这个。您可以查看添加一些定制的SQL来检索您想要显示的产品,然后修改每页显示的列和行,或者只显示带有通配符搜索词的所有列。

示例

显示产品的SQL

 <query name="Products" rowElementName="Product">
    <sql>
        <![CDATA[
            exec dbo.Show_GetProducts 
                @categoryID = @CatID,
                @sectionID = @SecID,
                @manufacturerID = @ManID,
                @distributorID = @DistID,
                @genreID = @GenreID,
                @vectorID = @VectorID,
                @localeName = @locale,
                @CustomerLevelID = @CustLevelID,
                @affiliateID = @AffID,
                @ProductTypeID = @ProdTypeID, 
                @ViewType = 1,
                @pagenum = @pgnum,
                @pagesize = @pgsize,
                @StatsFirst = 0,
                @publishedonly = 1,
                @ExcludePacks = 1,
                @ExcludeKits = 1,
                @ExcludeSysProds = 0,
                @InventoryFilter = @InvFilter,
                @sortEntityName = @entityname,
                          @storeID = @StoreID,
                @filterProduct = @FilterProduct,
                 @sortEntity = @sortentity,
                 @filterLetter = @filterletter


        ]]>
    </sql>
    <queryparam paramname="@CatID"              paramtype="runtime"     requestparamname="CatID"                                                          sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@SecID"              paramtype="runtime"     requestparamname="SecID"                                                          sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@ManID"              paramtype="runtime"     requestparamname="ManID"                                                          sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@DistID"             paramtype="runtime"     requestparamname="DistID"                                                         sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@GenreID"          paramtype="runtime"       requestparamname="GenreID"                                                    sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@VectorID"           paramtype="runtime"     requestparamname="VectorID"                                                   sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@locale"             paramtype="runtime"     requestparamname="LocaleSetting"                                          sqlDataType="varchar" defvalue="en-US"  validationpattern="" />
    <queryparam paramname="@CustLevelID"      paramtype="runtime"       requestparamname="CustomerLevelID"                                    sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@AffID"              paramtype="runtime"     requestparamname="AffiliateID"                                            sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@ProdTypeID"       paramtype="runtime"       requestparamname="ProductTypeFilterID"                                sqlDataType="int"       defvalue="1"      validationpattern="" />
    <queryparam paramname="@pgnum"              paramtype="request"     requestparamname="pagenum"                                                      sqlDataType="int"         defvalue="1"      validationpattern="" />
    <queryparam paramname="@pgsize"             paramtype="request"     requestparamname="pagesize"                                                     sqlDataType="int"         defvalue="0"      validationpattern="" />
    <queryparam paramname="@InvFilter"        paramtype="appconfig" requestparamname="HideProductsWithLessThanThisInventoryLevel" sqlDataType="int"       defvalue="0"      validationpattern="" />
    <queryparam paramname="@entityname"       paramtype="runtime"       requestparamname="EntityName"                                                   sqlDataType="varchar"   defvalue=""       validationpattern="" />
        <queryparam paramname="@StoreID"            paramtype="runtime"     requestparamname="StoreID"                                                      sqlDataType="int"         defvalue="1"      validationpattern="" />
    <queryparam paramname="@FilterProduct"  paramtype="runtime"   requestparamname="FilterProduct"                                                sqlDataType="bit"     defvalue="0"      validationpattern="" />
<queryparam paramname="@sortentity"  paramtype="request"   requestparamname="sortEntity"  sqlDataType="int" defvalue="0"       validationpattern="" />
<queryparam paramname="@filterletter"  paramtype="request"   requestparamname="filterletter"  sqlDataType="varchar" defvalue=""       validationpattern="" />
</query>

然后页面中的某处显示产品

http://www.example.com/c-123-mypage.aspx?sortEntity=&pagenum=1&pagesize=9999&filterletter=%