How we transformed a complex payment system
the automatic fence cost calculator
About the project
Task
The client already had a 1C-Bitrix website and a ready-made calculator design. However, behind the interface, which looks relatively simple, there was a rather complex calculation system.
The cost of a fence depends on a large number of parameters at once: the length and height of the fence, the width of the gate and gate, the type of gate, the characteristics of the corrugated board, the parameters of the pillars and logs, fittings, additional options and shipping costs.
At the same time, prices and characteristics were stored in 1C-Bitrix price data, and the total cost had to be recalculated dynamically with each parameter change.
The team’s task was not just to update the interface, but to transfer the existing calculation methodology from tables and documents to a working web tool.

What needed to be done
We developed a calculator from scratch based on a ready-made UX/UI design and integrated it directly into an existing 1C-Bitrix website.
The user can specify the parameters of the future fence, select a ready-made configuration, or independently change individual characteristics.
Depending on the choice, the system automatically recalculates:
- number of required materials;
- cost of pillars;
- the cost of the lag;
- the cost of corrugated board;
- the cost of gates and gates;
- the cost of accessories;
- installation cost;
- Shipping cost;
- a discount;
- the total cost of the project.
In total, the user works with about 15 parameters that affect the final calculation.
The most difficult part
The main difficulty of the project was not in the interface.
The original calculation method was found in documents and tables and contained many interdependent formulas.
For example, the number of posts is calculated based on the length of the fence minus the width of the gate and the gate, taking into account the specified distance between the posts.
The number of sheets of corrugated board depends on the total length of the fence and the working width of the specific profile.
The cost of materials, in turn, consists of several previously calculated values.
The work, installation of gates and gates, delivery and discount are calculated separately.
We needed to transfer this logic to JavaScript/PHP so that changing one parameter automatically recalculates the entire associated value chain.
In this case, the calculation should have used real data from the price list, rather than a set of predefined prices.
Dynamic work with the price list
Prices and characteristics of materials were stored in 1C-Bitrix.
The calculator accesses this data and selects the appropriate values depending on the parameters selected by the user.
For example, the cost of corrugated board depends on the combination:
- stamps;
- metal thickness;
- type of coating;
- colors;
- working width.
And the cost of the frame elements depends on the selected parameters of the pillars and logs.
Thus, the price was not simply «wired» into the calculator.
Changing parameters → selecting up-to-date data from the price list → recalculating → updating the total cost.
Ready-made configurations
So that the user does not have to figure out all the characteristics of the materials on their own, we have implemented ready-made configurations.:
Basic / Standard / Premium.
When choosing a configuration, the parameters of the components and the corresponding prices are automatically changed.
At the same time, the user is not limited to the ready-made option.
He can select, for example, the «Standard» configuration, and then independently change a separate parameter. The calculator will then recalculate the cost.
The result is a two-level scenario:
ready-made configuration for quick calculation → the possibility of detailed settings for accurate calculation.

Calculation of delivery
Delivery became a separate task.
The cost depends on the distance between the warehouse and the installation address. That’s why we integrated the calculation with the Yandex.Maps API.
The user specifies the address, the system determines the distance, and then the shipping cost is automatically included in the overall calculation.
At the development stage, it was this part that required additional debugging: when trying to simultaneously receive the necessary data from the API, there were problems with processing the route cost value.
As a result, we managed to implement the full scenario.:
address → distance → shipping cost → total amount.
Automatic discount
The system also takes into account the discount depending on the cost of materials.
When a certain amount is reached, the calculator automatically applies the appropriate discount percentage and shows the user the total cost, taking it into account.
In other words, the manager no longer needs to check the discount conditions separately and recalculate the order manually.
PDF calculation generation
We’ve added another important scenario that wasn’t just in the original calculation problem.
The user can receive a ready-made PDF with the calculation results.
The document is automatically generated based on the selected parameters and contains:
- calculated materials;
- cost of work;
- delivery;
- a discount;
- the total cost;
- parameters of the future fence.
At the same time, the PDF is available after sending the application.
The user fills out the contact form, after which:
The application → is automatically transferred to CRM → the calculation is saved → the PDF becomes available to the user.
Thus, the calculator performs two functions simultaneously.:
calculation tool + lead generation tool.
The manager receives not just a potential client’s phone number, but his saved calculation, with which he can continue working.
Result
Instead of a complex system of formulas from documents and tables, a full-fledged interactive tool has appeared directly on the website.
The user can independently:
- select fence parameters;
- select a ready-made configuration;
- change individual characteristics;
- see the current cost of materials;
- calculate the cost of the work;
- specify the address and receive the shipping cost;
- see the discount applied;
- send a request;
- get a detailed PDF with the calculation results.
At the same time, all the logic works directly inside the existing 1C-Bitrix site.
This project shows well that a calculator is not just a set of fields and an addition formula.
We have taken a real commercial calculation method, a large number of dependent parameters and price lists and turned them into an automated digital tool.
Moreover, the result of the calculation is not just a number on the screen.
The user receives a ready—made calculation and PDF, and the company receives a qualified lead with saved order parameters.
That is why the calculator has become part of the sales process, and not just an additional feature of the website.