Why should the project be transferred to bitrix. Transferring content to Bitrix infoblocks. Discounts on licenses

  • 06.05.2020

Stanislav Shashalevich

The time has come when business owners do not need to explain why they need a website or an online store. Now they absorb it on their own at the stage of business formation. It's time to explain to the client: what CMS is the platform better suited to his business? And it is much more difficult to explain this, when the client already has a project on his platform, then convincing him of the need to switch to another platform is a very difficult task. But, in our opinion, with the platform 1C-Bitrix this task is much easier to solve than with other e-commerce platforms.

Therefore, we invite you to consider 10 reasons why you need to switch to 1C-Bitrix.


1. 1C integration

This is one of the most pleasant "goodies" of the 1C-Bitrix platform. In 2007 Bitrix established a joint venture with "1C""1C-Bitrix". In our opinion, it is this fact that has given the active development of this platform. A new era has come when 1C integration has turned from a complex task into a clear scheme of simple actions.

On the Internet, you can find "horror stories" in which integration into Bitrix is ​​presented as something complicated and expensive. In fact, such “horror stories” are invented by those who do not know very well all the nuances of integration and 1C itself. Integration problems can only occur in the following cases:

  • The site template was developed without understanding the features 1C integration
  • 1C itself is already well sawn
  • Low qualification of developers
If we have a standard site from 1C-Bitrix and standard 1C, then there should not be any problems with integration. The uniqueness and complexity of your internal business processes adds complexity to 1C integration. But it's not the fault Bitrix are the characteristics of your company.

And as proof of our innocence, we provide a video tutorial in which our experts show how to make integration with1COnly for30 minutes. And no tricks. Only facts!

2. CRM integration

If a 1C-integration no longer surprise anyone and this is a mandatory functionality of any e-commerce systems, then CRM integration is just gaining momentum. But here too Bitrix trying to be ahead of everyone.

In the box 1C-Bitrix there is already a standard functionality for synchronizing data with CRM Bitrix24. This allows the sales team to work more efficiently with leads, deals, and new contacts. Right out of the box, you get a ready-made sales tool.

A very topical topic at the moment, which, moreover, is the main argument for transferring the project to Bitrix already in 2017.

With February 1, 2017 of the year cash register equipment should send electronic versions checks to the fiscal data operator - the new rules are established in 54-FZ, article 2, paragraph 2.

The law will come into full force July 1, 2017. Every online store must have cash register(KKT), connected to the Internet and connected to the operator of fiscal data (OFD).

What does this mean? If a in simple words, then with July 1, 2017 years for each order paid online (not against an invoice) through your online store, you need to knock out KKM check, add it to the site database, send it to in electronic format the buyer, and even a lot of data to immediately provide to the tax office. And all this takes all 5 minutes otherwise you will be fined.

How do you like this problem? In our opinion, it is very nontrivial. What we like about Bitrix is that it responds promptly to all market changes. He does not dwell on the idealization of his product, but simply measures the pulse of all the components e-commerce and responds instantly.

Here and here 1C-Bitrix promptly responded and immediately implemented functionality that satisfies all requirements 54-FZ. As far as we know, at the moment Bitrix is ​​testing the link on its own site: online store - cash register - tax authorities. Therefore, to July 1 we will be fully armed with Bitrix.

We believe that this is a very weighty argument for transferring the project to the platform 1C-Bitrix exactly at 2017- full compliance 54-FZ. We think that in this regard there will be problems for many paid e-commerce platforms, not to mention free ones. The business owner will simply need to pay attention to 1C-Bitrix to securely close the issue with 54-FZ.

4. Marketing tools

We've all heard about marketing skills. 1C-Bitrix. Someone, quietly envious, says that this is the main component of the success of this company. But let's not envy, but just learn from experience Bitrix. Fortunately, the company itself 1C-Bitrix gladly shares all his tools directly in the platform itself.

Now we will tell you about the most interesting, as it seems to us, marketing tools, which will add points in favor of making a decision to transfer the project to Bitrix:

  • email marketing. Will allow you to work with customers in automatic mode through mailing lists. Already prepared scripts for chains of trigger emails motivate the client to return to the site and place new orders.
  • Commodity marketing. Motivating customers with promotions and discounts has always had a positive effect. And Bitrix offers flexible configuration options to be able to influence each user group.
