in

dashCommerce

An ASP.NET Open Source e-Commerce Application

How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

Last post 12-05-2008 10:16 AM by MrMark. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 05-22-2008 9:40 PM

    How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    I’m currently using the open source license to implement DashCommerce with my web application. It’s likely that my organization will look to upgrade to a commercial or possibly the professional license in the near future but I need to prove that DashCommerce will fit our needs before I can get authorization for the purchase.

    I am trying to place the DashCommerce Store inside my master page, essentially using DashCommerce’s site.master as a child master page nested in my master page. I’ve modified the source to get this to work properly but I’m getting a “System.Exception: Invalid License.” error. I’m not removing any branding (logos, the footer, etc…) and am willing to show the DashCommerce footer in my master page if necessary.

    Please advise.

    Thank you,
                 Jason

  • 05-23-2008 9:08 AM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Add this to your master page :

         <div id="footer">
          <hr />
          <asp:PlaceHolder ID="phFooter" runat="server" />
         </div>

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-11-2008 10:12 AM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    I did as suggested, placing the code in my parent master file (I also had to line 186 the Content PageBuilder to "foreach(Control ctrl in Master.Master.FindControl("cphContent").FindControl("ContentPlaceHolder1").Controls) {") but I still receive the "Invalid License" error. I tested in a stripped down parent master with the same result.

    Below is my Parent Master ASPX:

    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="ZH.Site1" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <asp:ContentPlaceHolder ID="cphHead" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            up
            <asp:ContentPlaceHolder ID="cphContent" runat="server">
            </asp:ContentPlaceHolder>
            down
            <div id="footer">
                <hr />
                <asp:PlaceHolder ID="phFooter" runat="server" />
            </div>
            way down
        </div>
        </form>
    </body>
    </html>

    Am I missing something or is the Licensing.Web Render code
       "PlaceHolder holder = this.FindControl("phFooter") as PlaceHolder;"
    not written to handle nested master?

  • 06-11-2008 12:03 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    It's definitely not written to handle a nested master page, as I don't understand why you would do this - especially when looking at your master page - I don't see any added value there.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-11-2008 1:01 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    The Master page I included was just an example, removing any complexity. My site is a complete web application that also sells products, the dashcommerce store will be integrated into the site's design/layout and will not be a stand-alone storefront. I've already removed the header bars and integrated the cart count into my parent master page and everything is working fine... except when trying to go to the store as a nested master page the license is unable to find the phFooter (I've tested placing the phFooter control in both my parent master and leaving it in the store's child site.Master. Please advise.

  • 06-11-2008 2:38 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Does Site1 - your masterpage - inherit from anything?

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-11-2008 3:25 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Site1.Master inherits only System.Web.UI.MasterPage (see below).

    Thank you very much for your continued assistance!

    Sincerely,

    Jason

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;

    namespace ZH
    {
        public partial class Site1 : System.Web.UI.MasterPage
        {
            protected void Page_Load(object sender, EventArgs e)
            {

            }
        }
    }

  • 06-11-2008 4:11 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    try inheriting from SiteMasterPage and make sure you have the footer stuff in there. If this doesn't work, then I'll have you send me the file and I'll try to do this - I've never had a reason for nesting master pages, so it may take some tinkering.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-12-2008 3:57 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    No luck, I get the same "Invalid License" error.

    Will buying the Commercial license fix this problem? We're likely to buy it eventually anyhow but I can't recommend the purchase unless I know it'll work under these conditions.

    What you you think?

    Thank you,
             Jason

  • 06-12-2008 4:15 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Well, the bigger question of nesting master pages is where I am stuck. I don't know why you wouldn't just modify the existing site.master. Is nesting master pages a recommended practice?

    How are you accomplishing the nesting? You may need to send me your Site1.master so I can try to figure out what you are doing.

     

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-19-2008 12:37 PM In reply to

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Nesting master pages is common practice, for direction on how to accomplish nesting see http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx or http://www.asp.net/learn/3.5-videos/video-256.aspx.

    One of the cooler scenarios that ASP.NET 2.0 supports is the ability to have "nested master pages" - where you can create a root master page for a site that defines a site's overall layout, and then create nested master pages that are based on the root master and further customize the layout (for example: you could create a SingleColumn.Master and TwoColumn.Master that defined 1 or 2 column layout structures based on the root master template).  This nested master page feature is extremely flexible, and enables developers and designers to quickly and very cleanly make changes to the layout and organization of a site with minimal code changes and no content duplication. - http://weblogs.asp.net/scottgu/archive/2007/07/09/vs-2008-nested-master-page-support.aspx.

    The parent master page contains the header/menu/footer for my site with a content area in the middle of the page. I've purchased the DashCommerce Commercial License, I've stripped the header/footer from DashCommerce's site.master and nested it in my parent master page placing the store inside the look/layout of my site maintaining my site's navigation.

    I'm happy to send you the stripped down example parent master page (site1.master) and the modified nested dashcommerce master page (site.master) and PageBuilder.cs if you provide an email address or email me at the email address attached to my DashCommerce.org account.

    Thank you,
               Jason

    Filed under:
  • 12-05-2008 10:16 AM In reply to

    • MrMark
    • Top 500 Contributor
    • Joined on 12-05-2008
    • Posts 3

    Re: How do I use DashCommerce in a nested master page without upgrading to a Commercial license?

    Was there a solution to this problem. I too would like to use my websites master page as the main master and nest the Dash Commerce master page within that.

    The reson I do not want to edit the current Dash Commerce master page is that I would then have to keep the two master pages synconized each time I make a change to the template.

     

     

Page 1 of 1 (12 items)