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.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.
{@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.
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.
Related topics
- Guide: Displaying the selected product
