Macrosymbols are a form of time saver when creating Perlshop catalog pages. They are symbolic names that are later expanded by Perlshop into complete values. The list below shows the names of these macrosymbols, and provides examples of how they are used.
!ORDERID!
This symbol is replaced with the current value of the ORDERID parameter.
Example of use:
Use !ORDERID! in a hidden input field used with adding an item to a cart.
<input type="hidden" name="order_id" value="!ORDERID!"/>
See the document entitled
Creating your Catalog Pages
for a more complete example using this symbol.
Note: This macrosymbol has existed since Perlshop 3.
!SEARCH!
This symbol is replaced with a complete URL for your site's Perlshop Search
page.
Example of use:
Use this symbol when building a hyperlink that leads to your Search page.
The link will include the complete URL, the action parameter, and the order id
parameter.
Using this code in your catalog page:
<a href="!SEARCH!">Search</a>
Will result in this HTML in the customer's browser:
<a href="http://www.yourdomain.com/cgi-bin/perlshop.cgi?action=search&order_id=12345678&>Search</a>
Note: This macrosymbol is supported in Perlshop versions 4.5.00
and later.
!THISPAGE!
This symbol is replaced with the current value of the THISPAGE parameter.
Example of use:
Use !THISPAGE! in a hidden input field used with a form that connects one
catalog page with another.
<input type="hidden" name="thispage" value="!THISPAGE!"/>
Note: This macrosymbol is supported in Perlshop versions 4.5.00
and later.
!VIEWCART!
This symbol is replaced with a complete URL for your site's Perlshop View
Cart page.
Example of use:
Use this symbol when building a hyperlink that leads to your View Cart page.
The link will include the complete URL, the action parameter, and the order id
parameter.
Using this code in your catalog page:
<a href="!VIEWCART!">View Cart</a>
Will result in this HTML in the customer's browser:
<a href="http://www.yourdomain.com/cgi-bin/perlshop.cgi?action=view+cart&order_id=12345678&">View Cart</a>
Note: This macrosymbol is supported in Perlshop versions 4.5.00
and later.
!MYURL!
This symbol will be replaced with the value of the $cgi_prog_location setting from your ps.cfg file.
You can use this symbol to save time when creating HTML hyperlinks or form URLs.
See the document entitled
Creating your Catalog Pages
for a more complete example using this symbol.
Note: This macrosymbol has existed since Perlshop 3.
!MYWWW!
This symbol will be replaced with the value of the $server_address setting from your ps.cfg file.
You can use this symbol to save time when creating HTML hyperlinks or form URLs.
See the document entitled
Creating your Catalog Pages
for a more complete example using this symbol.
Note: This macrosymbol has existed since Perlshop 3.