Skip to main content
Product data is normally only available where the shop has already loaded a product, that is on the product detail view and in product lists. With the PR-AdvData() bracket, you fetch a specific product onto any other template, for example a promotional product onto the home page or an article onto an information page.

Basic principle

Inside the bracket, the specified product counts as the active product. All product data tags therefore behave exactly as they do on the product detail view.
As an argument, you pass the product index. It is automatically assigned by the WSPManager or by the connected ERP system.
If no product exists for the given index, the bracket outputs nothing. You therefore need no additional safeguard for deleted or not yet imported products. Conversely, this means: if the area remains empty, check the index first.
The content of the bracket is treated as a single product, not as a list. A {@PR-Data} loop is therefore neither necessary nor possible. Reference: PR-AdvData()

Taking the product index from a tag

Instead of a fixed value, you can take the value from another tag. Enclose the tag in $ signs, and the shop resolves it before the product search.
In this notation, the resolved value is searched for as a product number, not as a product index. Both values are only identical if your ERP system assigns them the same way.

Load a product via product number or an alternative number

PR-AdvData() only knows the product index. If you have the product number or one of the alternative numbers instead, use PR-LoadData(). The bracket otherwise works identically, but expects a second argument that specifies the type of the entry.
Optionally, a third argument follows with the category index. Without this specification, the shop determines the product’s category itself. Here too, all arguments can be taken from other tags via $ signs. Reference: PR-LoadData()
When the product is loaded via a product number or an alternative number, the shop additionally loads the associated dependent variant. You thereby directly get the specific version and not the base product.
  • Guide: Displaying the selected product