Last Updated a year ago

How to display products in an entry?

We can add products in an entry in two ways:
  • by using a simple wizard
  • by placing a hook with products in the content of the entry

Adding products using the wizard

Using the wizard, the products will be displayed at the beginning of the entry.

When adding or editing an entry, we go to the "Products in the entry" tab:

image


In "Add Products" option, we can choose whether to add products randomly or whether we want to select them manually:

image


The next step is to enter a limit, which is the maximum number of products that will be displayed in the entry:

image


If you select for the option "Add products" - "Random from category", select the category from which the products will be selected:

image


If for the option "Add products" we selected "Select manually", we must add them ourselves by entering their name or code:

image


Adding products using hook

By using hook, we can add products in the content of an entry anywhere.

To do this, when adding / editing an entry, we go to the "Entry content" tab:

image


In the entry content, we add a tag at the place where we want to display the products. We can use the tag any number of times

image


{hook h='pShowBlogGetProducts' mod='pshowblog' limit='4' products='1,2,3,4'}

This tag has 3 optional variables:
limit - Maximum number of products to display.
categories - Category IDs. You can add multiple category IDs separated by commas. Products from these categories will be displayed randomly.
products - Product identifiers. You can add multiple product IDs separated by commas.
If you use the categories variable, the products variable will be omitted.

Please Wait!

Please wait... it will take a second!

Kliknij by skopiować