But marketing from Bitrix are not just tools sewn into a box. This is a set of materials aimed at improving the client's education in online sales. This is a set of systematic actions that will help your store gain momentum.

5. SEO Tools

SEO- was, is and will be an important tool for attracting traffic to the site. We, as developers of our own SEO solutions, we pay special attention to this.

Unfortunately until 2013 SEO platform component 1C-Bitrix was very underdeveloped. It was not possible to flexibly generate regular meta tags, let alone more complex tasks. But since version 14 Bitrix everything has changed. Now SEO platform tools include:

  • Meta tag templates
  • Smart sitemap generation
  • Robots.txt generation
  • Sending unique text to Yandex
  • And much more
Now we can say with confidence that the platform 1C-Bitrix will be a great help for SEO Specialist.

big data- it is now not only fashionable, but also necessary. The buyer will no longer appreciate just an offer to purchase goods in an online store. The buyer will appreciate if the store offers exactly what he needs. That's what these services are for.

Company Bitrix and reacted promptly in this direction and launched its own cloud service "1C-Bitrix BigData". This allows you to make personal offers to the client, that is, by analyzing his behavioral actions according to certain algorithms, to offer the goods he needs. The withdrawal of personal goods can occur both in the public part of the site and in mailing lists.

Please note that a similar service from Bitrix will not only increase your sales, but also have a positive effect on increasing loyalty to your online store.

7. Affiliate network

Affiliate network is what makes it grow 1C-Bitrix. Now there are more than 13,000 partners in the network. And every day there are more and more of them.

What does such an extensive network give a business?

Firstly, you get the opportunity to select a developer according to the following parameters:

  • Project's budget
  • Qualification and expertise of the developer
  • Regionality
Secondly, there is no link to a specific developer, who, due to the self-written system, allows you to dictate your terms. The affiliate network removes such restrictions and makes your project alienable, that is, virtually any partner can accept it 1C-Bitrix.

As for the choice of a direct partner, in our opinion, this is the most important and responsible stage. It depends on him how your project will turn out. Bitrix, of course, is trying to somehow filter and find suitable developers for you, but, as we think, so far this has not always worked out well. Same status "Gold Partner" does not give any guarantees to your project. After all, as we believe, the entry threshold for obtaining this status is too low and it would be worth raising it.

Although this is not the topic of the current article, nevertheless, based on the above, we can give you a couple of recommendations:

  • Partner cases. Carefully familiarize yourself with the projects that the developer has already implemented, similar in theme to yours. Ask clarifying questions about cases. Do not be shy.
  • Expertise. Be sure to check the qualifications of the partner. Testing starts with the first touch. With competent clarifying questions, the partner will reveal your project, and with his convincing answers to questions, he will break all your doubts.
In details this topic we will try to reveal in the following articles. The problem is very important. After all, often because of unscrupulous partners, all the negative spills out to the side. Bitrix. In order to somehow justify themselves, alleged flaws and omissions of the platform itself are invented. The whole community suffers from such partners 1C-Bitrix. It is after such developers that the owners of online stores do not want to work with Bitrix generally.

8. E-commerce platform #1

Paradoxically, this is the simplest and most important argument in favor of switching to Bitrix.



From the graph, it can be seen that about 60% of the market commercial CMS now occupied by the company 1C-Bitrix. And 6 out of 10 are unlikely to be wrong. They made their choice by carefully analyzing all the pros and cons of the product. Now it is much easier for you to make the right decision by following their example.

I would like to wish Bitrix so that he does not stop there and tries not only to maintain the current market share, but also to increase it. And there is room to grow: 40% of the commercial CMS + market free systems. 1C-Bitrix simply obliged to create such conditions and such a platform that you just want to switch to.

9. 1C-Bitrix.Marketplace

