Some things are easier than you think they're going to be, and that just makes my whole day! So every single client we've had has requested the top categories go horizontally across the top in the menu instead of vertical submenus under Category, and to accomodate this, we've hard-coded the menus in menuData.xml in the skins directory.
What we lose here is the dynamic control of the menus for our clients, meaning they have to touch an xml file in addition to setting up the categories, and i don't know many product managers who speak xml.
So what I found was a curious line of code in the templatebase.cs file in app_code. Look at the Page_Load function and the section commented "// Find Categories menu top" and the line which starts with a call to AddEntityMenuXsl. See the final parameter being passed into that method is string.Empty. Well, when i look at AddEntityMenuXsl, I see that we have a piece of code that allows us to add a ROOT level element if the parameter length is greater than 0. So I just made my method call look like this:
AddEntityMenuXsl(doc, "Category", AppLogic.CategoryEntityHelper.m_TblMgr, mNode, 0, "1");
and VOILA! I now have a dynamic menu with the categories across the top! With just a little itty bitty code change. Some days programming is berry berry good to me :)
Showing posts with label Aspdotnetstorefront. Show all posts
Showing posts with label Aspdotnetstorefront. Show all posts
Tuesday, June 26, 2007
Friday, June 8, 2007
ADA Compliance
Americans with Disabilities Act (ADA) Compliance is now a scary term for high-volume eRetailers. It hasn't been decided in court, but Target has been sued in a class-action lawsuit for not making accomodations for disabled visitors.
The language of the Act is pretty vague and general, and those with bigger budgets are expected to make correspondingly more accomodations, and to muddle the muddy waters further, there's just no list to go by to say what is compliant and what is not.
There ARE however a couple of things that are just good practice anyway, the first of which using alt text for ALL images (except maybe corners on tabs and things like that). Sight-impaired visitors have devices that read the alt-text out loud so they can know what's on the screen in front of them. It's also a best practice for Search Engine Optimization, so just do it!
Another requirement from a recent client was to make the site keyboard navigable. This was a doozy. We had a pre-packaged component that came with aspdotnetstorefront, but it was a no-go for keyboard navigation. Our senior developer on the project, Tomas Vera found this nifty menu at http://www.milonic.com that you can tab into and use your arrow keys to navigate. This is a great find, IMO. Another tip for you, set your tabindex to 1 on your website logo so that if a user wants to tab through the page, they will always start at the top left. The only exception to this would be a search page where the user expects the focus to be in the search box so they can just begin typing.
Just one more disjointed rant from the trenches!
The language of the Act is pretty vague and general, and those with bigger budgets are expected to make correspondingly more accomodations, and to muddle the muddy waters further, there's just no list to go by to say what is compliant and what is not.
There ARE however a couple of things that are just good practice anyway, the first of which using alt text for ALL images (except maybe corners on tabs and things like that). Sight-impaired visitors have devices that read the alt-text out loud so they can know what's on the screen in front of them. It's also a best practice for Search Engine Optimization, so just do it!
Another requirement from a recent client was to make the site keyboard navigable. This was a doozy. We had a pre-packaged component that came with aspdotnetstorefront, but it was a no-go for keyboard navigation. Our senior developer on the project, Tomas Vera found this nifty menu at http://www.milonic.com that you can tab into and use your arrow keys to navigate. This is a great find, IMO. Another tip for you, set your tabindex to 1 on your website logo so that if a user wants to tab through the page, they will always start at the top left. The only exception to this would be a search page where the user expects the focus to be in the search box so they can just begin typing.
Just one more disjointed rant from the trenches!
Thursday, May 17, 2007
Aspdotnetstorefront Menu
ASPDNSF uses a 3rd-party component for their navigation menus, Component Art. I've had some fun and exciting times customizing this menu. I would put styles, such as color and font, in the css classes TopMenuGroup and TopMenuItem, and the styles weren't sticking. Sooo frustrating! So using my IE DOM explorer, I highlighted the element (Find -> Select Element by Click) and examined the style, and found my target element to be wrapped in , which was elminating my css class assigned in the .
Here it is interesting to note that this menu is built on the fly, and you as a developer do not get to play with how this menu is created at runtime. I did some research on the NOBR tag and learned it was not css-friendly, but I took a leap of faith and added this to my stylesheet:
.TopMenuItem, .TopMenuItem NOBR, .TopMenuItemHover NOBR
{
background: #443A23;
color: #fff;
}
And voila! My css-styles were now applied.
I'm still struggling with the fact that the marriage between ASPDNSF and Component Arts is not flexible. If you decide to take your top categories horizontally across the top of the screen, you end up having to hard code your menu values in the menuData.xml file and you lose your tie to the category admin component. What this means is that if you change the name of the category, or add a new category, or make a category unpublished, these changes will not be reflected on the front end until you manually modify the xml data file. What a pain. If anyone has gotten around this little feature, I would give you a homemade chocolate chip cookie.
Aithne 7mos
Here it is interesting to note that this menu is built on the fly, and you as a developer do not get to play with how this menu is created at runtime. I did some research on the NOBR tag and learned it was not css-friendly, but I took a leap of faith and added this to my stylesheet:
.TopMenuItem, .TopMenuItem NOBR, .TopMenuItemHover NOBR
{
background: #443A23;
color: #fff;
}
And voila! My css-styles were now applied.
I'm still struggling with the fact that the marriage between ASPDNSF and Component Arts is not flexible. If you decide to take your top categories horizontally across the top of the screen, you end up having to hard code your menu values in the menuData.xml file and you lose your tie to the category admin component. What this means is that if you change the name of the category, or add a new category, or make a category unpublished, these changes will not be reflected on the front end until you manually modify the xml data file. What a pain. If anyone has gotten around this little feature, I would give you a homemade chocolate chip cookie.
Wednesday, April 18, 2007
Aspdotnetstorefront Out-of-the-box Build Error
My company has begun offering an ecommerce solution to small-to-medium businesses called Aspdotnetstorefront. On behalf of our client, I purchased and download the product and installed it in my wwwroot directory. I made no changes to any files, I simply clicked on the sln file and loaded the solution into Visual Studio 2005 Team Edition.
Before I did anything else, I tried to build the solution. I was unsuccessful, and of course, seriously perturbed...I may have said unfriendly things...so I sent an email off to tech support with a copy of the error.
I received a quick response (you gotta love responsive tech support) and they noted that I seemed to be referencing a file that should not be in that build. How could that happen? I looked in the directory, no file. Mysterious, eh? So I loaded the solution and looked in the directory, there was a file. Odd. So I looked at the path of the file, and it was a path to a storefront directory for a different storefront solution. Problem solved? almost.
I deleted all my files, extracted the download to my newly clean directory, and before I did anything with Visual Studio, I opened the sln file in text editor and modified all the paths in the solution to point to my correct directory. You will have this problem if you try to run more than one storefront solution side-by-side. I saved the sln file. Opened my project, all problems solved. To be safe, I renamed my sln and suo files to match my directory name.
I'm fairly new to this storefront thing, so if you have any tips to share, i'm all ears.
Before I did anything else, I tried to build the solution. I was unsuccessful, and of course, seriously perturbed...I may have said unfriendly things...so I sent an email off to tech support with a copy of the error.
I received a quick response (you gotta love responsive tech support) and they noted that I seemed to be referencing a file that should not be in that build.
I deleted all my files, extracted the download to my newly clean directory, and before I did anything with Visual Studio, I opened the sln file in text editor and modified all the paths in the solution to point to my correct directory. You will have this problem if you try to run more than one storefront solution side-by-side. I saved the sln file. Opened my project, all problems solved. To be safe, I renamed my sln and suo files to match my directory name.
I'm fairly new to this storefront thing, so if you have any tips to share, i'm all ears.
Subscribe to:
Posts (Atom)
Who I really work for
Aithne 7mos
Funnier Than I
.Net Heroes
- Muliadi's Blog - CSS Masterblaster & more
- Pimp Daddy's site - it's not all about the dotNet, can u say PowerShell?
- Patrick's Blog - .Net Commerce & Cold Fusion
- Nuri's Blog - If you don't know, Nuri knows :)
- Max's Blog - Microsoft Product Manager for Commerce Server 2007
- Pablo's Blog - First to try the latest technology
Article Categories
- .net (1)
- .Net Errors (1)
- .net repeater control (1)
- ADA compliance (1)
- ADP (1)
- Aspdotnetstorefront (4)
- component art (1)
- CSS (2)
- eCommerce (2)
- email (1)
- forms (1)
- Gridview (1)
- menu (1)
- SQL (2)
- system.net.mail (1)
- Taxware (1)
- validation (1)
- Visual Studio (1)
About Me
- Robin
- I am a senior .net web application developer in Phoenix, Arizona specializing in eCommerce and intranet applications. My LinkedIn Profile
quote for life
If you want to know your past, look at your current situation, if you want to know your future, look at your current actions.
- Chinese Proverb