X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   How to change the add to cart form's behaviour (https://forum.x-cart.com/showthread.php?t=76526)

go2ready 09-12-2018 04:07 AM

How to change the add to cart form's behaviour
 
Hello there,

Our workflow provide customers an option to go to 3rd party website with their current selection(product id, attribute value that defines variants etc.), thus we want to add a button next to the add to cart button that does the some request as the add to cart but to different url and using GET instead of POST.

However a glance of the code tell us that the form is controlled by javascript, and unfortunately it is hard coded to always go to the form's url and method.

We tried to modify those form attribute on submit, the GET request has been sent but the web brower is not directing to the url. This is somewhat expected since for whatever reason the request is probably sent by javascript instead of the form itself.

Our question is, is there a way to simply disable any javascript shenanigans and let the form just sent a GET request in the browser, or there is no way to do that other than refractor some js code in commonforms?

With thanks,
Richard


All times are GMT -8. The time now is 07:02 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.