xml 示例Miva SearchSpring IntelliSuggest
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 示例Miva SearchSpring IntelliSuggest相关的知识,希望对你有一定的参考价值。
<mvt:comment>
<!--
Create a <mvt:item name="readytheme" param="contentsection( 'intellisuggest' )" /> and populate it with the following content.
It can then be added to the PROD, BASK, and INVC pages to display & track IntelliSuggest product recommmendations
-->
</mvt:comment>
<mvt:assign name="l.settings:searchspring:site_id" value="'abc123'" />
<mvt:if expr="'PROD' CIN l.settings:page:code">
<div class="intellisuggest" name="Product Recommendations"></div>
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
var product_code = "&mvtj:product:code;";
IntelliSuggest.init({
siteId: '&mvt:searchspring:site_id;',
context: 'Product/' + product_code,
seed: [product_code]
});
IntelliSuggest.viewItem({
sku: product_code
});
} catch(err) {}
</script>
<mvt:elseif expr="l.settings:page:code EQ 'BASK'">
<div class="intellisuggest" name="Basket Recommendations"></div>
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
IntelliSuggest.init({
siteId: '&mvt:searchspring:site_id;',
context:'Basket/',
seed:[<mvt:foreach iterator="item" array="basket:groups"><mvt:if expr="POS1 GT 1">,</mvt:if>'&mvtj:item:code;'</mvt:foreach>]
});
<mvt:foreach iterator="item" array="basket:groups">
IntelliSuggest.haveItem({
sku: "&mvtj:item:code;",
qty: "&mvtj:item:quantity;",
price: "&mvtj:item:price;"
});
</mvt:foreach>
IntelliSuggest.inBasket();
} catch(err) {}
</script>
<mvt:elseif expr="l.settings:page:code EQ 'INVC'">
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
IntelliSuggest.init({
siteId: '&mvt:searchspring:site_id;',
});
<mvt:foreach iterator="item" array="order:groups">
IntelliSuggest.haveItem({
sku: "&mvtj:item:code;",
qty: "&mvtj:item:quantity;",
price: "&mvtj:item:price;"
});
</mvt:foreach>
IntelliSuggest.inSale({
orderId: "&mvtj:order:id;",
total: "&mvtj:order:total;",
city: "&mvtj:order:ship_city;",
state: "&mvtj:order:ship_state;",
country: "&mvtj:order:ship_cntry;"
});
} catch(err) {}
</script>
</mvt:if>
以上是关于xml 示例Miva SearchSpring IntelliSuggest的主要内容,如果未能解决你的问题,请参考以下文章
xml Miva - 自定义SearchSpring Feed
html 使用客户的实际Miva定价更新SearchSpring结果
xml Miva - 一个模块中所有功能的示例
xml 第一次自动填充,使用属性的customfield(专门针对searchspring的颜色)
xml 第一次自动填充,使用属性的customfield(专门针对searchspring的颜色)
xml Miva - 产品批量定价供应XML