W
W
Weltmeister2017-07-11 18:56:10
CMS
Weltmeister, 2017-07-11 18:56:10

How to display the description of categories in the catalog on the Drupal+Ubercart website?

Good evening. Site on Drupal 7.51 in conjunction with Ubercart. Text descriptions are set for product categories in the catalog. But they are not displayed on the site in the catalog (although for some reason these texts are visible in the tooltips of menu items (attribute title="" ).
Actually, the question is: how to display these text descriptions on the pages of the catalog, in those sections for which they are registered ?And cut them off the menu along the way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Weltmeister, 2017-07-11
@Weltmeister

In general, I dug a little in the admin panel and solved the problem on my own. Perhaps someone will come in handy.
I did this:
1. In the views (Views) I selected "Catalogue", added the "Global Text Area" to the footer of the directory
2. In the PHP code mode, I inserted the following structure:

<?php if (!isset($_GET['page'])) {
$category = taxonomy_term_load(arg(2));
echo "{$category->description}";
} ?>

3. In order to remove this description from the title of menu items, it is enough to uncheck "Add description for terms" in editing the catalog dictionary.
Everything works as it should: in the admin panel, we set descriptions for the categories of the catalog, we see them on the corresponding pages. To design a block to help CSS, well, this is for each site individually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question