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

Notification

Icon
Error

CorneliuTusnea
#1 Posted : Wednesday, April 25, 2007 9:13:18 AM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

I add a $50 GC to a $30 order and it still asks me to enter CC details or whatever payment method I want.
So GC are still not usable :(

Now I'll have to figure our how I fixed this before SP2 when I got it working.

Corneliu
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

jetheredge
#2 Posted : Wednesday, April 25, 2007 9:27:38 AM(UTC)
jetheredge

Rank: Member

Joined: 3/1/2006(UTC)
Posts: 1,142

I don't know if you have customized this or not, but we have no issues at all placing orders with only a gift card. I have done some testing, and the only thing I can find is that if you have customized your store to automatically select a payment method, then it is going to require you to enter something, even if you have a gift certificate entered. Is this happening on the one page or bv 2004 checkout? I was testing with the one page checkout.
Justin Etheredge
Senior Software Engineer
BVSoftware
CorneliuTusnea
#3 Posted : Wednesday, April 25, 2007 8:07:42 PM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

Justin,
After you enter a Gift Certificate and you click on the "Add Gift Certificate" button, the page is refreshed to show the new certificate.
Do you then still get the list of payments methods visible on the screen?
I do, and it's true, you don't have to select one of them but still is strange for the user.
If you for example select one of the payment methods then your done. There is no way to deselect it.
I'd expect after I entered a GC (that covers the value of the order), the page should refresh and tell me "No Payment Needed."
This is the part that I can't get working.

Regards,
Corneliu.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

jetheredge
#4 Posted : Thursday, April 26, 2007 9:16:59 AM(UTC)
jetheredge

Rank: Member

Joined: 3/1/2006(UTC)
Posts: 1,142

We will look into making it possible to add a "no payment" option to the payment section so that you can deselect your payment. We will also look at the feasibility of removing the payment section when a gift certificate of sufficient value is added to an order.
Justin Etheredge
Senior Software Engineer
BVSoftware
CorneliuTusnea
#5 Posted : Friday, April 27, 2007 9:14:24 AM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

Ok,


Here are my changes that seem to work.

1. Replace the GiftCertificates files with the ones attached. The change is that the control will fire an event when a GC is changed.

2. Add this to your checkout.vb to force the reload of the order when the GC have changed:

Protected Sub GiftCertificates1_GiftCertificatesChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GiftCertificates1.GiftCertificatesChanged
LoadBasket()
End Sub

3. In the LoadBasket function replace the If Not Basket.HasShippingItems Then [...] with:
If Not Basket.HasShippingItems Then
PaymentUC.LoadPaymentMethods(Basket.GrandTotal)
Else
'PaymentUC.LoadPaymentMethods(1D)
Dim gc As Decimal = OrderUtils.OrderValueWithoutGiftCertificates(Basket)
Dim hasGc As Boolean = OrderUtils.OrderHasGiftCertificates(Basket)
PaymentUC.LoadPaymentMethods(gc, hasGc)
End If
4. Create the OrderUtils class (if you don't have one) in the App_Code and drop these two methods:

Public Shared Function OrderValueWithoutGiftCertificates(ByVal order As Orders.Order) As Decimal
order.CalculateGrandTotalOnly(False, False)
Dim gc As Decimal = GetGiftCertificateValue(order)
If gc > 0 Then
If gc > order.GrandTotal Then
Return order.GrandTotal
Else
Return order.GrandTotal - gc
End If
Else
Return order.GrandTotal
End If
End Function


Public Shared Function OrderHasGiftCertificates(ByVal order As Orders.Order) As Boolean
For Each item As Orders.OrderPayment In order.Payments
If item.PaymentMethodId = WebAppSettings.PaymentIdGiftCertificate Then
Return True
End If
Next
Return False
End Function


This should work. At least "it works on my computer" and live on my site as well :)



Regards,

Corneliu.
File Attachment(s):
GiftCertificates.ascx (2kb) downloaded 2 time(s).

You cannot view/download attachments. Try to login or register.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

dotnetdiva
#6 Posted : Friday, April 27, 2007 12:25:13 PM(UTC)
dotnetdiva

Rank: Member

Joined: 6/26/2006(UTC)
Posts: 351

I get this error message, where do I find GetGiftCertificateValue?

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'GetGiftCertificateValue' is not declared.

Source Error:



Line 6: Public Shared Function OrderValueWithoutGiftCertificates(ByVal order As Orders.Order) As Decimal
Line 7: order.CalculateGrandTotalOnly(False, False)
Line 8: Dim gc As Decimal = GetGiftCertificateValue(order)
Line 9: If gc > 0 Then
Line 10: If gc > order.GrandTotal Then


Source File: C:\Inetpub\wwwroot\attachedtobaby.com\wwwroot\store\App_Code\OrderUtils.vb Line: 8
Angela
Attached to Baby

http://www.attachedtobaby.com

"closer to your heart... do you don't miss a beat."

CorneliuTusnea
#7 Posted : Sunday, April 29, 2007 6:15:12 PM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

Woops.
Here it is:

Public Shared Function GetGiftCertificateValue(ByVal order As Orders.Order) As Decimal

Dim gcs As Collection(Of Catalog.GiftCertificate) = order.GetGiftCertificates()
Dim totalValue As Double = 0D
For Each item As Catalog.GiftCertificate In gcs
totalValue += item.CurrentAmount
Next

If totalValue > order.GrandTotal Then
Return order.GrandTotal
End If

Return totalValue
End Function

Regards,
Corneliu.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

dotnetdiva
#8 Posted : Monday, April 30, 2007 12:14:10 PM(UTC)
dotnetdiva

Rank: Member

Joined: 6/26/2006(UTC)
Posts: 351

Thanks, still trying to get this to work. :)

