html Miva - mvt:调用搜索Spring API

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Miva - mvt:调用搜索Spring API相关的知识,希望对你有一定的参考价值。

<mvt:comment><!-- https://searchspring.zendesk.com/hc/en-us/articles/201185019-SearchSpring-API-Search-and-Navigation --></mvt:comment>
<mvt:comment><!-- https://searchspring.zendesk.com/hc/en-us/articles/201184849-SearchSpring-Catalog-init-function-and-options --></mvt:comment>

<mvt:assign name="g.url" value="'http://api.searchspring.net/api/search/search.json'" />

<mvt:assign name="g.bgfilter.hierarchy" value="'Dirt Bike Gear & Parts/Dirt Bike Parts/Body'" />
<mvt:assign name="g.filter.facet_hierarchy" value="'Dirt Bike/Dirt Bike Parts/Body'" />
<mvt:assign name="g.format" value="'json'" />
<mvt:assign name="g.intellisuggest" value="1" />
<mvt:assign name="g.method" value="'search'" />
<mvt:assign name="g.page" value="1" />
<mvt:assign name="g.q" value="''" />
<mvt:assign name="g.resultLayout" value="'grid'" />
<mvt:assign name="g.resultsFormat" value="'html'" /> <mvt:comment><!-- native|html --></mvt:comment>
<mvt:assign name="g.resultsPerPage" value="24" />
<mvt:assign name="g.sort.salesrank" value="'desc'" />
<mvt:assign name="g.v" value="s.dyn_time_t" />
<mvt:assign name="g.websiteKey" value="'KEY'" />

<mvt:assign name="g.searchspring:json" value="''" />
<mvt:call action="g.url" method="'GET'" fields="'bgfilter.hierarchy,filter.facet_hierarchy,format,intellisuggest,method,page,q,resultLayout,resultsFormat,resultsPerPage,sort.salesrank,v,websiteKey'">
    <mvt:assign name="g.searchspring:json" value="g.searchspring:json $ s.callvalue" />
</mvt:call>

<mvt:assign name="g.searchspring:json" value="glosub( glosub( g.searchspring:json, '\n', '' ), '\t', '' )" />

<mvt:item name="ry_toolbelt" param="assign|g.searchspring:parsed|Json_Parse(g.searchspring:json, 0)" />

&mvt:global:searchspring:parsed:results;

以上是关于html Miva - mvt:调用搜索Spring API的主要内容,如果未能解决你的问题,请参考以下文章

xml Miva - mvt:调用基本授权标题

xml Miva - mvt:调用SOAP请求

xml Miva - mvt:调用POST Raw JSON数据

html Miva mvt:做自定义充值模板

html MVT Miva输出压缩白色空间标签

html Miva - mvt:do load Variants