如何使BigCommerce小部件与PageBuilder兼容

编程入门 行业动态 更新时间:2024-10-23 13:38:00
本文介绍了如何使BigCommerce小部件与PageBuilder兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在这里遵循本教程 developer.bigcommerce/api-docs/storefront/widgets/widgets-tutorial

我通过执行对 https:的发布请求来制作了小部件模板://api.bigcommerce/stores/81mdugvyu5/v3/content/widget-templates 与此

I made the widget template by performing a post request to api.bigcommerce/stores/81mdugvyu5/v3/content/widget-templates with this in the body

{ "name": "Header Images", "template": "{{#each images}}<a href='{{image_url}}'><img src={{image_source}} style='width:33.3%'/></a>{{/each}}" }

响应成功.然后,我向 api.bigcommerce/stores执行了发布请求/81mdugvyu5/v3/content/widgets

The response was successful. I then performed a post request to api.bigcommerce/stores/81mdugvyu5/v3/content/widgets

将其植入体内

{ "name": "Header Images", "widget_configuration": { "images": [ { "image_url": "google", "image_source": "cdn11.bigcommerce/s-n0i50vy/images/stencil/1280x1280/products/91/309/thekinfolktablecover_1024x1024__80715.1456436719.jpg?c=2&imbypass=on" }, { "image_url": "google", "image_source": "cdn11.bigcommerce/s-n0i50vy/images/stencil/1280x1280/products/109/361/kinfolkessentialissue_1024x1024__22507.1456436715.jpg?c=2&imbypass=on" }, { "image_url": "google", "image_source": "cdn11.bigcommerce/s-n0i50vy/images/stencil/500x659/products/85/282/livingwithplants_grande__26452.1456436666.jpg?c=2&imbypass=on" } ] }, "widget_template_uuid": "7c5f05c2-2361-45a3-bb99-89554dd145ee" }

响应成功.我的自定义窗口小部件确实会出现在页面构建器中,但是当我尝试添加它时,会收到此错误

The response was successful. My custom widget does then appear in page builder but when I try to add it I receive this error

页面构建器不支持此小部件.请查阅我们的开发人员文档有关如何制作自己的更多信息与Page Builder兼容的小部件

This widget is not supported by Page Builder. Please consult our developer documentation for more information on how to make your widget compatible with Page Builder

当我访问开发人员文档时,它链接到有关如何使其与Page Builder兼容的链接,但我没有提到Page Builder.

When I visit the developer documentation it links to on how to make it compatible with Page Builder I don't see any mention of Page Builder.

有没有办法找出使教程小部件与Page Builder兼容的方法?

Is there any way to find out how to make the tutorial widget compatible with Page Builder?

推荐答案

@Mikhail是正确的.通过在我的窗口小部件模板后请求的主体中指定一个架构,我能够将其添加为页面构建器可访问的窗口小部件.在发送另一个请求并添加如下所示的架构后:

@Mikhail was correct. I was able to add it as a widget accessible by page builder by specifying a schema in the body of my widget-templates post request. After sending another request with the schema added like this:

{ "name": "Header Images", "template": "{{#each images}}<a href='{{image_url}}'><img src={{image_source}} style='width:33.3%'/></a>{{/each}}", "schema": [ { "type": "tab", "label": "Content", "sections": [] } ] }

有效.

您可以在此处 developer.bigcommerce/stencil-docs/page-builder/page-builder-overview

,您可以在此处 developer.bigcommerce/stencil-docs/page-builder/schema-settings

更多推荐

如何使BigCommerce小部件与PageBuilder兼容

本文发布于:2023-10-13 10:23:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1487691.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:部件   BigCommerce   PageBuilder

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!