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 7 of 7

Thread: Modifying "Related Products function"

  1. #1
    SMedia is offline Junior Member
    Join Date
    Dec 2008
    Posts
    8

    Default Modifying "Related Products function"

    Hi,

    In the Related Products function, how do I show only products with the field "ShowBuyButton = 1"?

    I'm currently using AspDotNetStorefront ML 8.0.1.2/8.0.1.2

    Thanks.

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

    Default

    You'd need to modify the aspdnsf_GetCustomersRelatedProducts sproc a bit and add the ShowBuyButton =1 in the whereclause condition.

  3. #3
    SMedia is offline Junior Member
    Join Date
    Dec 2008
    Posts
    8

    Default

    Thanks alfred, please let me know how to modify the aspdnsf_GetCustomersRelatedProducts sproc? Which file do I look at?

    Thanks.

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

    Default

    That's no file. If you have access to your DB, open sql server management studio, select your DB -> programability -> stored procedure.

  5. #5
    SMedia is offline Junior Member
    Join Date
    Dec 2008
    Posts
    8

    Default

    Excellent! I've located it.

    MS SQL Server Management Studio -> DB -> programability -> stored procedures ->
    aspdnsf_GetCustomersRelatedProducts


    I've got 2 questions,

    1) How do I back it up (in case I mess up during modifying it)
    2) How do I modify and save the changes to aspdnsf_GetCustomersRelatedProducts?

    Thanks!

  6. #6
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    Firstly, you ought to be running more than just your production server. At the very least you should have a development server as well as the production server. And if you were doing it properly you would have a development server, a user test server and then the production server. You would then change the sp on the development server, thoroughly test, move it to the user test server and have someone else test it and agree your results, and then move it to the production server. With this scenario you would have a backup on the user test and production server, so if it all went wrong you could get a copy from them.

    Finally, if you wanted to do it without these extra servers, then in management studio you could right-click and choose "Modify" on the sp (aspdnsf_GetCustomersRelatedProducts), and choose right-click and "Modify" again so that you had 2 copies open at once. Make your changes in one and keep the other as a backup, or export the second to a text file, or copy and paste it to another text editor, or right-click and choose "Script stored procedure as...". So many ways!

    Then once you're happy that it's working on your dev box, move it up to your user test, and once it's working there move it up to your production box.
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

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

    Default

    #1 backup your db, renamed it, or just re-create the same stored proc using a different name. Right click "aspdnsf_GetCustomersRelatedProducts" -> Script Stored procedure as -> Create to -> New window, and rename it, then run. That should create another stored proc.

    #2 after you made the change, run/execute it.