F
F
filippokk2016-02-15 13:50:53
JavaScript
filippokk, 2016-02-15 13:50:53

How to fix the work of the script initiating the click?

Such a situation, there is an IM decided to simplify the ordering process a bit, he did everything with an order without registration, but if you make a purchase from under a registered user (for verification, he made a demo user login: [email protected] and password: sasha1993) it is impossible to make it work correctly automatic button press.
To skip Step 3: I added the code to the shipping_address.tpl file

<script>
 $(document).ready(function(){
 setTimeout(function(){
  $('#button-shipping-address').trigger('click');
  },300);
 });
</script>
it fires, but then the cyclical opening/closing of the tab starts Step4: Delivery method.
Before that, this step was also automatically skipped for me, and if I remove the automatic click code (and click on the continue button myself) from the shipping_address.tpl file, then everything works fine, and Step 4: The shipping method works quietly, and immediately transfers to order confirmation. Tell me what needs to be fixed, I don’t see any reason for such work

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question