<?php if ($this->getIsEnabled()):?>
<?php $doShowContentJs = Mage::getStoreConfig('bazaarvoice/rr/do_show_content_js');
$seoContent = $this->getSEOContent();
?>
<div id="BVRRContainer">
<?php echo $seoContent ?>
</div>
<script type="text/javascript">
$BV.ui('rr', 'show_reviews', {
doShowContent : function() {
<?php echo $doShowContentJs ?>
}
});
</script>
<?php endif; ?>
回答
This答案提供瞭如何檢索審查的例子reviews.phtml代碼被提及,但我會提供一個片段:
$(document).ready(function(){
$.ajax({
url: "https://stg.api.bazaarvoice.com/data/reviews.json?apiversion=5.4&passkey=***ENTER PASSKEY HERE***&filter=productid:***PRODUCTID***",
data: "json",
success: function(data){
console.log(data);
for (i in data['Results']){
var info = data['Results'][i];
console.log(info.AuthorId + " || " + info.ReviewText);
}
}
})
});
是否適用於特定產品。我們在此處不提供任何過濾器,那麼它如何獲取我們產品的詳細信息 – Haritha1315
請查看API文檔。不過,我在URL中添加了一個過濾器參數。您只需指定產品ID即可。 –
我已經看到了文檔,如果我傳遞下面的網址我無法獲得輸出。 URL:http://stg.api.bazaarvoice.com/data/reviews.json?apiversion = 5.4&include = products,authors&Filter = ProductId:C1&filter = isRatingsOnly:false&filter = DisplayLocale:en_US&passkey = ywwm6ry3sw5r4ak9j7f2x9ed&limit = 5 – Haritha1315
- 1. Mozilla(Firefox,Thunderbird)擴展名:如何獲得擴展名(來自install.rdf)?
- 2. 如何獲得highslide擴展
- 3. 如何在我的TYPO3 Extbase擴展中獲得AJAX調用?
- 4. Bazaarvoice API V5.3
- 5. 如何在bazaarvoice api中使用搜索選項
- 6. 如何擴展jQuery評論?
- 7. Chrome擴展程序:哪個Api可以獲得評分?
- 8. Primeng如何獲得行的rowIndex擴展?
- 9. 如何獲得文件的擴展名
- 10. 如何獲得Roslyn的擴展方法?
- 11. 如何獲得擴展的pdf版本
- 12. 如何獲得擴展屬性認爲magento的REST API?
- 13. 如何獲得這樣一個可擴展的佈局?
- 14. 如何調用從MainScreen擴展MainScreen的屏幕,這也擴展了MainScreen在BlackBerry?
- 15. {... object,property:value}如何使用擴展語法?
- 16. realtime api feed - 如何獲得新評論?
- 17. WP rest api:如何獲得評論數
- 18. 如何獲得擴展異常類的上下文
- 19. eclipse rcp如何獲得擴展名?
- 20. 如何獲得原始圖像擴展
- 21. Carrierwave如何獲得文件擴展
- 22. 如何獲得擴展文件NSString
- 23. 如何獲得Chrome擴展的調試信息
- 24. 如何使用的XDocument和擴展方法來獲得從XML文檔內文
- 25. 使用gem'twitter-bootstrap-rails',如何獲得樣式表的scss擴展?
- 26. 如何使用xp_dirtree獲得沒有擴展名的文件名
- 27. 如何獲得在評論
- 28. 環回 - 如何使用環回來擴展api
- 29. 如何使用curl下載Chrome擴展?
- 30. 如何使用jQuery擴展來擴展json對象?
由於格式不正確,您的代碼被隱藏。我爲你編輯。接受編輯。 – Raviteja