Skip to content
Advertisement

How to add payment fee to cart in Prestashop?

I want to add payment fee to cart with a product created for payment fees. But when i add to cart the product for fee then i use $cart->getOrderTotal(), it doesn’t show the real price with fee. It shows the order total as product price without fee.

I use SpecificPrice class for this action. And i think prestashop orders page on back office, firstly reads products with specific prices. However, it does not show the payment price, but shows it together with the price of the product I added.

Maybe you didn’t understand it like that, but I explained it better in the comments below. Please help me. I’ve been struggling for 2 days. 🙁

JavaScript

Advertisement

Answer

I was solved the problem. The problem was clearing the card cache after adding the product to cart.

If you encounter this problem, add the following code before the validateOrder function.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement