122 lines
6.4 KiB
Smarty
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><tags></p>
|
|
<p>{' '|str_repeat:4}<<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:pink">attrValue1</span>"><span style="color:red">10</span></tagName></p>
|
|
<p>{' '|str_repeat:4}<<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:green">attrValue2</span>"><span style="color:orange">20</span></tagName></p>
|
|
<p>{' '|str_repeat:4}<<span style="color:darkmagenta">tagName</span> <span style="color:blue">attrName</span>="<span style="color:turquoise">attrValue3</span>"><span style="color:hotpink">30</span></tagName></p>
|
|
<p></tags></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'} (<tagName attrName="attrValue1">10</tagName><tagName attrName="attrValue2">20</tagName><tagName attrName="attrValue3">30</tagName>)</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> |