Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDeleteCart Bug and SuggestionsDeleteCart Bug and Suggestions
Previous
 
Next
New Post
8/1/2006 2:46 AM
 
Hi,
 
1. I found a bug in Deleting a Cart and then Creating a new Cart process. You have to remove the Cart Cookie from the Request when setting a null CartID like the following:

private
static void setCartID(int portalID, string cartID)
{

   if (cartID != null)
   
{

         HttpCookie cartCookie = new HttpCookie(CartCookieName + portalID.ToString());
         cartCookie["CartID"] = cartID;
         
cartCookie.Expires = DateTime.Today.AddDays(30);
         
HttpContext.Current.Response.Cookies.Add(cartCookie);
   }
   
else
   {
         HttpCookie cartCookie = new HttpCookie(CartCookieName + portalID.ToString());
         cartCookie.Expires = DateTime.Today.AddDays(-100);
         
HttpContext.Current.Response.Cookies.Add(cartCookie);
            HttpContext.Current.Request.Cookies.Remove(CartCookieName + portalID.ToString());
   }
}

2. I added multilanguage support to the Categories by making a patch to the Arhive field in the Catrgories Table to be char(5).
I also patched the CategoryMenu.ascx & CategoryEdit.ascx and changed the "Achive" checkbox to a "Display" dropdown that contains:

- Always ("")
- English ("en-US")
- ... Additional Languages
- Archive ("False")

In the CategoryMenu I added a filter that filters the view according to the current language.

This way I can handle multi language categories and seperate products per language.

Would you consider this as a suggestion to be added to the module ?

Thanks for a greate work,

Moshe

 
New Post
8/25/2006 12:11 AM
 
moshefi wrote
Hi,
 
1. I found a bug in Deleting a Cart and then Creating a new Cart process. You have to remove the Cart Cookie from the Request when setting a null CartID like the following:

private
static void setCartID(int portalID, string cartID)
{
[... snip]

   else
   {
         HttpCookie cartCookie = new HttpCookie(CartCookieName + portalID.ToString());
         cartCookie.Expires = DateTime.Today.AddDays(-100);
         
HttpContext.Current.Response.Cookies.Add(cartCookie);
            HttpContext.Current.Request.Cookies.Remove(CartCookieName + portalID.ToString());
   }
}



This is definately a bug, I've also made this change.  Btw to remove a cookie you must use:

HttpContext.Current.Response.Cookies[cookieName].Expires = DateTime.Today.AddYears(-30);

i.e. You have to set the expiry date to sometime in the past. Using Cookies.Remove() just removes it from your Request collection ... and the next time the user makes a Request it will be back again because it is still on the users PC .. check out this great link about cookies:

http://www.codeproject.com/aspnet/aspnetcookies.asp

JK


You know your website is cool, so why not let your users help you by spreading the word on social networking sites - get the DotNetNuke Social Bookmarks Module with 57 different ways to add social bookmarks to your site ... or download the FREE demo right now
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDeleteCart Bug and SuggestionsDeleteCart Bug and Suggestions


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out