Rendering Transactions

Overview

Often, you may want to render transactions on a custom directory. The most common case you might want to do this is if you want a custom transactions table. Transactions can be rendered as a substructure on a user. This documentation explains how to implement transaction rendering in your application.

Settings configuration

To render transactions on a custom page, you need to enable some settings at both the page and section level. First off, you need to enable the sending of transaction data to the page. There are two checkboxes corresponding to this, one will send the transactions the user has made, and the other will send transactions made with the user. Check the box(es) you want to apply. After enabling this setting, you may also want to force users to login to view the page and append a user id to the page url using checkboxes at the page level. This will make it so that only the transactions for that user are rendered, and the page will automatically populate with the transactions for that user.

Implementation Example

Here's the div format you can use to render transactions on a custom page:

<html>
<head>
    <script src="your global script url"></script>
</head>
<body>
    <section tg-section-id="your section id">
        <div tg-import-type="user">
            <p tg-user-value="display_name"></p>
            <div tg-import-type="transaction">
                <p tg-attribute="buyer_name"></p>
            </div>
        </div>
    </section>
</body>
</html>

Available Transaction Attributes

There is a preset list of attributes you can access on a transaction. Here is a list of the values you can access and what they map to:

Attribute Description
id The id of the transaction
created_at The date and time the transaction was created
starts_at The date and time the transaction starts
buyer_name The name of the user who initiated the transaction
buyer_email The email of the user who initiated the transaction
buyer_phone_number The phone number of the user who initiated the transaction
buyer_user_id The user id of the user who initiated the transaction
seller_name The name of the listing owner
seller_email The email of the listing owner
seller_phone_number The phone number of the listing owner
seller_user_id The user id of the listing owner
status The status of the transaction
total The total price of the transaction
listing_type_id The id of the listing type
listing_type_name The name of the listing type
listing_title The title of the listing
listing_photo_url The url of the listing photo

Custom Transaction Fields

You can also access any custom fields that are associated with the transaction. Here is a list of the custom fields you can access:

Field Description
field_dklzsrbex5w1ewfnu2gncq Description
field_fswhcu6jdhgbk4bfxkczg File Name (For listing display purposes)
field_tmmuajl4xigzsxaa9hscxg File Size (for listing display purposes)
field_fkqjbe6z7yn7j5jyuakg Display Name
field_1hnhzbusdl54wk6wzb8ooq Email
field_4wyuya3lktau48rbfjb6ua Profile Photo
field_4jrusvbtbfqvvi028bs4qq Title
field_exxh85wlep8bpbqiyzgmkg Price
field_iu0eodobrhgowrrx5ryzfg Lottie File
field_kp2zs8kcmktvghbbkvx5w Store Name
field_hefde2pjxitdj76qkbnrw File Type
field_j1n4ywekfhxgdwmmscw0gq Categories
field_3j3lxkaknauznofwcirtw Duration
field_nlynyhfvamztk3dvvyfyew Admin Tags
field_6qzwdgqtsuhne0oqrogg Not for sale?