[英]How to develop a shopify application that make change in product page?
I'm trying to develop a Shopify recommendation app that will embed recommended bundle products to the shop's product page as similar as Shopify official product review app that embeds a review section (Customer Review) to the product page by adding the following section to the template:我正在尝试开发一个 Shopify 推荐应用程序,它将推荐的捆绑产品嵌入到商店的产品页面,类似于 Shopify 官方产品评论应用程序,通过将以下部分添加到模板中,将评论部分(客户评论)嵌入到产品页面:
<div id="shopify-product-reviews" data-id="{{product.id}}">
{{ product.metafields.spr.reviews }}
</div>
: :
My question is about the way of implementing a Shopify application that works as a widget in the product page.我的问题是关于在产品页面中实现作为小部件的 Shopify 应用程序的方式。 As far as I understand Shopify App Proxy is doing a similar thing but it renders the template on a new page, I can't find any approach to embed my liquid template to the existing theme.据我了解Shopify App Proxy正在做类似的事情,但它在新页面上呈现模板,我找不到任何方法将我的液体模板嵌入到现有主题中。
You are missing a beautiful and most useful aspect of App Proxy.您错过了 App Proxy 一个美丽且最有用的方面。 With it you can do the following pattern, answering your needs perfectly.有了它,您可以执行以下模式,完美满足您的需求。
While it is true the App Proxy can be used to return Liquid, this will indeed mean a re-rendering of the screen chrome and layout, so you might prefer the JS and template method.虽然 App Proxy 确实可以用于返回 Liquid,但这确实意味着屏幕镶边和布局的重新渲染,因此您可能更喜欢 JS 和模板方法。 However, I have used both, and both are super for their own purposes.但是,我两个都用过,而且都非常适合自己的目的。 Returning Liquid is cool as it lets you write Liquid in the Shopify Theme that you can populate in your App, and Shopify will then populate the Product info allowing for you to have Theme Designers and the merchant change the HTML the customer sees, without the HTML template limits the JSON approach has. Returning Liquid 很酷,因为它可以让您在 Shopify 主题中编写 Liquid,您可以将其填充到您的应用程序中,然后 Shopify 将填充产品信息,允许您让主题设计师和商家更改客户看到的 HTML,而无需 HTML模板限制了 JSON 方法。
I am also developing a custom product page.我也在开发自定义产品页面。 I guess the process should be like this:我想流程应该是这样的:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.