Change price based on data-attribute of value on button click -- 2
Budget: €8 – €30 EUR
I have a price related to two set of buttons, one set defines the offers or discounts and the other set defines the amount of products and price based on a SUM. My left buttons select the offer or discount(based on amount defined on data-attribute) and the right buttons select the amount of products and the SUM of value of each to the main price, this amount should be added by a defined amount in a data-atribute of the button.
To resume, i need for the value on the data attribute on the buttons to be added to the price on click of those button and the price changes according to the sum with the data attribute of the button.
I now have two js functions, one that does the offers or discounts and the other that changes the amount of products.
All the code is done i just need the part that adds the SUM of the value on data-attribute of the button with the main price.
To resume, i need for the value on the data attribute on the buttons to be added to the price on click of those button and the price changes according to the sum with the data attribute of the button.
I now have two js functions, one that does the offers or discounts and the other that changes the amount of products.
All the code is done i just need the part that adds the SUM of the value on data-attribute of the button with the main price.