In OrderUtils.vb, I added the line, as it was not liking it unless I added this.
Imports BVSoftware.BVC5.Core

Is that right?

I also am getting this error now. I wish I was more fluent in programming these days, and more time to work on stuff like this!

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC32045: 'Microsoft.VisualBasic.Collection' has no type parameters and so cannot have type arguments.

Source Error:



Line 32: Public Shared Function GetGiftCertificateValue(ByVal order As Orders.Order) As Decimal
Line 33:
Line 34: Dim gcs As Collection(Of Catalog.GiftCertificate) = order.GetGiftCertificates()
Line 35: Dim totalValue As Double = 0D
Line 36: For Each item As Catalog.GiftCertificate In gcs


Source File: c:\inetpub\wwwroot\BVC52\App_Code\OrderUtils.vb Line: 34
Angela
Attached to Baby

http://www.attachedtobaby.com

"closer to your heart... do you don't miss a beat."

dotnetdiva
#9 Posted : Monday, April 30, 2007 2:25:27 PM(UTC)
dotnetdiva

Rank: Member

Joined: 6/26/2006(UTC)
Posts: 351

Added the following to the top, and it works fine!

Imports Microsoft.VisualBasic
Imports BVSoftware.Bvc5.Core
Imports System.Collections.ObjectModel
Angela
Attached to Baby

http://www.attachedtobaby.com

"closer to your heart... do you don't miss a beat."

dotnetdiva
#10 Posted : Monday, April 30, 2007 3:55:35 PM(UTC)
dotnetdiva

Rank: Member

Joined: 6/26/2006(UTC)
Posts: 351

Hopefully last question. Where do I find PaymentUC?

Compiler Error Message: BC30451: Name 'PaymentUC' is not declared.

Source Error:



Line 63:
Line 64: If Not Basket.HasShippingItems Then
Line 65: PaymentUC.LoadPaymentMethods(Basket.GrandTotal)
Line 66: Else
Line 67: 'PaymentUC.LoadPaymentMethods(1D)


Source File: c:\inetpub\wwwroot\BVC52\BVModules\Checkouts\One Page Checkout\Checkout.aspx.vb Line: 65
Angela
Attached to Baby

http://www.attachedtobaby.com

"closer to your heart... do you don't miss a beat."

CorneliuTusnea
#11 Posted : Tuesday, May 1, 2007 7:08:59 AM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

Angela,
Sorry, I had some controls renamed on my box as I hate having control names same as class names (It's messing up with my IntelliSense).
I think the original name for that was just "Payment" so try Payment.LoadPaymentMethods( ... ).
Make sure you replace those lines with the ones in my first post so I think it should be:
line 65: If Not Basket.HasShippingItems Then
Payment.LoadPaymentMethods(Basket.GrandTotal)
Else
'PaymentUC.LoadPaymentMethods(1D) - old
Dim gc As Decimal = OrderUtils.OrderValueWithoutGiftCertificates(Basket)
Dim hasGc As Boolean = OrderUtils.OrderHasGiftCertificates(Basket)
Payment.LoadPaymentMethods(gc, hasGc)
End If

Regards,
Corneliu.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

CorneliuTusnea
#12 Posted : Saturday, May 5, 2007 9:04:16 AM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

Angela,
Did you manage to get this working? If yes, I'll make a post with a summary of how to get this working.
Regards,
Corneliu.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

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.

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