since 2.903 problems checking out to sagePay v3 with a promotion

Posted By holtcomp Fri 15 Apr 2016
Add to Favorites1

since 2.903 problems checking out to sagePay v3 with a promotion

Author Message
holtcomp
 Posted Fri 15 Apr 2016
Supreme Being

Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)

Group: Forum Members
Last Active: Wed 18 May 2016
Posts: 12, Visits: 145
Since upgrading to 2.9003 I can't checkout to sagePay v3 if a promotion is present on order.

When I click the final proceed button on checkout.aspx instead of going to sagepay screen it just loops back. If I remove the promotion it works.

I've tried with different promotions and the same thing happens.
Fri 15 Apr 2016 by holtcomp
holtcomp
 Posted Fri 15 Apr 2016
Supreme Being

Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)Supreme Being - (11,493 reputation)

Group: Forum Members
Last Active: Wed 18 May 2016
Posts: 12, Visits: 145
I have since discovered it's nothing to do wih sagepay, it happens even with invoice payment method.
Paul
 Posted Thu 5 May 2016
große Käse

große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)große Käse - (517,370 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
We've been looking into this. It seems there is a problem with the XMLserialization of the basket object when promotions are present. The basket BLL was reworked somewhat in 2.9. Ideally the elegant solution would be to identify the issue serializing the promotions, but that's proving difficult.

However there is a good workaround. The primary purpose for serializing the basket object to XML is to store it with the order so that if you edit an order from the back end, Kartris has precise information about the basket contents to restore them - by deserialization the XML. For this purpose, the promotions aren't really required, because it will simply restore the basket items and then the basket logic will apply any promotions that are valid. Since the checkout works fine when there are no promotions, a workaround is to clear promotions from the basket object just prior to where serialization occurs. Add this code into a couple of places:

objBasket.objPromotions.Clear()
objBasket.objPromotionsDiscount.Clear()


In ordersBLL.vb, search for 'Payment.Serialize(objBasket)' - should find it around line 730-740. Just before this 'with' section, add in the two lines.

Also in checkout.aspx.vb, there is this line around 1560:

OrdersBLL.DataUpdate(O_ID, Session("objOrder") & "|||" & Payment.Serialize(objBasket) & "|||" & UC_BasketView.SelectedShippingID)


Add the same two lines just before this.

I've run some test orders and it doesn't seem to cause any problems. The orders now pass, the promotions still show, and if you edit the order in the back end, you can recover the basket fine.



--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top