D
D
DMax9212018-09-06 16:14:30
WordPress
DMax921, 2018-09-06 16:14:30

How to make an animated price that changes depending on the number of goods?

Hello, friends!
Tell me pity, maybe someone met such that when you change the number of goods, the price multiplies?
I'm looking for plugins and can't find it, does anyone know?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pychev Anatoly, 2018-09-07
@pton

I don’t know about the plugin, but if I understand correctly, then you can connect the hook
for saving goods from the admin panel in functions.php , check the quantity and change the price by the required multiplier. In general, everything is within one function, a plugin may not be needed.

Y
Yuri Yanin, 2018-09-07
@VPank

In my opinion, you have formulated the task very incorrectly. I hit at random. You can grab the value of the field with the quantity of goods on jq and thus animate the value of the price. To do this, we take the price of a unit of goods and multiply by the quantity, and change the current total price to a new value with animation. But! this will be like a trick for you, since woocommerce in its initial build doesn't actually trigger auto-updating of values. So after doing the animation, you will also need to streamer the click on the "update cart" button

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question