# Plugin : Dj-Catalog 2

## Description <a href="#description" id="description"></a>

This plugin enables you to insert products (one by one or by a selection on one or several categories) from Dj-Catalog 2 in your Newsletters.

You can also use this plugin to automatically include your newly created (or modified) products in an Auto-newsletter.

You can search in all your Dj-Catalog 2 products and then click on one of the products to include it in your Newsletter.

If you purchased at least one commercial version of AcyMailing, you can download the Dj-Catalog 2 plugin on our plugins section then install and publish it like a standard Joomla plugin.

Your products will look like this in your newsletter :

![](/files/-MJgIqbjAw1aIj-ywiXB)

## Plugin <a href="#plugin" id="plugin"></a>

### Single Product <a href="#single-product" id="single-product"></a>

![](/files/-MJgIt-DuxmFWVMCOZgz)

You can use this interface to insert any Dj-Catalog 2 product in your Newsletter.

Each product can be selected one by one.

* **Display**: select the information to display with the product
* **Custom fields**: select the custom fields you want to be displayed after the product fields
* **Clickable Title**: make your title clickable (so linked to your online version) or not.
* **Read More**: add a "read more" link at the end of the product (so linked to your online version)
* **Display pictures**: you can decide to display or not the main picture of the product.
* **Truncate the text after...**: it will truncate the product description, keep "0" or empty if you do not want to truncate it
* Additional parameters:
  * **itemid**: it will add the specified itemid in the links

### Categories <a href="#categories" id="categories"></a>

![](/files/-MJgIvXw1vuFSr3c-uNa)

You can select one or several Dj-Catalog 2 categories and AcyMailing will automatically include the products belonging to the selected categories.

* **Max. Number of items**: The inserted tag will be replaced by a maximum of X products.
* **Min. Number of items**: This option will only be displayed if you access this plugin for a Smart-Newsletter. AcyMailing will only generates your Smart-Newsletter if the minimum number of products found is reached.
* **Filter**: This option will only be displayed if you access this plugin for a Smart-Newsletter. You can set a rule so that only newly created or modified products are added to your Newsletter.
* **Order by**: order the products by ID, title, etc...
* **Columns**: display the products in one, two or more columns
* Additional parameters:
  * additionalcats: If you add this hidden parameter, Acy will search also in the additional categories and not only the main one. Simply add "|additionalcats" in the generated tag.

## Parameters <a href="#parameters" id="parameters"></a>

![](/files/-MJgIyElojDoYR0I6W1v)

* **Display content**: This parameter enables you to filter the list of Dj-Catalog 2 products in the tag system
  * **All content**: AcyMailing will display all your Dj-Catalog 2 products
  * **Only published content**: AcyMailing will only display your published products

## Customize your Dj-Catalog 2 product template <a href="#customize-your-dj-catalog-2-product-template" id="customize-your-dj-catalog-2-product-template"></a>

### Customize your product using some CSS <a href="#customize-your-product-using-some-css" id="customize-your-product-using-some-css"></a>

You can change the styles used for the title and the content area by editing your AcyMailing template.

Edit the AcyMailing template used for your Newsletter and then set some styles:

> * **Style for the content area** will be used to encompass your product
> * **Style for the content title** will be applied to your product title
> * **Style for the read more link** will be applied to your read more link (if you have one)
> * You can also set the style of all your links using the **Link a** field

![](/files/-MJgJ-AxEmvhdW3ziUZx)

Set styles template

### Create your own template <a href="#create-your-own-template" id="create-your-own-template"></a>

You can also modify the way your Dj-Catalog 2 product is displayed by creating your own template which will be used to render the product. Please follow those instructions, we don't recommend you to modify the Dj-Catalog 2 plugin directly otherwise your changes will be overwritten when you update the plugin.

Create a file in the the folder **media** / **com\_acymailing** / **plugins** (if the folder does not exist, please create it first). The name of the file should be **djcatalog2.php** If this file is available on your server, AcyMailing will use it and won't use the default one.

On this file you can access the element **$varFields** (which contains all the product information), the element **$tag** (which contains the information of the current tag used in your Newsletter) and **$link** (the product link)

You can insert the product information using this simple syntax : {name}, {description}, or {link}

&#x20;Using all those variables, you can create your own product template.

> Here is an example:

> ```
> <div class="acymailing_content">
>     <a href="{link}" target="_blank" >
>         <h2 class="acymailing_title">{name}</h2>
>     </a>
>     <a href="{link}" target="_blank" style="text-decoration:none" >
>         <img src="{image}"/>
>     </a>
>     {description}
>     Price: {price}
> </div>
> ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acymailing.com/old/integration-plugins/content-management/plugin-dj-catalog-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
