Skip to main content

WeChat Store Product

WdStoreProduct

Usage Instructions

The WeChat Mini Program embeds WeChat Store products, displays store products, and redirects to transactions. It supports the Store Preferred Alliance's product promotion and commission function.

Component Usage Limitations

  1. The component must be used in a real Mini Program environment to observe the actual effect.

  2. Due to platform rules, keep the component content fully displayed. If you need to customize styles, use custom-style. The number and spacing of component elements, product guarantee content and sales data, component font size, and the height of the "Buy" button cannot be modified. Failure to comply will render the component unavailable and may result in suspension of the ability to use this component.

  3. This component is currently not supported in Mini Programs on WeChat for Windows or WeChat for Mac.

  4. Parameters product-promotion-link and media-id must be passed during the initial loading of the component. Adjusting parameters after the component has finished loading is not currently supported.

Properties

External properties received by the component

Property Name
Property Identifier
Type
Description
Small Shop appidappidstring

store appid. Method for obtaining: store backend - store management - Basic information - View account info - WeChat store ID.

product idproductIdstring

To obtain the product id, you can use the API (reference link: https://developers.weixin.qq.com/doc/store/API/product/get.html) or access it through the store backend - product management - product list - specification/code.

promoted product commission infoproductPromotionLinkstring

If needed, the promoted product and commission feature of the Mini Store Preferred Alliance can be used when selling products. You can obtain promoted product and commission info through the API reference link.

media file idmediaIdstring

Can be obtained through API reference link

custom stylescustomStyleobject

Custom styles, see WeChat Store document

Enable customization slotcustomContentboolean

Enable customization slot. When enabled, you can control the card content.

Example: false

Redirect pageopenPagestring

Set the opened page to click (Enable simultaneously after the custom-content attribute takes effect).

logo locationlogoPositionstring

Set the location of the shop flag. Hiding is not allowed (takes effect after enabling the custom-content property simultaneously).

Example: "bottom-left"

Events

Events exposed by the component. You can listen to component events to trigger external actions

Event Name
Event Code
Event Output Parameters event.detail
Applicable Scenarios
Description
Redirect to the store successfullybindentersuccessMini Program

-

Failed redirection callbackbindentererrorobject
  • code: string错误码
  • message: string错误信息
Mini Program

-