简体   繁体   English

Shopify获得产品的最新单次评论

[英]Shopify get latest single review of a product

I need to fetch a single latest review given by user and display in a box on product detail page. 我需要获取用户给出的最新评论并显示在产品详细信息页面上的框中。

I have searched in google for shopify script and app but couldn't find any solution for this. 我已经在Google中搜索shopify脚本和应用,但找不到任何解决方案。 If anybody have done this type of task then please help me. 如果有人完成了此类任务,请帮助我。

Thanks in advance! 提前致谢!

Shopify has a review App. Shopify有一个评论应用程序。 When you use it in a shop, you can display reviews. 在商店中使用它时,可以显示评论。 Since you control the placement of the reviews, you are in a position to also inspect the reviews from DOM perspective and decide the latest, and what the markup looks like. 由于您可以控制评论的放置,因此您还可以从DOM角度检查评论,并确定最新评论以及标记的外观。

Since you know the markup, and you have access to the Shop, you can scrape the latest review using any screen scraper you want to use. 由于您知道标记,并且可以访问商店,因此可以使用任何要使用的屏幕抓取工具来抓取最新评论。 With that, you can easily have each products newest review sent back to the App you installed in the shop. 这样一来,您可以轻松地将每个产品的最新评论发送回您在商店中安装的应用程序。 Using an App Proxy, you can do a callback asking for the details of the latest review, if any exist, for re-display any way you want. 使用应用程序代理,您可以进行回调以询问最新评论的详细信息(如果有),以便以您想要的任何方式重新显示。

Sure that is convoluted and weird, but you can do that. 当然这是令人费解和奇怪的,但是您可以这样做。

Shopify have its own review app any one can leave review on your products. Shopify拥有自己的评论应用程序,任何人都可以对您的产品发表评论。 You just need to install and configure that app. 您只需要安装和配置该应用程序。 I can help you to setup review app it is minutes change 我可以帮助您设置评论应用程序,这是几分钟的更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM