A
A
Artem Saveliev2020-10-23 08:01:46
WordPress
Artem Saveliev, 2020-10-23 08:01:46

How to set a variable price?

Good day. I am trying to create a calculator similar to https://krekerdecor.ru/shop/ , if I understand correctly, the product has a type property (and several specified values) and dimensions (area, in fact, the length multiplied by the width), I can’t figure out how depending on this, form a price. I looked at variable products, but there is a choice from pre-prepared variations, and I need to dynamically generate a price depending on the properties of the product, and send it to the cart with JS. In this example, the data object goes away, which also has a calculated_data object, which contains type and dimensions. Everything is clear here, the question is from the side of WP, how to process this in the product?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2020-10-23
@Livsnekad

There is such a thing as Woocommerce Measurement Price Calculator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question