The way we fixed this required core change, compiling and re-creating the dll file named : DotNetNuke.Modules.Store.WebControls.dll; so if you made any other core code changes, please make sure correct versions of the source files are included when you compile this change, else you will loose your original fixes/changes; if you did not change any core code files (.cs) then just compile this change and all is fine.
File Change 1:-
File Folder: \DesktopModules\Store
File Name: Catalog.ascx.cs
Line: 181
Change Details:
Comment the following 2 lines by prefixing them with "//":
LiteralControl message = new LiteralControl(Server.HtmlDecode(categoryInfo.Message));
parent.Controls.Add(message);
Now, insert the following code snippet at line 181 (this will take care of archived category issue):
//Umaisa.us Custom Code - Start
//Original Code:
//LiteralControl message = new LiteralControl(Server.HtmlDecode(categoryInfo.Message));
//parent.Controls.Add(message);
//Original Code had no if, else statements.
//Authorized By: Erwin, Chun
//Dated: 3/31/2008 @4.17pm EST
//UCode: #341-88-9199
//Ref: DotNetNuke Forum (http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/114/threadid/216176/scope/posts/Default.aspx)
if (categoryInfo.Archived)
{
string _ArchCategoryMsg = Localization.GetString("ArchivedCategoryMsg.Text", this.LocalResourceFile);
_ArchCategoryMsg = string.Format(_ArchCategoryMsg, ("http://" + PortalAlias.HTTPAlias));
LiteralControl message = new LiteralControl(Server.HtmlDecode(_ArchCategoryMsg.ToString()));
parent.Controls.Add(message);
}
else
{
LiteralControl message = new LiteralControl(Server.HtmlDecode(categoryInfo.Message));
parent.Controls.Add(message);
}
//Umaisa.us Custom Code - End
File Change 2:-
File Folder: \DesktopModules\Store
File Name: ProductDetail.ascx.cs
Line: 179
Change Details:
Comment the following line by prefixing them with "//":
plhDetails.Controls.Add(TemplateController.ParseTemplate(templatesPath, template, new ProcessTokenDelegate(processToken)));
Now, insert the following code snippet at line 179 (this will take care of archived product issue):
//Umaisa.us Custom Code - Start
//Original Code:
//plhDetails.Controls.Add(TemplateController.ParseTemplate(templatesPath, template, new ProcessTokenDelegate(processToken)));
//Original Code had no if, else statements.
//Authorized By: Erwin, Chun
//Dated: 4/1/2008 @9.20am EST
//UCode: #341-88-9207
//Ref: DotNetNuke Forum (http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/114/threadid/216176/scope/posts/Default.aspx)
if (productInfo.Archived)
{
string _ArchCategoryMsg = Localization.GetString("ArchivedProductMsg.Text", this.LocalResourceFile);
_ArchCategoryMsg = string.Format(_ArchCategoryMsg, ("http://" + PortalAlias.HTTPAlias));
LiteralControl message = new LiteralControl(Server.HtmlDecode(_ArchCategoryMsg.ToString()));
plhDetails.Controls.Add(message);
}
else
{
plhDetails.Controls.Add(TemplateController.ParseTemplate(templatesPath, template, new ProcessTokenDelegate(processToken)));
}
//Umaisa.us Custom Code - End
File Change 3:-
File Folder: \DesktopModules\Store\App_LocalResources
File Name: Catalog.ascx.resx
Change Details:
Add a new string literal as follows:
Name: ArchivedCategoryMsg.Text
Value:
<p align="center"><i>
<b><font face="Tahoma" size="2" color="#FF0000">Sorry this Category is currently
not available.</font><font face="Tahoma" size="2"><br>
You will now be redirected to home page - Thank you.</font></b></i><META HTTP-EQUIV="Refresh" CONTENT="7;URL={0}">
</p>
File Change 4:-
File Folder: \DesktopModules\Store\App_LocalResources
File Name: ProductDetail.ascx.resx
Change Details:
Add a new string literal as follows:
Name: ArchivedProductMsg.Text
Value:
<p align="center"><i>
<b><font face="Tahoma" size="2" color="#FF0000">Sorry this Product is currently
not available.</font><font face="Tahoma" size="2"><br>
You will now be redirected to home page - Thank you.</font></b></i><META HTTP-EQUIV="Refresh" CONTENT="7;URL={0}">
</p>
We recommend performing all changes using Visual Studio 2005.
Once above changes are made, save all the files, clean the solution and now build the solution. It will create a new file named "DotNetNuke.Modules.Store.WebControls.dll", place this dll, and the .resx (resource files) in your test environment "bin" folder. Delete the site cache, restart the website, restart the application using host-> settings control panel
To test the fix:
1) Login as store admin, pull up any category, copy the url you see in browser, and place it in a notepad,
2) Next pull up any product detail and copy the url you see in browser, and place it in a notepad,
3) Now, go to store admin console, archive the category you pulled up in step 1,
4) Next, archive the product you pulled up in step 2,
5) In the same browser instance now type the category url you made a note of in step 1- you should see the fix kicking in,
6) Finally, in the same browser instace type the product detail url you made a note Step 2 - you should see the fix kicking in.
Online working production fix for above change can be viewed at the following urls: (these urls were included in my original post)
1) Archive Category Fix: http://www.umaisa.com/Home/tabid/36/CategoryID/1/Default.aspx
2) Archive Product Fix: http://www.umaisa.com/Home/tabid/36/ProductID/1/Default.aspx
Hope this helps,
Sincerely,
Support Dept. Umaisa.com