We decided to save the best for later. Creating your own sales platform Marketplace in 2011 opened before 1C-Bitrix new opportunities. After all, thanks to this step, popularization Bitrix has increased both among developers and directly among online sales participants. And there are several reasons for this:

  • Typical solutions - Quick start of sales. After launch 1 With-Bitrix.Marketplace there was a big boom in standard template solutions. Thanks to this, clients really launched online stores from several days to weeks, instead of many months and expensive projects from scratch. This allowed them to quickly gain experience in online sales and have a more conscious and professional attitude towards the development of their project.
  • Increasing the functionality of 1C-Bitrix. Now what he can't do himself Bitrix are made by his partners. This expands the possibilities of the platform and makes them almost limitless.
  • Raising the qualifications of developers.The site opened up new opportunities directly for performers. Thus, it contributed to the growth of qualification of technical specialists in the development of solutions for 1C-Bitrix.
Now Marketplace everything is also replete with ready-made solutions and modules. However, the quality of many of them leaves much to be desired. So we can give you one for free. helpful advice: before purchasing a solution, be sure to test its operation on your project. Make sure the module has demo mode. If there is no such mode, then ask the developer for the opportunity to test his solution. Personally, we don't even consider products that don't have demo mode. We recommend the same to all our clients. There is no desire to acquire a "pig in a poke". The owner of an online store needs to: ignite, interest and convince. BUT demo mode- just the tool that can do it.

10. Constant development and updates

As mentioned above, 1C-Bitrix carefully monitors all trends and changes e-commerce market. You get not just a product that is relevant only for today, as it happens with self-written CMS– you get a constantly evolving platform.

When you get a year of free updates. This means that during this time your project will always be up to date. And if you purchase 1C-Bitrix products through us, then you also receive bonuses in the amount of 20% of the order amount, which you can spend on purchasing our modules.

I would like to note that the Bitrix there is a certain rule, which is already long time not broken: two global update releases per year. This means that specific dates and deadlines for the implementation of these updates are already set in advance. On the appointed dates, the presentation of the release is carried out, and immediately after that, its systematic implementation. This model of work is very effective. It motivates the development department to get rid of code idealization and helps to quickly deliver results directly to the owner of the online store.

Here, it seems, we can stop. Total 10 reasons but every reason Bitrix"suffered". Each reason has stood the test of time, failed experiments, failed hypotheses. We hope that 1C-Bitrix will give us new reasons to work on this particular platform.

For all the time of my work with Bitrix, I had a chance to work with a very large number of projects that someone developed before me. Here are minor improvements, fixing various bugs and errors in the operation of logic, redesigning the site and global changes in existing functionality. And, like any other developer, I hate to sort out other people's garbage, crutches and "temporary" patches that actually remember the 8th edition of the product.

Here I will try not to focus on the standard “worst practices” when programming in PHP, such as not giving a damn about the choice of variable and function names, unnecessary queries to the database in a loop, lack of validation of user data in forms, ignoring comments, and the like. I will try to touch on exactly the moments inherent in the development on Bitrix, which later will allow you to avoid indignation and curses against you from the programmer who had to accompany your code. And yes, often you yourself will turn out to be this programmer in a year or more, when you have completely forgotten why you inserted this or that crutch here.

“Write code as if it were accompanied by a violent psychopath who knows where you live” (c) John F. Woods

First, and most, in my opinion, the most important - for heaven's sake, use the local folder. This is simply vital when using the version control system - all you need is to add the /bitrix/ folder to the exclusions. Everything. Further, almost all development is carried out only in it. This greatly simplifies the search for the necessary files and components later, helps not to clog the repository with unnecessary files, and in general - brings the project tree into a neater, “human” look.

Do not modify the kernel. Even if you are sure that it will not be updated. Even if it's faster. Even if you are lazy. Forget this thought, like a bad dream. If you need to change the logic of a standard component, move it to a new namespace /local/components/modify/ and work with it. The same goes for modules, gadgets, and business process activities.

Do not pollute the init.php file. Combine functions for working with a specific module or functionality into a class, write this entire class into a separate file, and in init.php just include these files and write event handlers. I have seen init.php files of 500Kb each, where functions, constant definitions, classes, and initialization of handlers were mixed into a mess. Of course, when I had to deal with these files, I cursed my predecessors.

