Various forms of product order on the OpenCart product page

Читаючи статтю "Various forms of product order on the OpenCart product page", зверніть увагу на основні наші послуги створення інтернет магазину, сайт візитка. Дивіться усі наші - Ціни на створення сайту. Ми також робимо рекламу та розкрутку сайтів. Робіть замовлення сьогодні!
We make different forms of product order on the OpenCart 3 product page.
The first form of the order, calculated on the order of calculation of the cost. Depending on the number of meters and today’s price.

The second form is the usual order form that displays the shopping cart.

In the first version, the layout of the quick order was used. Which was already in the site template.
Various forms of product order
The “upc” field was selected to separate the products.
If there is an entry with the number 1 in the “upc” field, the first option is displayed, if it is not, the second option is displayed. The category page also disables the display of the price and the buy button.
Files that were edited (except style files). /catalog/controller/product/category.php here added the line of code ‘upc’ => $result[‘upc’], after ‘name’ => $result[‘name’], Next in the file /catalog/view/theme /theme_name/template/product/category.twig in the desired city was added {% if product.upc == ‘1’ %} the first output code that is required {% else %} the second output code that is required {% endif %} like this the display of the buy button and the price of the product for which it is not necessary was hidden. The term ‘upc’ => $product_info[‘upc’] was added to the file /catalog/controller/product/product.php, after ‘price’ => $price. And then in the file /catalog/view/theme/ theme_name /template/product/product.twig in the desired city was added {% if upc == ‘1’ %} one order output block required {% else %} second output code that {% endif %} is required. In this way, what you see in the photo turned out.
You can use any field except “upc”. The “upc” field itself can be edited both in the product itself and with the mass editing module, thus switching almost all the required products to the second order method.