A
A
Antikillers2018-02-02 03:35:31
opencart
Antikillers, 2018-02-02 03:35:31

How in opencart, after clicking, change the button and display another one?

How after clicking change the "Add to cart" button to change it to "Continue shopping" with a different link, and display the new "Checkout"?
Opencart version 2.3.0.2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2018-02-02
@Antikillers

If on the product page then in the script:

$('#button-cart').on('click', function() {
...

AT
if (json['success']) {
        
      }

Add something like:
$('#button-cart').replaceWith('<a>Новая кнопка</a><a>Еще однa</a>')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question