Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: GiftRegistry Question

  1. #1
    Emissary is offline Member
    Join Date
    Sep 2008
    Location
    Florida
    Posts
    60

    Default GiftRegistry Question

    Is anyone able to provide a brief explanation of the the workflow in the GiftRegistry.aspx.cs file. More specifically, I am trying to understand the purpose of the following condition statements:

    Code:
    if (GiftRegistryGUID.Length == 0)
    I can't understand when the GiftRegistryGUID would ever have a length of 0. I have check our customer database and every record has a GiftRegistryGUID.

    Code:
    if (!ThisCustomer.HasCustomerRecord)
    According to the code under this condition the "Your Gift Registry is Empty" would be displayed. So I dont understand how HasCustomerRecord determines if the Gift Registry is empty.


  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Those are checks for if someone browses directly to the giftregistry.aspx page rather than through a link that includes the GUID querystring or by adding something to their registry. We don't want to display invalid/empty information, or worse throw an error because the page is looking for something that doesn't exist. Just standard safe handling.

  3. #3
    Emissary is offline Member
    Join Date
    Sep 2008
    Location
    Florida
    Posts
    60

    Default

    OK and Thanks. But can you help me understand why the GiftRegistryGUID always is reported as NULL whether I am signed in or not.

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    GiftRegistryGUID is set here:

    Code:
    GiftRegistryGUID = CommonLogic.QueryStringCanBeDangerousContent("GUID");
    If there's no querystring on the page request, then no GiftRegistryGUID. That's used for the URL that customers send to their friends to click to view their registry.