Coder Social home page Coder Social logo

Comments (4)

victor-champonnois avatar victor-champonnois commented on July 17, 2024

The issue happens at the last step
image
Here, when changing the delivery method, the method _update_website_sale_delivery should be triggered by this JS code.

But when the customer is allowed to skip_payment, the JS code throws an error at this line :

Uncaught TypeError: 
``$pay_button.data(...) is undefined
_onCarrierClick http://localhost:8012/web/content/985-5287018/1/web.assets_frontend.js:295

at this line

so the method is not tiggered, the carrier is not updated, and the first one on the list is used.

I think this might be because the payment route is skipped and we go directly to the confirmation route (like below).

<form target="_self" action="/shop/confirmation" method="post" class="float-right">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
<a role="button" class="btn btn-primary a-submit" href="#">
<span>Confirm Order <span class="fa fa-chevron-right"></span></span>
</a>

However I don't have a clearer idea.
@sergio-teruel Do you know a way to fix this issue ?

from e-commerce.

sergio-teruel avatar sergio-teruel commented on July 17, 2024

Sorry @victor-champonnois The website_sale_checkout_skip_payment module has not include any JS code, so I think that this error is related to other module...

from e-commerce.

chienandalu avatar chienandalu commented on July 17, 2024

@sergio-teruel I took a look and it seems to be related to the absence of the payment button element. https://github.com/odoo/odoo/blob/c53081f10befd4f1c98e46a450ed3bc71a6246ed/addons/website_sale_delivery/static/src/js/website_sale_delivery.js#L12

Anyway, I couldn't reproduce the bug in the versions we're currently supporting for our customers (>13).

So @victor-champonnois feel free to propose a PR patching de issue for 12.0

from e-commerce.

github-actions avatar github-actions commented on July 17, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

from e-commerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.