Woocommerce Plugin Development: PHP Price Calculator
The 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
Client's review of 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!
![]()
Freelancer's review of 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!
-
7024 177 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!
-
1143 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.
-
897 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 and Typescript
Optimization of Core Web Vitals (OpenCart) for Google PageSpeed — Mobile and PC versionsOrder description: We are looking for an experienced frontend developer/OpenCart specialist to optimize the loading speed of the website (categories and product cards) according to Google Core Web Vitals requirements. About the project: * CMS: OpenCart. * Specifics: The site… Content Management Systems, Javascript and Typescript ∙ 2 days 8 hours back ∙ 18 proposals |
Optimization of WordPress site speed
113 USD
We will send full details in private messages Goal Maximize website loading speed, especially on mobile devices. KPI (mandatory) After the work is completed, the following metrics must be achieved. Mobile Performance 90+ LCP less than 2.2 sec INP less than 200 ms CLS less than… HTML & CSS, Javascript and Typescript ∙ 3 days 3 hours back ∙ 66 proposals |
Looking for an Odoo Developer — a solo developer with experience in Odoo 19 Community Edition.There is a working, well-designed project on Odoo 19 Community — CRM for a Ukrainian hotel, already in production-grade infrastructure. We do not plan to rewrite from scratch. We are looking for one person who will take over the project, maintain the working state, and lead it… Javascript and Typescript, Web Programming ∙ 5 days 5 hours back ∙ 2 proposals |
I am looking for an experienced Full Stack developer to create a SaaS service for online stores.Service idea: The client uploads a link to their product feed (XML or CSV). The service automatically retrieves the products, takes their photos, and creates new advertising images based on ready-made templates: price, discount, logo, promotional tags, etc. There should also be… Javascript and Typescript, Web Programming ∙ 6 days 11 hours back ∙ 87 proposals |
Development of a WebGL/Three.js scene with generation and export of 3D (snapshot) from an animated shaderObject Description:The project is a designer table shaped like a realistic, deep whirlpool (a central vortex that smoothly transitions from a wide horizontal tabletop to a thin elegant leg). Task Essence:A WebGL / Creative Coding developer is required to create an interactive 3D… Javascript and Typescript, Web Programming ∙ 7 days 7 hours back ∙ 30 proposals |