Hi,
Is there a 'built in' xml package and/or 'link' that will display all of the main categories? (Just like how the 'Products' are displayed when you go to a category landing page).
Thanks,
Colin
Hi,
Is there a 'built in' xml package and/or 'link' that will display all of the main categories? (Just like how the 'Products' are displayed when you go to a category landing page).
Thanks,
Colin
No there isn't, but it's a very simple modification to create one
First, copy the manufacturers.aspx and manufacturers.aspx.cs files, and paste them back into the same directory with names of categories.aspx and categories.aspx.cs
Next open the new categories.aspx file and change line 1 fromtoCode:<%@ Page language="c#" Inherits="AspDotNetStorefront.manufacturers" CodeFile="manufacturers.aspx.cs" EnableEventValidation="false"%>Code:<%@ Page language="c#" Inherits="AspDotNetStorefront.categories" CodeFile="categories.aspx.cs" EnableEventValidation="false"%>
Then, change line 6 fromtoCode:<aspdnsf:XmlPackage id="Package1" PackageName="entity.manufacturers.xml.config" runat="server" EnforceDisclaimer="true" EnforcePassword="true" EnforceSubscription="true" AllowSEPropogation="true" RuntimeParams="entity=Manufacturer"/>Code:<aspdnsf:XmlPackage id="Package1" PackageName="entity.manufacturers.xml.config" runat="server" EnforceDisclaimer="true" EnforcePassword="true" EnforceSubscription="true" AllowSEPropogation="true" RuntimeParams="entity=Category"/>
Then open your new categories.aspx.cs page and change line 14 fromtoCode:public partial class manufacturers : SkinBaseCode:public partial class categories : SkinBase
This last step is optional, but you can open the skins/skin_#/menudata.xml file and changetoCode:<item Text="(!menu.Categories!)" LookId="TopItemLook" />If you followed the last optional step, your top navigation menu will now allow you to click on the "Categories" menu item and it will redirect you to the new categories.aspx page that you just created...just like the "Manufacturers" menu item does. Alternatively you can place a link anywhere in your skin to the categories.aspx page to navigate to it as well.Code:<item Text="(!menu.Categories!)" NavigateUrl="categories.aspx" LookId="TopItemLook" />
A very simple mod that doesn't even require you to customize or create a new xmlpackage...this mod uses the same package that manufacturers.aspx uses
Last edited by George the Great; 02-12-2008 at 08:08 PM. Reason: late night typos :)
<a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>
Actually there is a package that already does this, it's the entity.rootlevel.xml.config package. You might have to make a few tweaks to it to work for you but it's pretty much what you're asking for. You can run it standalone by executing it with the URL e-entity.rootlevel.aspx (or with a custom name that you choose after making the below modifications). You'd need to modify it a little to get it to work though. Add the allowengine attribute to the package element:
Then you'll need to change this:Code:<package version="2.1" displayname="Entity Root Level Grid" debug="false" includeentityhelper="true" allowengine="true">
to thisCode:<xsl:param name="EntityName"><xsl:value-of select="/root/Runtime/EntityName" /></xsl:param>
Code:<xsl:param name="EntityName"><xsl:value-of select="/root/Querystring/entityname" /></xsl:param>
Then call the url passing a querystring named entityname set to the entity that you are interested in (i.e. Category, Department, Manufacturer, etc.)
Perfect. I can display all categories now. That was simple and harmless
Thanks a lot guys,
Colin
Is there a way to add a "summary" section to the categories.aspx so that I can get in a header area similar to a regular category page?
You can use the Summary field in the entity you're interested in and display it at the top of your package.
Is there a way to take this a step further & use this for a sub-category?
I have it showing my 3 main categories:
- All Watches
- Collections
- Strap Colour
What I would like to show is all the categories within Collections.
Any ideas?
Thanks
Jamie