Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What are the options for options
When using shopp() tags with dot notation, the options are the second argument

shopp('', 'options');

otherwise it will be the third argument

shopp('Object', 'property', 'options');

Options come in pairs

There is a name and a value for every option, for example
shopp('product.coverimage', 'alt=My Image' );

In this case, the name of the option is 'alt', the value is 'My Image'.

Multiple options

Most shopp() tags have multiple options you can set. To combine options you use the &-sign.
shopp('product.coverimage', 'alt=My Image&size=300' );

All the option name-value pairs combined, are within one pair of single quotes, no matter how many options you set.

Using variables in options

To make options even more flexible, you can also use variables to set the value.
$size = 300;
shopp('product.coverimage', "alt=My Image&size=$size" );

Pay attention to the quotes, when you use variables you need to use double quotes.

Forum Jump:

Users browsing this thread: 2 Guest(s)