myshop-eval:
Entity | Value |
---|---|
Attribute(s) | style, href, title, alt, value, name, onclick |
Type | value |
Relation | document |
The myShop additions evaluation is used to evaluate an expression. The expression makes it possible to combine the value of different functions and variables into one single value, which can be presented. Therefore the myShop addition is always used in combination with a myShop variable and/or function – see reference list: variables for an overview – .
By using the evaluation addition it is quite easy to enter the shop’s NAW data in the product list. In the example below the shop’s NAW data have been put on the bottom of the product list.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Productlist example</title>
</head>
<body>
<table style="myshop-block:productlist" border="1">
<thead>
<tr>
<td style="myshop-label:1;font-weight:bold"></td>
<td style="myshop-label:2;font-weight:bold"></td>
<td style="myshop-label:3;font-weight:bold"></td>
</tr>
</thead>
<tbody>
<tr style="myshop-block:product">
<td style="myshop-value:1;color:red"></td>
<td style="myshop-value:2"></td>
<td style="myshop-value:3"></td>
</tr>
</tbody>
</table>
<table style="font-size: 8" width="100%">
<tr>
<td>
<a href="myshop-eval:{$WebSiteURL}">
<span style="myshop-eval:{$WebSiteURL}"></span>
</a> tel.<span style="myshop-eval:{$PhoneNumber}"/>
</td>
</tr>
</table>
</body>
</html>
The evaluation additions can also be used within a product’s scope in order to make a link based on product information for instance. In the next example the value of field 7 has been incorporated into the subject of the email. The subject is automatically inserted when the link is clicked on.
<table style="myshop-block:product" border="1">
<tr>
<td style="myshop-value:1;font-weight:bold"/>
<td>
<a href="myshop-eval:mailto:vraag@mijndomein.nl?subject=offerte{ 7 }">offerte</a>
</td>
</tr>
</table>
Post your comment on this topic.