The next point does not apply to the development case ready-made solutions for the Marketplace, when the goal is to make the most customizable functionality from the public part for the end user. If you are working on a specific project, for a specific TOR - you should not try to make a unified template for a component for all occasions. Personally, I adhere to the philosophy - it is better to have several simple templates used for different purposes than one universal one, but in which the devil himself will break his leg later. Of course, in each specific case, you need to build on what is - the terms of reference, implementation options, and the like, but some use Occam's Razor too zealously. As an example, I will give one project of a leasing company that I happened to edit. The project itself, of course, was implemented terribly, the real horror was in the pages of the service catalog section. Each of the five sections had its own layout, which differed both in the position of the blocks on the page and, in principle, the presence of some of them. And for all five pages, one template was used with a bunch of if-else, duplicating component calls, connecting styles and scripts, which, moreover, periodically conflicted with each other. As a result, a huge file, in which it was like death to understand “without half a liter”. Although, it would seem, what prevented you from making 5 different templates and not creating difficulties out of the blue?

Use the API. Don't reinvent the wheel where it's not needed. Use the documentation - the whole product is quite well described, as well as each function can be viewed in detail on bxapi.ru.

Avoid direct database queries. This is special case the previous paragraph - use the API. Rough, unsecured requests can lead to data corruption, loss, or even compromise.

Do not use CNC components from the site root. The consequences are usually quite unfortunate, since the CNC uses an address handler file, trying to use it from the root easily breaks you the addressing of other components, as well as 404 pages. It won't hurt anything if your articles are addressed relative to the /articles/ folder, and products relative to /catalog/.

Include css and js using the API. Until now, everywhere I meet the connection of scripts and styles using tags



For all the time of my work with Bitrix, I had a chance to work with a very large number of projects that someone developed before me. Here are minor improvements, fixing various bugs and errors in the operation of logic, redesigning the site and global changes in existing functionality. And, like any other developer, I hate to sort out other people's garbage, crutches and "temporary" patches that actually remember the 8th edition of the product.

Here I will try not to focus on the standard “worst practices” when programming in PHP, such as not giving a damn about the choice of variable and function names, unnecessary queries to the database in a loop, lack of validation of user data in forms, ignoring comments, and the like. I will try to touch on exactly the moments inherent in the development on Bitrix, which later will allow you to avoid indignation and curses against you from the programmer who had to accompany your code. And yes, often you yourself will turn out to be this programmer in a year or more, when you have completely forgotten why you inserted this or that crutch here.

“Write code as if it were accompanied by a violent psychopath who knows where you live” (c) John F. Woods
First, and most, in my opinion, the most important - for heaven's sake, use the local folder. This is simply vital when using the version control system - all you need is to add the /bitrix/ folder to the exclusions. Everything. Further, almost all development is carried out only in it. This greatly simplifies the search for the necessary files and components later, helps not to clog the repository with unnecessary files, and in general - brings the project tree into a neater, “human” look.

Do not modify the kernel. Even if you are sure that it will not be updated. Even if it's faster. Even if you are lazy. Forget this thought, like a bad dream. If you need to change the logic of a standard component, move it to a new namespace /local/components/modify/ and work with it. The same goes for modules, gadgets, and business process activities.

Do not pollute the init.php file. Combine functions for working with a specific module or functionality into a class, write this entire class into a separate file, and in init.php just include these files and write event handlers. I have seen init.php files of 500Kb each, where functions, constant definitions, classes, and initialization of handlers were mixed into a mess. Of course, when I had to deal with these files, I cursed my predecessors.

The next paragraph does not apply to the case of developing ready-made solutions for the Marketplace, when the goal is to make the most customizable functionality from the public part for the end user. If you are working on a specific project, for a specific TOR - you should not try to make a unified template for a component for all occasions. Personally, I adhere to the philosophy - it is better to have several simple templates used for different purposes than one universal one, but in which the devil himself will break his leg later. Of course, in each specific case, you need to build on what is - the terms of reference, implementation options, and the like, but you still should not forget about Occam's Razor. As an example, I will give one project of a leasing company that I happened to edit. The project itself, of course, was implemented terribly, the real horror was in the pages of the service catalog section. Each of the five sections had its own layout, which differed both in the position of the blocks on the page and, in principle, the presence of some of them. And for all five pages, one template was used with a bunch of if-else, duplicating component calls, connecting styles and scripts, which, moreover, periodically conflicted with each other. As a result, a huge file, in which it was like death to understand “without half a liter”. Although, it would seem, what prevented you from making 5 different templates and not creating difficulties out of the blue?

