Product Information Module

Products are attached to post-type pages. If you don’t have special needs, add the default product module to your post.tpl file. Use this code: {include file="./parts/product.tpl"}. This shows the product info and payment button—users can click to pay.

Product-related variables:

Variable Name

Description

Field

$productData

Product info for the post

array(

    'data' => array(

        'id' => '',

        'title' => '',

        'slug' => '',

        'language' => '',

        'post_id' => '',

        'product_type' => '',

        'download' => '',

        'price' => '',

        'stock' => '',

        'length' => '',

        'width' => '',

        'height' => '',

        'weight' => '',

        'shipping_template_id' => '',

        'tax_template_id' => ''

    ));

$userId

User ID

Number

$paid

Whether the user has completed payment for this product

Boolean (true/false)

$orderInfo

For license-type products, this refers to the card key; for physical-type products, this refers to the logistics information (logistics company and tracking number)