Answer the question
In order to leave comments, you need to log in
How to add class active to product button after clicking, with page reload?
Tell me how to do it in Opencart, when I click on the button of a certain product "Buy", this product is added to the cart, and the button of this product is assigned the active class, for this class I want to add color to css, but so that this class is not reset when you refresh the page. In short (the customer adds an item to the cart, the button turns green until you remove this item from their cart, the active button does not reset). I did it through sessionStorage, but the class is added to all buttons, but only one is needed
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question