Use the API. Don't reinvent the wheel where it's not needed. Use the documentation - the whole product is quite well described, as well as each function can be viewed in detail on bxapi.ru.

Avoid direct database queries. This is a special case of the previous point - use the API. Rough, unsecured requests can lead to data corruption, loss, or even compromise.

Do not use CNC components from the site root. The consequences are usually quite unfortunate, since the CNC uses an address handler file, trying to use it from the root easily breaks you the addressing of other components, as well as 404 pages. It won't hurt anything if your articles are addressed relative to the /articles/ folder, and products relative to /catalog/.

Include css and js using the API. Until now, everywhere I meet the connection of scripts and styles using html tags. Use the \Bitrix\Main\Page\Asset class object and the addJs() and addCss() functions. This will allow you to merge files and, later, cache them with one click of the checkbox in the settings of the main module

And finally, the error concerns not only Bitrix, but too often I began to encounter problems associated with it. Check for emptiness array with sample results. As an example, the last time I encountered this problem was when working with one online store. Complaint: Pages sometimes take 16 seconds to load. With what it is connected - it is not clear. By trial and error, I found out that pages load indecently for a long time only when the basket is empty. It seemed like why? As it turned out, when hovering over the basket, a pop-up window appeared in which images of the product put in the basket were displayed. So what did the previous developer do? I took the result of the work of the “small basket” component and in the file result_modifier.php made a call to GetList() of products to select images with a filter from the array of product IDs, then added the src of the image from the results of the selection to the array of the corresponding product. As a result, when there were no goods in the basket, the filter went empty, and the ENTIRE catalog of goods fell into the selection. Well, then the cycle for each and ... we have what we have. It is clear that at the development stage, with 15 test products, this was imperceptible, and problems arose already in combat conditions. Although, it would seem that it was worth putting a check on empty($arResult[‘ITEMS’])…

This concludes my personal “worst practice” top regarding Bitrix development. If at least someone this information helps to avoid mistakes in the future and improve their development style, then it was not in vain.

You can help and transfer some funds for the development of the site

For all the time of my work with Bitrix, I had a chance to work with a very large number of projects that someone developed before me. Here are minor improvements, fixing various bugs and errors in the operation of logic, redesigning the site and global changes in existing functionality. And, like any other developer, I hate to sort out other people's garbage, crutches and "temporary" patches that actually remember the 8th edition of the product.

Here I will try not to focus on the standard “worst practices” when programming in PHP, such as not giving a damn about the choice of variable and function names, unnecessary queries to the database in a loop, lack of validation of user data in forms, ignoring comments, and the like. I will try to touch on exactly the moments inherent in the development on Bitrix, which later will allow you to avoid indignation and curses against you from the programmer who had to accompany your code. And yes, often you yourself will turn out to be this programmer in a year or more, when you have completely forgotten why you inserted this or that crutch here.

“Write code as if it were accompanied by a violent psychopath who knows where you live” (c) John F. Woods

First, and most, in my opinion, the most important - for heaven's sake, use the local folder. This is simply vital when using the version control system - all you need is to add the /bitrix/ folder to the exclusions. Everything. Further, almost all development is carried out only in it. This greatly simplifies the search for the necessary files and components later, helps not to clog the repository with unnecessary files, and in general - brings the project tree into a neater, “human” look.

Do not modify the kernel. Even if you are sure that it will not be updated. Even if it's faster. Even if you are lazy. Forget this thought, like a bad dream. If you need to change the logic of a standard component, move it to a new namespace /local/components/modify/ and work with it. The same goes for modules, gadgets, and business process activities.

