Merge pull request #4047 from expsa/ENS-3613
[FIX] applepay_fast_checkout: correct selector for order total
This commit is contained in:
commit
d2ebcbd841
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue