Catalog site
Сайт-каталог — это ваша электронная витрина, каталог товаров в сети интернет. На страницах сайта-каталога посетители могут посмотреть внешний вид предлагаемых вами товаров, часто — в нескольких ракурсах, узнать их характеристики, прочитать об особенностях использования. Сайт-каталог помогает продажам ваших товаров, а иногда и осуществляет их непосредственно.
Виды сайта-каталога:
1)Информационный каталог
Online store
As practice shows, half of Russia’s population regularly shops in online stores. Initially, there was some skepticism toward them, but today online shopping is a perfectly normal phenomenon that no longer surprises anyone.
What should be in an online store
1. Product Categories.
First of all, you need to think through what product categories you will have. This determines the structure of your website — whether you'll need a catalog with category pages or just a few categories without subcategories. Aim to have no more than 200 products per category, and create subcategories so users can quickly find what they need. If you have a lot of products but don’t want to create subcategories, then consider using Filters (see section H).
If you’ll have many categories, the Taxonomy Manager will help:
Social networks
Social networks, as excellent tools for communication and connecting people, are becoming increasingly popular. With their help, users not only find old friends but also make new ones.
Creating a social network is not an easy task. However, CMS Drupal allows for the creation of large-scale projects with high traffic. Drupal is built to handle heavy loads and is not limited in scalability for your social network. One of my areas of expertise is developing social networks.
Internet auctions
My primary goal is to create an online auction or electronic marketplace. This is my job, my hobby, my business, and my way of life. It's work that I truly enjoy. I build online marketplaces, exchanges, and internet auctions with enthusiasm, a relentless drive for perfection, and even a touch of fanaticism. For Drupal, there is a ready-made solution – the auction module – and I can easily tailor it to meet your specific needs.
Group Buying Website
Group Buying (GB) – is a term that refers to a public invitation by an Organizer for Forum participants to join in a wholesale purchase of certain goods with a slight markup in favor of the Organizer, who incurs the costs of collecting, buying out, and distributing the goods. In other words, it's an organized purchase of goods at wholesale prices.
GB is not a store – it is merely a collective purchase of goods at the manufacturer's price, facilitated by an Organizer who adds a small fee (the organizer's commission).
Snippets
Snippets are small pieces of code—larger than a single variable but not large enough to justify placing them in a separate module. Using PHP code, you can display data directly in a template, access the database, or add a class or ID to a block wherever you need it. Sometimes it's easier to use a snippet than to rely on a module. There are countless such cases, and many snippets are documented in the Drupal documentation:
Views how to remove node duplication when using fields with multiple values
! Legacy Drupal 7 code !
Recently, I displayed a list of companies using Views, and for some reason, Views was showing 1–3 identical entries, which was quite strange. I tried removing filters and sorting options, but it still duplicated entries. The issue turned out to be that the nodes had a date field with multiple values. These company nodes were being duplicated. Below is the solution to my— and possibly your—duplicate entries issue in Views:
htaccess display errors off
To disable error output on the page, use the following code in the .htaccess
file:
# suppress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0
Insert block into any template (drupal insert block into template)
Drupal 8
In a Twig template, you can't call PHP code directly, so you need to pass a ready-made block into the template. If you need to pass a variable into a node template, you can use the themename_preprocess_node()
function in your theme. For the page template, use themename_preprocess_page()
. Pass the variable to the Twig template, and then output it there.