A
A
Ajax2018-07-12 22:17:33
WooCommerce
Ajax, 2018-07-12 22:17:33

How to make a script with the choice of units of measurement and additional calculations in the Woocommerce product card?

Hello guys.
A very big question.
There is a shop selling rolled metal, it became necessary to make a script into a product card. And only for certain products.
For example, the product fittings. In the rebar product card, there should be a choice of unit of measure, as I understand it in the select tag, the client needs to choose which unit of measure he needs in tons or in m / p.
Further, based on this choice, a certain cost will be displayed to it.
For example: the price per ton is 30r, he enters the quantity of 2 tons, we are 30+30=60, the final amount. Sounds easy, but there's an ass. (sorry for the french).
And there is a commodity square, also as an example.
In it, the price goes for m / n, that is, there will no longer be a choice of a ton, but there should be a default m / p.
I am attaching screenshots:

spoiler
5b47a85ea8eb2252095842.jpeg5b47a86a4d80a289221305.jpeg

Well, of course, $price must go to the end, before placing an order. And not just display the calculation in the product card.
Tell me how to implement? I don't know much about php at all. But it really needs to be done. I would like to study, but I don't know where to start. What do I need to study for this?
No need to write, they say, where are your achievements? why did you write here, etc., I ask you for advice on how to implement it, where to start and how to do it.
As I understand it, it will be possible to refer to already existing variables, such as $price, etc.
Like $price * price per ton, no?
In general. Help, please write only on the case. If you order such a script, how much will it cost?
Thank you. If something is poorly described, write.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-07-15
@azerphoenix

Hello!
Have you tried the Woocommerce Measurement Price Calculator plugin? Looks like it has similar functionality.
Another option is to look for woocommerce price calculator || woocommerce cost calculator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question