# Access process

The complete access to the Standard Trading Component requires the following four parts, eight steps, each of which requires the completion of the corresponding actions.

# Pre-Process: Access Preparation

Check whether the custom version is enabled Log in the WeChat Official Platform Mini Program, in the "trading components" menu to check whether has opened the custom version of the trading components, the standard version of trading components and custom version trading components choose one. The following figure shows the custom version of the trading component already enabled.

If you already have a custom trading component enabled, you can cancel it, as shown in the following figure.

# 1: component access

# 1.1 Apply for use of components

You need to have an Mini Program before applying for access to a component. If you already have one, you don't need to re-register. No Mini Program, please go toRegister Mini Program

accord with[Standard Edition Trading Component Category Access Requirements](https://developers.weixin.qq.com/miniprogram/product/mini-store/#% E4% B8% 83% E3% 80% 81% E5% be% AE% E4% BF% A1% E5% B0% 8F% E5% 95% 86% E5% BA% 97% E5% BC% 80% E6% 94% be% E7% BB% 84% E4% BB% B6% E7% B1% BB% E7% 9B% AE% E5% 87% 86% E5% 85% A5% E8)The Mini Program can log inWeChat Public PlatformIn the left menu bar select trading components, select the standard version of the trading components to open the function.


# 2: Complete the opening task

# 2.1 Completion of opening task

After the review, you can see the following page, choose to manage, go to the background of the standard version of the transaction component


Jump to the shop task page, fill in the relevant information and upload relevant documents to submit for review, complete the task


After completing the shop task, you need to embed theMini Program releaseYou can use components in Mini Program.

# 2.2 Introducing components

Version restrictions : Base library version 2.11.1 and above, otherwise the customer service function cannot be used.

You need to introduce the Standard Trading Component into your project and edit the app.json File, the sample code is as follows:

 "plugins": {

      "mini-shop-plugin": {
      
      "version": "latest",   // Default pull the latest version plugin, Do not modify (uncomment when copying)
      
      "provider": "wx34345ae5855f892d"  // The standard trading component appid must be filled in. Do not modify it (uncomment when copying)
      
        }

		}

Using the functionality of the standard trading component requires component initialization. Edit the apagejs file in the root of the project, call the initApp method provided by the component, and pass in the specified parameters. The example code is as follows:

const miniShopPlugin = requirePlugin('mini-shop-plugin')

App({
  onLaunch() {
    miniShopPlugin.initApp(this, wx)
  },
})

# 2.3 Using components

After the component code package configuration is introduced in step 1, you can directly jump to the standard transaction component page (that is, the in-store page) via the link address.

An example of how to jump to a specific item detail page is as follows

(1) Use navigator Component Jump to product details page

index.js

const productId = [Goods id ] // Fill in the specific product Id

index.wxml

<navigator url="plugin-private://wx34345ae5855f892d/pages/productDetail/productDetail?productId={{productId}}"></navigator>

    // Which wx34345ae5855f892d is the standard version of the transaction component appid can not be modified

(II) use navigateTo Click here to go to the product details page.

index.js

const productId = [Goods id ] // Fill in the specific product Id

    wx.navigateTo({

          url: `plugin-private://wx34345ae5855f892d/pages/productDetail/productDetail?productId=${productId}`,

    })

    // Which wx34345ae5855f892d is the standard version of the transaction component appid can not be modified`



The sample renderings are as follows:

# 2.4 Interface debugging completed, need to confirm Mini Program has been released

After the completion of the interface docking and uploading of goods, submit the code to the WeChat team for review, and after the review, you can release it. If the scenario is not available, check the release time. If it is before the access, release the modified Mini Program code again after completing the access:



# 3: Complete scene access

# 3.1 Request Scenario Access

Go to the WeChat Official Platform, enter the "transaction component">"Scene access" menu, view and select the scene that needs access, WeChat official default all scenes are access.

If you can already bind the video number scene, and can use the promoter function, you will see the interface shown below:

Will be set as a member of the Mini Program promoters, the employees can be bound in their own video number, and live with goods.


Of course, there are situations where you can't use the scene. In this case, the interface will show the reason why it can't be used. If you have any objections, you can ask the customer service in the upper right corner, or click the re-audit on.

# 3.2 Follow the guidelines to access the scene

After the scene can be accessed, it is accessed according to the requirements of different scenes. Such asVideo Number Access Guidelines


# 4: Scene sale

# 4.1 User Orders

Users can place orders in the standard version of the component.

At this point, the merchant completed the whole Mini Program access to the standard version of the transaction components, complete the scene access, the completion of the scene sale process.

# Component invocation and open interfaces


# [Component interface]

Through the introduction of the standard version of the transaction component in the Mini Program, developers can quickly realize the product details display, product orders, order details and other functions.

  • Product Detail: The user clicks on the relevant product, jump to the product detail page.
  • Shopping Bag shoppingCart: Controls the user to jump to the shopping bag page.
  • Order list orderList: control user jump to order list page, default activation "all" tab, display all order data, can be set to activate "to pay," "to receive", "refund"/After-sales” Labels.
  • OrderDetail: Controls the user to jump to the order detail page.
  • RefundDetail: Controls the user to jump to the Details page of the Order.

# [Server Interface]

Service interface includes SPU (standard product unit) interface, SKU (stock unit) interfaces, order interface, logistics interface, coupon interface, store interface, customer service interface and live interface.

  • Service provider interface is the interface capability provided to service providers for landing service market and managing merchants. Developers can carry out market login verification, access to users to buy valid period of service list, access users to purchase service orders list.
  • The SPU (Standard Product Unit) interface is the interface capability provided to developers for batch operation of product SPUs. Developers can bulk add goods, delete goods, update goods, goods and so on.
  • SKU (Unit of Inventory) interface is the interface capability provided to the developer for batch operation of product SKUs. Developers can add SKUs in bulk, delete SKu, update information, prices, inventory and other operations.
  • Order interface is the ability to manage order situation for developers. Developers can get order list, details and other information.
  • Logistics interface is a kind of interface capability for developers to manage the logistics situation. Developers can get the list of express companies and the status of orders.
  • Coupon interface is an interface capability for developers to manage coupons. Developers can obtain coupons and issue coupons.
  • Store interface is the interface ability that provides the developer to manage store information, and the developer can get the basic information of the store.
  • The customer service interface is the interface capability provided to developers to manage customer service. Developers can obtain temporary material in the customer service message, send customer service messages to users, issue customer service current input status to the user, upload media files to the WeChat server and other operations.
  • The live interface is the ability to manage the live broadcast for developers. Developers can create live broadcast room, get playback source video, get live broadcast list, add, delete, update and so on.