Woocommerce Plugin Development: PHP Price Calculator
76 USDThe formulas with values are taken from the admin panel:
Now the logic of the plugin is structured as follows: we create variables with values and descriptions in the admin panels.Then for each product we introduce our formula.The price formula replaces the standard price of Woocommerce if it exists.If I’m not wrong, then the price of the formula is simply changing everywhere: in the card, in the basket, in the order email (with this approach there are problems with the sorting of goods and not only).What to do:
and 1).You need to understand how the plugin works, what and where it replaces.and 2).Then you need to change the logic of price replacement: the price from the fields of the formula should not be replaced anywhere.There should be a default price everywhere, namely from the field Basic price and Selling price.and 3).You need to make the buttons next to the fields that the plugin creates: the standard price formula and the sales price formula.This is like:
By clicking on these buttons, the price should be calculated and submitted without rebooting the page:
and a)From the Formula price field -> in the Basic price field
and b)And the sale price formula field -> in the sale price field.Based on this logic, there is one point: if you change the value of the variable in the admin panel, i.e.Here is:
The prices will not be calculated automatically for all the goods cards (as it was before, because the prices were drawn directly from the fields: the formula of the usual price and the formula of the price of sale).It is important to ensure that the prices of all goods are updated when one of the variable values changes, for example when you click the "Save changes" button.and 4).Almost all products on the site will be variable.You have to do the following: when I write a formula, for example $iris$ in the Description field, for example:
by IRIS$
The Roses$
on the page of the product card, it must indicate the following (i.e.Description of the variable and its significance:
Iris 15
The Rose 100
Здравствуйте!
Есть плагин под названием: Цена товара по формуле.
Разработан специально для наших целей. Что он делает: в карточке товара Woocommerce, как вы знаете, есть два стандартных поля цены. Этот плагин добавляет еще два поля с ценами, в итоге получается это (это же касается и вариативных товаров):
Формулы со значениями берутся из админ панели:
Сейчас логика плагина устроена следующим образом: создаем переменные со значениями и описаниями в админ панели. Потом для каждого товара вводим свою формулу. Формула цены заменяет стандартную цену Woocommerce, если она существует. Если не ошибаюсь, то цена формулы просто подменяется везде: в карточке, в корзине, в email о заказе (при таком подходе возникают проблемы с сортировкой товаров и не только).
Что нужно сделать:
1). Нужно разобраться как работает плагин, что и где он заменяет.
2). После нужно изменить логику замены цен: цена из полей формулы не должна ни где заменяться. Везде должна быть цена по дефолту, а именно из поля Базовая цена и Цена распродажи.
3). Нужно сделать кнопки рядом с полями которые создает плагин: Формула обычной цены и Формула цены распродажи. Вроде того:
Нажимая на эти кнопки, должна рассчитываться и подставляться цена без перезагрузки страницы:
а). Из поля Формула обычной цены -> в поле Базовая цена
б). И поля Формула цены распродажи -> в поле Цена распродажи.
Исходя из такой логики, возникает один момент: если изменить значение переменной в админ панели, т.е. тут:
то цены не будут рассчитаны автоматически для всех карточек товаров (как это было ранее, потому что цены подтягивались напрямую из полей: Формула обычной цены и Формула цены распродажи). Важно сделать так, чтобы цены всех товаров обновлялись при изменении одного из значения переменной, например в момент нажатия на кнопку "Сохранить изменения".
4). Практически все товары на сайте будут вариативными. Нужно сделать следующее: когда я пишу формулу, например $iris$ в поле Описание, например:
<table>
<tr>$iris$</tr>
<tr>$roses$</tr>
</table>
то на странице карточки товара, должно выводить следующее (т.е. описание переменной и ее значение):
<table>
<tr><td>Ирисы</td><td>15</td></tr>
<tr><td>Розы</td><td>100</td></tr>
</table>
Client's feedback on cooperation with Bogdan B.
Woocommerce Plugin Development: PHP Price CalculatorBogdan is a real specialist! If you want your task to be solved, then you are at the address! Always in contact, everything is clear, and very professional! Again a great thanks!
Profile deleted | Safe
Freelancer's feedback on cooperation with client
Woocommerce Plugin Development: PHP Price CalculatorIt’s a pleasure to work with Arthur! Clearly put the task, always in contact, actively participate in the process and even try to help)) I will be happy to work again!
-
7446 178 0 2 Hello to Arthur! I have been working with WordPress for more than 5 years, ready to make adjustments to the plugin. To evaluate the price, you need to see how it works from the inside. Go to turn!
Здравствуйте, Артем! Я работаю с вордпрессом более 5 лет, готов внести корректировки в плагин. Для точной оценки стоимости нужно посмотреть как он работает изнутри. Обращайтесь!
-
1328 27 0 Hello to you!I would be happy to work on the task, interesting TZ.But I have a comment on the logic of price adjustments.On the one hand, you set the automatic price calculation change to the manual, the buttons appear that perform the price recalculation for the current product, and only for it.There will be goods for which this review will not be made.In this context, it would be more logical to organize a total recount of prices by a single button.That is, make a separate button on which the prices of all goods will be updated.And when the value of one of the variables is changed, I would not touch the price, otherwise the process of interactive processing of each product in separately loses meaning.If done according to the current TZ, then when the value of one of the variables is changed, the interactive work on those goods will be lost, when processing which the "Counter" buttons were not used by the operator.Maybe I’ve misunderstood, please tell me.I will be grateful for your opinion, even if you do not choose me as an artist.And, of course, I will be happy to work on the task.By the way, last week he completed an interesting work on price casting at Woocommrece https://freelancehunt.com/project/programmist-wordpress-woocomerce/477996.html, where he also made a global price review, but in the form of a separate stand-alone procedure, through MySQL query.
Здравствуйте! Был бы рад поработать над задачей, интересное ТЗ. Но у меня есть замечание по логике корректировок цен.
С одной стороны, Вы устанавливаете в ТЗ изменение автоматического расчета цены на ручное, появляются кнопки, которые выполняют пересчет цены для текущего товара, и только для него. Значит, будут существовать товары, для которых этот пересчет не будет произведен.
В связи с этим логичнее было бы организовать тотальный пересчет цен по по отдельной кнопке. Т.е., сделать отдельную кнопку, по которой будут обновляться цены всех товаров.
А при изменении значения одной из переменных я бы цены не трогал, иначе теряет смысл процедура интерактивной обработки каждого товара в отдельности. Если же сделать согласно текущему ТЗ, то при изменении значения одной из переменных будет потеряна интерактивная работа над теми товарами, при обработке который кнопки "Рассчитать" не использовались оператором.
Возможно, я неверно понял ТЗ, прошу подсказать. Буду благодарен за Ваше мнение, даже если Вы меня не выберете исполнителем.
…
И, конечно, буду рад поработать над задачей. Кстати, на прошлой неделе закончил интересную работу по кастомизации цен в Woocommrece https://freelancehunt.com/project/programmist-wordpress-woocomerce/477996.html , где также делал глобальный пересчет цен, но в виде отдельной stand-alone процедуры, путем MySQL-запроса.
-
1514 167 0 1 Good day . Ready to fulfill your task. I would like to look at the plugin.
Добрый день. Готов взяться за выполнение Вашего задания. Хотел бы посмотреть на плагин.
-
160 15 2 Good Morning . Ready to make a calculator for your tz. There is experience in such development.
Доброе утро. Готов сделать калькулятор по вашему тз. Есть опыт в подобной разработке.
Current freelance projects in the category JavaScript
Exchange service
510 USD
There are working exchangers, it is necessary to rely on the example, make a cryptocurrency exchanger: Design and code can be taken completely from a working website, that is - make a copy. The exchange rate and other data for the exchange - what I could set manually. The… JavaScript, Web programming ∙ 3 proposals |
Writing software for creating an Open Book on the Solana network
107 USD
During the creation of interchangeable tokens (SPL token) on the Solana network, it is necessary to automate the process of creating an Open Book for the token and speed it up by increasing transaction fees. Software functions: - Create Open Book - Set a "tea" limit on the… Java, JavaScript |
Website layout according to the design.
510 USD
Good day. There is a layout in Figma: https://www.figma.com/file/RGVIymprYc4QaiJ5qp3iwL/LayerGame?type=design&node-id=0-1&mode=design There is a UI kit and a ready-made layout of the Main page, implemented in React, animations are done using GSAP. It is necessary to layout 2… HTML and CSS, JavaScript ∙ 34 proposals |
ParallaxIt is necessary to make such a parallax as here https://www.bangbangforever.com/#artists, that is, a video block video (everything is already laid out) and also part of the parallax is ready, stack Next.js JavaScript ∙ 1 proposal |
Set up Facebook Pixel and Google Analytics events on the websiteSet up Facebook Pixel and Google Analytics events on the website. Do this through the website admin panel, simply add scripts there or through GTM. JavaScript, Web programming ∙ 7 proposals |