Do not pollute the init.php file. Combine functions for working with a specific module or functionality into a class, write this entire class into a separate file, and in init.php just include these files and write event handlers. I have seen init.php files of 500Kb each, where functions, constant definitions, classes, and initialization of handlers were mixed into a mess. Of course, when I had to deal with these files, I cursed my predecessors.

The next paragraph does not apply to the case of developing ready-made solutions for the Marketplace, when the goal is to make the most customizable functionality from the public part for the end user. If you are working on a specific project, for a specific TOR - you should not try to make a unified template for a component for all occasions. Personally, I adhere to the philosophy - it is better to have several simple templates used for different purposes than one universal one, but in which the devil himself will break his leg later. Of course, in each specific case, you need to build on what is - the terms of reference, implementation options, and the like, but you still should not forget about Occam's Razor. As an example, I will give one project of a leasing company that I happened to edit. The project itself, of course, was implemented terribly, the real horror was in the pages of the service catalog section. Each of the five sections had its own layout, which differed both in the position of the blocks on the page and, in principle, the presence of some of them. And for all five pages, one template was used with a bunch of if-else, duplicating component calls, connecting styles and scripts, which, moreover, periodically conflicted with each other. As a result, a huge file, in which it was like death to understand “without half a liter”. Although, it would seem, what prevented you from making 5 different templates and not creating difficulties out of the blue?

Use the API. Don't reinvent the wheel where it's not needed. Use the documentation - the whole product is quite well described, as well as each function can be viewed in detail on bxapi.ru.

Avoid direct database queries. This is a special case of the previous point - use the API. Rough, unsecured requests can lead to data corruption, loss, or even compromise.

Do not use CNC components from the site root. The consequences are usually quite unfortunate, since the CNC uses an address handler file, trying to use it from the root easily breaks you the addressing of other components, as well as 404 pages. It won't hurt anything if your articles are addressed relative to the /articles/ folder, and products relative to /catalog/.

Include css and js using the API. Until now, everywhere I meet the connection of scripts and styles using html tags. Use the \Bitrix\Main\Page\Asset class object and the addJs() and addCss() functions. This will allow you to merge files and, later, cache them with one click of the checkbox in the settings of the main module

And finally, the error concerns not only Bitrix, but too often I began to encounter problems associated with it. Check for emptiness array with sample results. As an example, the last time I encountered this problem was when working with one online store. Complaint: Pages sometimes take 16 seconds to load. With what it is connected - it is not clear. By trial and error, I found out that pages load indecently for a long time only when the basket is empty. It seemed like why? As it turned out, when hovering over the basket, a pop-up window appeared in which images of the product put in the basket were displayed. So what did the previous developer do? I took the result of the work of the “small basket” component and in the file result_modifier.php made a call to GetList() of products to select images with a filter from the array of product IDs, then added the src of the image from the results of the selection to the array of the corresponding product. As a result, when there were no goods in the basket, the filter went empty, and the ENTIRE catalog of goods fell into the selection. Well, then the cycle for each and ... we have what we have. It is clear that at the development stage, with 15 test products, this was imperceptible, and problems arose already in combat conditions. Although, it would seem that it was worth putting a check on empty($arResult[‘ITEMS’])…

This concludes my personal “worst practice” top regarding Bitrix development. If at least someone this information helps to avoid mistakes in the future and improve their development style, then it was not in vain.

For all the time of my work with Bitrix, I had a chance to work with a very large number of projects that someone developed before me. Here are minor improvements, fixing various bugs and errors in the operation of logic, redesigning the site and global changes in existing functionality. And, like any other developer, I hate to sort out other people's garbage, crutches and "temporary" patches that actually remember the 8th edition of the product.

Here I will try not to focus on the standard “worst practices” when programming in PHP, such as not giving a damn about the choice of variable and function names, unnecessary queries to the database in a loop, lack of validation of user data in forms, ignoring comments, and the like. I will try to touch on exactly the moments inherent in the development on Bitrix, which later will allow you to avoid indignation and curses against you from the programmer who had to accompany your code. And yes, often you yourself will turn out to be this programmer in a year or more, when you have completely forgotten why you inserted this or that crutch here.

