Developer forum

Forum » Ecommerce - Standard features » DW 9.15.4 - Order confirmation page produces an error for orders with a voucher code

DW 9.15.4 - Order confirmation page produces an error for orders with a voucher code

Roald Haahr
Reply

DW v9.15.4
Swift v1.19.0

Hi

We are experiencing that the order confirmation page produces an error when a customer has added a voucher code to the EcomOrderVoucherCodeField. The error is shown below. I see that both EcomOrderGiftCardCodeField and EcomOrderVoucherCodeField have their values saved to the OrderVoucherCode column in the EcomOrders table in the database. The error produced indicates that it fails while looking for the voucher, so I suspect that it is looking for the voucher code in the gift card list. That is partly because I see that orders that has gift card codes in the OrderVoucherCode column do not produce any errors on the order confirmation page.

I would like to request that you add a column to the EcomOrders table by the name OrderGiftCardCode to avoid this confusion between vouchers and gift cards.

That would also fix the problem, I had in another post where I was asking how to add both vouchers and gift cards to the same order.

Kind regards,
Roald

Error

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: SqlExpression. More information in the log. at Dynamicweb.Data.CommandBuilder.Add(String sqlExpression, Object[] values) at Dynamicweb.Ecommerce.Orders.Vouchers.VoucherRepository.UpdateVoucher(Voucher voucher) at Dynamicweb.Ecommerce.Orders.Vouchers.VoucherService.MarkVoucherAsUsed(String voucherCode, String orderId) at Dynamicweb.Ecommerce.Cart.Frontend.GetContent()

Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Roald

You can add many giftcard codes to the same order - so it is not a field on the order, but a field on an orderline that is made as a giftcard 'discount' that holds the actual discount code.

In the checkout flow, you can submit any amount of filed with the name "EcomOrderGiftCardCode" - each valid discount code is then added as giftcard discount as orderlines.

Swift does currently not have an implementation for giftcards, so it sounds like you might have a custom implementation with a wrong field name?

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum