• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

ppettit
#1 Posted : Wednesday, June 2, 2010 9:33:31 AM(UTC)
ppettit

Rank: Member

Joined: 4/2/2009(UTC)
Posts: 37

Hi all,

With us just having migrated to 5.7 I was reminded of a problem and the fix that we did that I wanted to share.

The problem we were having is that, in a nutshell, we don't do gift wrapping. Ever. The store however refuses to out right eliminate the gift wrap button. The problem is that the global GiftWrapAllowed variable is part of a if-and-than-else statement and not higher up in a nested hierarchy format. Thus you can turn off gift wraping but the button would always show up.

I'm sure that many others have solved this but I wanted to pass on the fix for others more wary at digging into code blindly. The fix is located in the Cart.aspx.vb code and is rather simple starting at line 259:

Code:

If (WebAppSettings.GiftWrapAll = False) And (gwp.GiftWrapAllowed = False) Then


That is the original line which you will need to change to:

Code:

If (WebAppSettings.GiftWrapAll = True) Then
                          If (gwp.GiftWrapAllowed = False) Then


Then further down starting at line 298 you will need to change this:

Code:

End If
End If
End If
' End 5.4 Gift Wrap Code


To this:

Code:

End If
End If
        Else
    btnGiftWrap.Visible = False
    lblGiftWrap.Visible = False
    lblGiftWrapQty.Visible = False
    lblgiftwrapprice.Visible = False
        End If
End If
' End 5.4 Gift Wrap Code


I hope this helps anyone looking to make sure that the global gift wrap setting overrides all as (IMHO) it should. :-)

Good luck.

:cool:
Paul Pettit
CIO, CCB Inc.

http://www.ccbnonprofits.com

Serving those that server others with affordable technology solutions.
birdsafe
#2 Posted : Wednesday, June 2, 2010 9:55:21 AM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Where are you seeing Gift Wrap show up? We never offer it either, but have never had an issue with it showing up anywhere with any version.
ppettit
#3 Posted : Wednesday, June 2, 2010 10:43:06 AM(UTC)
ppettit

Rank: Member

Joined: 4/2/2009(UTC)
Posts: 37

The button always showed up in the cart on our site even when the GiftWrapAll variable was set to false. I can't speak for others only what was happening on our site.

The problem (for us) seemed to be the GiftWrapAll variable was included with the GiftWrapAllowed variable as an and/or part of the if-than-else statement. Simply separating the two, and making the more global admin controlled variable override all others seems to have fixed the issue. I'm not saying this applies to everyone but if someone is seeing the same thing and wanted to know how to fix it. there you go.
Paul Pettit
CIO, CCB Inc.

http://www.ccbnonprofits.com

Serving those that server others with affordable technology solutions.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012