“Write code as if it were accompanied by a violent psychopath who knows where you live.” © John F. Woods

First, and most, in my opinion, the most important - for heaven's sake, use the local folder. This is simply vital when using the version control system - all you need is to add the /bitrix/ folder to the exclusions. Everything. Further, almost all development is carried out only in it. This greatly simplifies the search for the necessary files and components later, helps not to clog the repository with unnecessary files, and in general - brings the project tree into a neater, “human” look.

Do not modify the kernel. Even if you are sure that it will not be updated. Even if it's faster. Even if you are lazy. Forget this thought, like a bad dream. If you need to change the logic of a standard component, move it to a new namespace /local/components/modify/ and work with it. The same goes for modules, gadgets, and business process activities.

Do not pollute the init.php file. Combine functions for working with a specific module or functionality into a class, write this entire class into a separate file, and in init.php just include these files and write event handlers. I have seen init.php files of 500Kb each, where functions, constant definitions, classes, and initialization of handlers were mixed into a mess. Of course, when I had to deal with these files, I cursed my predecessors.

The next paragraph does not apply to the case of developing ready-made solutions for the Marketplace, when the goal is to make the most customizable functionality from the public part for the end user. If you are working on a specific project, for a specific TOR - you should not try to make a unified template for a component for all occasions. Personally, I adhere to the philosophy - it is better to have several simple templates used for different purposes than one universal one, but in which the devil himself will break his leg later. Of course, in each specific case, you need to build on what is - the terms of reference, implementation options, and the like, but you still shouldn't forget about Occam's Razor. As an example, I will give one project of a leasing company that I happened to edit. The project itself, of course, was implemented terribly, the real horror was in the pages of the service catalog section. Each of the five sections had its own layout, which differed both in the position of the blocks on the page and, in principle, the presence of some of them. And for all five pages, one template was used with a bunch of if-else, duplicating component calls, connecting styles and scripts, which, moreover, periodically conflicted with each other. As a result - a huge file, in which to understand "without half a liter" was like death. Although, it would seem, what prevented you from making 5 different templates and not creating difficulties out of the blue?

Use the API. Don't reinvent the wheel where it's not needed. Use the documentation - the whole product is quite well described, as well as each function can be viewed in detail on bxapi.ru.

Avoid direct database queries. This is a special case of the previous point - use the API. Rough, unsecured requests can lead to data corruption, loss, or even compromise.

Do not use CNC components from the site root. The consequences are usually quite unfortunate, since the CNC uses an address handler file, trying to use it from the root easily breaks you the addressing of other components, as well as 404 pages. It won't hurt anything if your articles are addressed relative to the /articles/ folder, and products relative to /catalog/.

Include css and js using the API. Until now, everywhere I meet the connection of scripts and styles using html tags. Use the class object \Bitrix\Main\Page\Asset and addJs() and addCss() functions. This will allow you to merge files and, later, cache them with one click of the checkbox in the settings of the main module

And finally, the error concerns not only Bitrix, but too often I began to encounter problems associated with it. Check for emptiness array with sample results. As an example, the last time I encountered this problem was when working with one online store. Complaint: Pages sometimes take 16 seconds to load. With what it is connected - it is not clear. By trial and error, I found out that pages load indecently for a long time only when the basket is empty. It seemed like why? As it turned out, when hovering over the basket, a pop-up window appeared in which images of the product put in the basket were displayed. So what did the previous developer do? I took the result of the work of the “small basket” component and in the file result_modifier.php made a call to GetList () of goods to select images with a filter from the array of product IDs, then from the results of the selection to the array of the corresponding product added the src of the image. As a result, when there were no goods in the basket, the filter went empty, and the ENTIRE catalog of goods fell into the selection. Well, then the cycle for each and ... we have what we have. It is clear that at the development stage, with 15 test products, this was imperceptible, and problems arose already in combat conditions. Although, it would seem that it was worth putting a check on empty ($arResult["ITEMS"]) ...

This concludes my personal “worst practice” top regarding Bitrix development. If at least someone this information helps to avoid mistakes in the future and improve their development style, then it was not in vain.