Files
interblue.pl/modules/pshowimporter/views/templates/admin/config_matchxmlfields_custommatches.tpl
2024-10-25 14:16:28 +02:00

122 lines
6.4 KiB
Smarty

<div class="alert alert-info">
<h4>{l s='How it works?' mod='pshowimporter'}</h4>
<p>{l s='You can manually specify the path to value from the XML file.' mod='pshowimporter'}</p>
<hr>
<p><strong>{l s='Example of XML' mod='pshowimporter'}:</strong></p>
<p>&lt;tags&gt;</p>
<p>{'&nbsp;'|str_repeat:4}&lt;<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:pink">attrValue1</span>"&gt;<span style="color:red">10</span>&lt;/tagName&gt;</p>
<p>{'&nbsp;'|str_repeat:4}&lt;<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:green">attrValue2</span>"&gt;<span style="color:orange">20</span>&lt;/tagName&gt;</p>
<p>{'&nbsp;'|str_repeat:4}&lt;<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:turquoise">attrValue3</span>"&gt;<span style="color:hotpink">30</span>&lt;/tagName&gt;</p>
<p>&lt;/tags&gt;</p>
<p><strong>{l s='Example of custom matching' mod='pshowimporter'}:</strong></p>
<table class="table">
<thead>
<tr>
<th>Your custom path</th>
<th>Value from example basing on your custom path</th>
</tr>
</thead>
<tbody>
<tr>
<td>tags</td>
<td>{l s='collection' mod='pshowimporter'} (&lt;tagName attrName="attrValue1"&gt;10&lt;/tagName&gt;&lt;tagName attrName="attrValue2"&gt;20&lt;/tagName&gt;&lt;tagName attrName="attrValue3"&gt;30&lt;/tagName&gt;)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span></td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:red">10</span>, <span style="color:orange">20</span>, <span style="color:hotpink">30</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[@<span style="color:blue">attrName</span>="<span style="color:pink">attrValue1</span>"]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:red">10</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[@<span style="color:blue">attrName</span>="<span style="color:green">attrValue2</span>"]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:orange">20</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[@<span style="color:blue">attrName</span>="<span style="color:green">attrValue2</span>"][. < 20]</td>
<td>{l s='collection' mod='pshowimporter'} ()</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[. mod 6 = 0]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:orange">30</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[. < 15]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:red">10</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[. > 10]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:orange">20</span>, <span style="color:hotpink">30</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>/@<span style="color:blue">attrName</span></td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:pink">attrValue1</span>, <span style="color:green">attrValue2</span>, <span style="color:turquoise">attrValue3</span>)</td>
</tr>
<tr>
<td>tags/<span style="color:darkmagenta">tagName</span>[. < 15] | tags/<span style="color:darkmagenta">tagName</span>[. > 20]</td>
<td>{l s='collection' mod='pshowimporter'} (<span style="color:red">10</span>, <span style="color:hotpink">30</span>)</td>
</tr>
</tbody>
</table>
<p>
{l s='More informations in PHP documentation' mod='pshowimporter'}:
<a href="http://php.net/manual/en/simplexmlelement.xpath.php" target="_blank">http://php.net/manual/en/simplexmlelement.xpath.php</a>
</p>
<p>
{l s='and in MSDN' mod='pshowimporter'}:
<a href="https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx" target="_blank">https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx</a>
</p>
<p>
<strong>{l s='Test your custom matches here' mod='pshowimporter'}:</strong>
<a href="http://www.xpathtester.com/xpath" target="_blank">http://www.xpathtester.com/xpath</a>
</p>
</div>
<table class="table table-hover">
<thead>
<tr class="active">
<td class="col-md-6 text-right">
<strong>{l s='Your custom path' mod='pshowimporter'}</strong>
</td>
<td class="col-md-6">
<strong>{l s='PrestaShop field' mod='pshowimporter'}</strong>
</td>
</tr>
</thead>
<tbody>
{for $i=1 to 50}
<tr>
<td class="col-md-5">
<div class="input-group">
<div class="input-group-addon putObjectTagHere"></div>
<input type="text" class="form-control" name="matched[custommatches][{$i}][key]"
{if $config["matched"]["custommatches"][$i]["key"]}value="{$config["matched"]["custommatches"][$i]["key"]}"{/if}>
</div>
</td>
<td class="col-md-5">
{include file="../helpers/config_matchxml_dbfield.tpl" type='custommatches' md5=$i}
</td>
<td class="col-md-2 text-right">
<div class="btn-group-action">
<div class="btn-group pull-right">
<a title="Edit" class="edit btn btn-default fieldSettingsBtn">
<i class="icon-cog"></i> {l s='Show/hide settings' mod='pshowimporter'}
</a>
</div>
</div>
</td>
</tr>
{include file="./config_matchxmlfields_options_fields.tpl" type='custommatches' md5=$i}
{/for}
</tbody>
</table>