From 12507c63653416c2d83635ae87eab5d77bef7bca Mon Sep 17 00:00:00 2001 From: Abdurrahman Saber Date: Tue, 29 Jul 2025 15:27:12 +0300 Subject: [PATCH] [FIX] applepay_fast_checkout: correct selector for order total --- .../applepay_fast_checkout/static/src/js/applepay_iframe.js | 2 +- .../website_sale_checkout_limit/controllers/controllers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/odex25_donation/applepay_fast_checkout/static/src/js/applepay_iframe.js b/odex25_donation/applepay_fast_checkout/static/src/js/applepay_iframe.js index 1526545b2..b0b4fc082 100644 --- a/odex25_donation/applepay_fast_checkout/static/src/js/applepay_iframe.js +++ b/odex25_donation/applepay_fast_checkout/static/src/js/applepay_iframe.js @@ -45,7 +45,7 @@ var wpwlOptions = { let isCheckoutPage = $("#oe_structure_website_sale_payment_1", window.parent.document).length; if (isCheckoutPage) { let applepayButton = $("apple-pay-button"); - let totalAmount = $("tr#order_total", window.parent.document).find("span.oe_currency_value").text().replaceAll(",", ""); + let totalAmount = $("#order_total > td.text-xl-right > strong", window.parent.document).text().replaceAll(",", ""); window.wpwlOptions.applePay.total.amount = totalAmount; console.log("Apple Pay Amount updated to:", window.wpwlOptions.applePay.total.amount); applepayButton.css({ diff --git a/odex25_donation/website_sale_checkout_limit/controllers/controllers.py b/odex25_donation/website_sale_checkout_limit/controllers/controllers.py index 00429b458..d3d291cd8 100644 --- a/odex25_donation/website_sale_checkout_limit/controllers/controllers.py +++ b/odex25_donation/website_sale_checkout_limit/controllers/controllers.py @@ -21,8 +21,8 @@ class WebsiteSaleExtended(WebsiteSale): return super(WebsiteSaleExtended, self).checkout(**post) @http.route('/shop/payment', type='http', auth='public', website=True, sitemap=False) - def shop_payment(self, **post): + def payment(self, **post): is_min = request.website.check_cart_amount() if is_min: - return super(WebsiteSaleExtended, self).shop_payment(**post) + return super(WebsiteSaleExtended, self).payment(**post) return request.redirect("/shop/cart")