Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 11 of 11

Thread: Featured Products

  1. #1
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation Featured Products

    Hi,
    I see featured products show in the content Block at the bottom.
    is there any way that i can put the featured products in the left nav column.


    please help
    Thanks.
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    The featured product is called by Page.default.xml.config in the homepage, the display is handled by FeaturedProducts.xml.config. You can move it to wherever you want that to display, yes.

  3. #3
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation call featured products in left nav

    Can i call featured products in Left nav
    with this line
    HTML Code:
    (!XmlPackage Name="featuredproducts.xml.config"!)
    if i give the above line.
    i get this error
    Exception=Could not find stored procedure 'aspdnsf_GetFeaturedProducts'.
    could any one suggest please.

    thanks
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Sounds like something failed when you initially installed/upgraded 8.0.1.1, you should have a sproc in the DB called aspdnsf_GetFeaturedProducts. If you don't have that, you'll need to find the section of the install/upgrade script that you ran when installing 8011 and run just that portion against the DB again to create that sproc.

  5. #5
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation Hi

    Hi,
    I am not that good with DB.
    could you please explain more in detail please.

    Code:
    sproc in the DB called aspdnsf_GetFeaturedProducts.
    thanks
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4

  6. #6
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Connect to the DB in SQL Server Mgmt Studio and expand the 'Programmability' section under your database, then 'Stored Procedures'. There should be on in the list called 'aspdnsf_GetFeaturedProducts'. If not, open up the SQL query that you ran to create the initial ASPDNSF database and search for that sproc name to find where we create that. Copy just that portion of the script and re-run it against the DB to add that sproc.

    Make sure you have a good backup of the database first just in case.

  7. #7
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation Suggestion please

    I believe that i have to run this query in my database,

    Could you please confirm the Query.

    USE [My_DataBase_Name]
    GO
    /****** Object: StoredProcedure [dbo].[aspdnsf_GetFeaturedProducts] Script Date: 05/04/2010 15:35:00 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO

    ALTER PROCEDURE [dbo].[aspdnsf_GetFeaturedProducts](
    @FeaturedCategoryID INT,
    @NumHomePageFeaturedProducts INT,
    @CustomerLevelID INT
    )
    AS
    BEGIN
    SET NOCOUNT ON

    declare @numSpecialDisplay int

    if @NumHomePageFeaturedProducts = 0
    select @numSpecialDisplay = configvalue from appconfig where name = 'NumHomePageSpecials'
    else
    select @numSpecialDisplay = @NumHomePageFeaturedProducts

    select top (@numSpecialDisplay)
    p.ProductID,
    p.ImageFilenameOverride,
    p.SKU,
    p.SEName,
    p.Name,
    p.Description,
    p.TaxClassID,
    pv.VariantID,
    p.HidePriceUntilCart,
    pv.name VariantName,
    pv.Price,
    pv.Description VariantDescription,
    isnull(pv.SalePrice, 0) SalePrice,
    isnull(SkuSuffix, '') SkuSuffix,
    pv.Dimensions,
    pv.Weight,
    isnull(pv.Points, 0) Points,
    pv.Inventory,
    pv.ImageFilenameOverride VariantImageFilenameOverride,
    pv.isdefault,
    pv.CustomerEntersPrice,
    isnull(pv.colors, '') Colors,
    isnull(pv.sizes, '') Sizes,
    sp.name SalesPromptName,
    case when pcl.productid is null then 0 else isnull(e.Price, 0) end ExtendedPrice
    from ProductCategory pc with (NOLOCK)
    inner join Product p with (NOLOCK) on pc.ProductID = p.ProductID
    inner join ProductVariant pv with (NOLOCK) on pv.ProductID = p.ProductID and pv.IsDefault = 1
    join dbo.SalesPrompt sp with (NOLOCK) on p.SalesPromptID = sp.SalesPromptID
    left join dbo.ExtendedPrice e with (NOLOCK) on pv.VariantID=e.VariantID and e.CustomerLevelID = @CustomerLevelID
    left join dbo.ProductCustomerLevel pcl with (NOLOCK) on p.ProductID = pcl.ProductID and pcl.CustomerLevelID = @CustomerLevelID
    where pc.CategoryID=@FeaturedCategoryID and p.Deleted=0
    order by newid()

    END
    In MS Management Studio
    I connect to my database,
    Then click New Query
    and then paste the above Query and run.


    are these steps correct.

    please confirm.

    thanks.
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4

  8. #8
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    That will update the sproc if it already exists. You're looking for a section like this:
    Code:
    IF  EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[aspdnsf_GetFeaturedProducts]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[aspdnsf_GetFeaturedProducts]
    GO
    
    .....MORE CODE HERE TO CREATE THE UPDATED SPROC

  9. #9
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation Thanks for your time

    I don't have aspdnsf_GetFeaturedProducts listed in the Stored Procedures.


    so, should i run the code that you posted.

    Code:
    IF  EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[aspdnsf_GetFeaturedProducts]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[aspdnsf_GetFeaturedProducts]
    GO
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4

  10. #10
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    That's just the section you need to look for in the 'Create AspDotNetStorefront Database.sql' script that you run to create the database initially, there's more to it than that.

  11. #11
    harsha.gus is offline Senior Member
    Join Date
    Mar 2009
    Posts
    301

    Exclamation How about this

    can i run this to create the Stored Procedure.

    --Procedure: dbo.aspdnsf_GetFeaturedProducts

    CREATE PROCEDURE dbo.aspdnsf_GetFeaturedProducts
    @FeaturedCategoryID int,
    @NumHomePageFeaturedProducts int,
    @CustomerLevelID int
    AS
    BEGIN
    SET NOCOUNT ON

    declare @numSpecialDisplay int

    if @NumHomePageFeaturedProducts = 0
    select @numSpecialDisplay = configvalue from appconfig where name = 'NumHomePageSpecials'
    else
    select @numSpecialDisplay = @NumHomePageFeaturedProducts

    select top (@numSpecialDisplay)
    p.ProductID,
    p.ImageFilenameOverride,
    p.SKU,
    p.SEName,
    p.Name,
    p.Description,
    p.TaxClassID,
    pv.VariantID,
    p.HidePriceUntilCart,
    pv.name VariantName,
    pv.Price,
    pv.Description VariantDescription,
    isnull(pv.SalePrice, 0) SalePrice,
    isnull(SkuSuffix, '') SkuSuffix,
    pv.Dimensions,
    pv.Weight,
    isnull(pv.Points, 0) Points,
    pv.Inventory,
    pv.ImageFilenameOverride VariantImageFilenameOverride,
    pv.isdefault,
    pv.CustomerEntersPrice,
    isnull(pv.colors, '') Colors,
    isnull(pv.sizes, '') Sizes,
    sp.name SalesPromptName,
    case when pcl.productid is null then 0 else isnull(e.Price, 0) end ExtendedPrice
    from ProductCategory pc with (NOLOCK)
    inner join Product p with (NOLOCK) on pc.ProductID = p.ProductID
    inner join ProductVariant pv with (NOLOCK) on pv.ProductID = p.ProductID and pv.IsDefault = 1
    join dbo.SalesPrompt sp with (NOLOCK) on p.SalesPromptID = sp.SalesPromptID
    left join dbo.ExtendedPrice e with (NOLOCK) on pv.VariantID=e.VariantID and e.CustomerLevelID = @CustomerLevelID
    left join dbo.ProductCustomerLevel pcl with (NOLOCK) on p.ProductID = pcl.ProductID and pcl.CustomerLevelID = @CustomerLevelID
    where pc.CategoryID=@FeaturedCategoryID and p.Deleted=0
    order by newid()

    END
    GO
    rbgx
    AspDotNetStorefront ML
    v8.0.1.4