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

Thread: Different Skin For Product Page?

  1. #1
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default Different Skin For Product Page?

    Hi,

    I'm wondering if it is possible to use a different skin for a product page than the one that is being used for its parent category?

    I basically want to remove my left-hand navigation from the product detail page and I'm thinking the best way is to use a different skin. I know that you can use template switching at the category level (which I am doing) but how can I have a different skin for product pages than category pages (if possible)?

    FYI, I'm using an HTML navigation menu, not the tree.

    Thanks!

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

    Default

    Create a new template to use for the product detail page (for purposes of this post lets call it productdetail.ascx). Create a new appconfig parameter called Templateshowproduct.aspx and give it a value of productdetail.ascx. Now, any time the showproduct.aspx page is viewed (any time a product is viewed it goes through this page), it will use the productdetail.ascx (or whatever name you've called your new template) to skin the page.

    This is also described in the manual.

    Note that with this method ALL products would use the same skin regardless of the parent category, but it will allow you to remove your left menu on that level.

  3. #3
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    Awesome! Thanks so much! For some reason I didn't see it in the manual. Oops.

  4. #4
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by AspDotNetStorefront Staff - Scott View Post
    Create a new template to use for the product detail page (for purposes of this post lets call it productdetail.ascx). Create a new appconfig parameter called Templateshowproduct.aspx and give it a value of productdetail.ascx. Now, any time the showproduct.aspx page is viewed (any time a product is viewed it goes through this page), it will use the productdetail.ascx (or whatever name you've called your new template) to skin the page.

    This is also described in the manual.

    Note that with this method ALL products would use the same skin regardless of the parent category, but it will allow you to remove your left menu on that level.
    Great little post! Totally asnwered what I wanted! However, when I searched for template.ascx, there already is something in the appconfig for a homepage template, called, "HomeTemplate." So, I used that to change my home page look and feel and kept the template.ascx for the inside pages if you will.

    Thank you!

  5. #5
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Hi,

    I Must be missing something or I have been very stupid!!

    I have followed the instruction but it doesen't work.

    I have setup Templateshowproduct.aspx in the

    appconfig and assign templatepage.ascx


    Still when I click in the product the skin doesen't change. I use template switching for the categories already and they are working fine I do no understand what I am doing wrong.

    Can some one help please

    Regards
    Last edited by snowy; 08-07-2009 at 07:05 AM.

  6. #6
    MelanieA is offline Junior Member
    Join Date
    Sep 2008
    Posts
    313

    Default

    Make sure you have reset your IIS after making any changes. Your site needs to be restarted in order to have the changes applied immediately.

  7. #7
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    Hi Melanie,

    I have just tried this , still doesen't change the template

    Not sure what to do now

    Thank you
    Last edited by snowy; 08-07-2009 at 08:48 AM.

  8. #8
    MelanieA is offline Junior Member
    Join Date
    Sep 2008
    Posts
    313

    Default

    Please note that with this method ALL products would use the same skin regardless of the parent category, but it will allow you to remove your left menu on that level. And make sure your template is properly set on your product page manager.

  9. #9
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Hi,

    Thank you for the help I do try to understand how this works.

    At categorie level in the tab Extension data I have created a new template for that categorie and this works perfectly well.

    I want to do the same at product level but the Extension data tab hasn't got the same field then the one in the categories.

    Therefore I follow the instructions in the Manual and the forum but is not working for me.

    Yes I want all the pages at product level to look the same without the left and side menu.

    Am I going in the right direction ? not sure what to do now really

    Regards
    Last edited by snowy; 08-08-2009 at 07:27 AM.

  10. #10
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    I have followed the manual and I have succesfully created a new template as expalined in the manual.

    I have applied the same concept and the same file to the productpage but it doesen't work.


    templatesitemap2.aspx --> templatePage.ascx ( working )

    templateshowproduct.aspx --> templatePage.ascx (not working)

    Are there other setting I have to change?

    Thanks

  11. #11
    Dusty is offline Member
    Join Date
    Jun 2009
    Posts
    176

    Default

    There's shouldn't be much else you should need to change for your templates to work, in what way is the ShowProduct page not working?

    Dusty
    ASPDotNetStorefront Staff

  12. #12
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Hi,

    I have setup four diffeent template per each categories in the shop.
    but I want to have a Common template without left menu for the Products page.


    templateshowproduct.aspx --> templatePage.ascx

    Once I select a product from the categorie page the product page doesen't change into templatePage.ascx but stays with the original categorie page I have created.

    Thank you

  13. #13
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    Hi I have just tested the TemplateSwitching in the out of the box software and if I set a new template for the categories I cannot set another customized template for the Product linked to that categories.

    Is this correct? is this what is supposed to do?

    Thank you

  14. #14
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    Please does anyone have a view on this we really want to have this functionality working for the product page.

    Does anyone have the same problem we have

    Thanks

  15. #15
    mbertulli is offline Senior Member
    Join Date
    Aug 2008
    Posts
    243

    Default

    Quote Originally Posted by snowy View Post
    Hi I have just tested the TemplateSwitching in the out of the box software and if I set a new template for the categories I cannot set another customized template for the Product linked to that categories.

    Is this correct? is this what is supposed to do?

    Thank you
    "Cannot set another customized template for the product linked to that categories".

    It sounds like you are trying to have a different product template depending on the category the product is in. This is not how templating works in aspdnsf.

    You can only set 1 template for all products (showproduct) and 1 template for all categories.
    Matthew Bertulli
    Demac Media
    mbertulli@demacmedia.com
    Custom Web Design & E-Commerce Development
    AspDotNetStoreFront Platinum DevNet Partner
    ----

    Custom Skinning & Design
    Web Services Integration
    Custom Reporting
    Salesforce.com eCommerce AspDotNetStoreFront Integration

  16. #16
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Thank you for coming back to me

    I actually set a different template for each department e.g. men, women, children, and this works fine.

    Then for the same reason I set the same template to men, women and children (we don't want the user to see the default template). This also works well.

    The next stage is to assign a single template for all products - either men, women or children as shown in the manual. templateshowproduct.aspx --> templatePage.ascx

    The reason for this is we don't want the left-hand side menu to show up, or any other links related to the product or department. This is where it's not working.

    Any further ideas?

    Thank you

  17. #17
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    HI it's me again !!

    I have noticed if I reset the browser cache after selecting the product and then refresh the browser will display the template I have choosen to use
    templateshowproduct.aspx --> templatePage.ascx

    Any ideas how I can use this template?

    Thank you


  18. #18
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Hi I was reading this thread and I wonder if it would solve my problem but first I would like an opinion.
    I have managed to assign a template to all pages I wanted to apart for t-contact.aspx and showproduct.aspx. and I cannot work out why!

    http://forums.aspdotnetstorefront.co...ad.php?t=18684

    Thank you
    Last edited by snowy; 08-22-2009 at 07:19 AM.

  19. #19
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    I start to begin thinking I'm the only person in this forum with that problem.
    And there is not solution I would like to submit a ticket but is not supported.
    What shall I do??

    Thanks

  20. #20
    rochellefp is offline Junior Member
    Join Date
    Apr 2009
    Posts
    20

    Post opposite problem

    snowy, i'm having the opposite problem.

    i want the product detail page to use the template of the category it belongs to. right now, i have four categories that use different templates. this works well but once you click on a product and go to the detail page, the page uses the standard template i have set up for the non-product related pages...and not the template of the category it belongs to.

    if anyone know how to fix this one, please let me know.
    Thanks,

    Rochelle Pennington

  21. #21
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Smile

    Hi Rochelle,

    I just can tell you how I have setup mine,

    Departments and Categories share the same template trough the admin setting I haven't done anything different.

    Cheers

  22. #22
    ami is offline Junior Member
    Join Date
    Feb 2009
    Posts
    17

    Default Snowy How did you do it?

    Snowy, I have the same question as Rochele. How did you do it?

  23. #23
    aronatic is offline Junior Member
    Join Date
    Feb 2010
    Posts
    3

    Default how to reset iis ? reset cache ?

    Quote Originally Posted by MelanieA View Post
    Make sure you have reset your IIS after making any changes. Your site needs to be restarted in order to have the changes applied immediately.
    how to reset iis ? reset cache ?

  24. #24
    Mike The Last Boyscout is offline User
    Join Date
    Nov 2008
    Posts
    254

    Default

    From either Start->Run or the Command Prompt, you can type IISRESET and it will restart the instance of IIS for you.

  25. #25
    BrettB is offline Junior Member
    Join Date
    May 2010
    Posts
    3

    Default Friendly URL template switching ShowProduct.aspx

    I believe Snowy's problem may have been related to friendly urls. I am having a similar problem on 9.0.1.3 and stepping through the GetTemplateName method in SkinBase.cs I see that it's pulling the SEO friendly name and not showproduct.aspx.

    Has anyone found a solution to making this work?

    I'm trying to not modify ASPDNSF core code so we may more easily upgrade in the future.

  26. #26
    snowy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    148

    Default

    I am now upgrading to 9.0.1.3 and the product page doesen't update with template switching . on version 8.0.1.2 some one give me the solution and it worked fine I don't remember who!

    By commenting off the code below from the product page

    override protected void OnPreInit(EventArgs e)
    {
    ...............

    }



    And adding

    override protected void OnPreInit(EventArgs e)
    {

    SetTemplate("templateany.ascx");
    base.OnPreInit(e);

    }



    all this worked absolutly fine

    Can someone help on this please

  27. #27
    GoodFella is offline Member
    Join Date
    Mar 2009
    Posts
    99

    Default

    I am having the same ... seemingly very straight forward problem of Loosing control of the product template when changing the category template. Any resolution on this?