Appearance
Sync to Entries
Starting with version 2.x.x, it is possible to sync your Orders and Order Items with your regular Entry Channels. This gives you the flexibility to use regular Entry tags and the option to add extra fields if needed.
Set the channels and fields in Sync orders > Order settings and Order items settings in the menu of the Store (Sync orders is a section of its own with these three pages from v4.0.0). The Status page shows how many orders and order items are synced and lets you sync the missing ones. Sync missing orders syncs the orders without an entry and the orders with an order item without an entry (the order items are synced with their order). The order items of a product channel with Sync Enabled turned off in its channel settings are skipped on purpose, the page shows them as Skipped. It also shows how many entries in the order sync channel are not linked to an order; Entries not linked to an order lists them (with filters on status, date and keyword) with a link to edit each entry, e.g. to delete test entries. Available from v4.0.0
Once you configure the settings, syncing happens automatically in the background. Orders will be synced to the Entries, and if you make changes to an order within an Entry, it will be synced back to the module. This ensures that the module and the entries remain in sync. The ids and the data the Store manages itself are not synced back: transaction_id, order_id, hash and custom_fields of the order, and custom_fields, order_id, order_hash and order_item_id of an order item.
Note: If you upgraded from an older version before 2.x.x. You have to manually sync the entries. Go to Sync orders > Status in the menu of the Store. On this page you can sync your entries.
Remember, syncing a lot of order can take a while.
Fields and Channels
First you need to create your channels and your fields. For the Order Channel you can sync the following fields:
** As of v4.0.0 you import the Orders and Order items channels with their fields on the Example Channels page of the Store, which also selects them with their fields and statuses in the settings of the sync. Before v4.0.0: we added folders that can be zipped and imported into EE. Simply zip the folder system/user/addons/reinos_store/custom_channels/Orders/ChannelSet (the orders) or custom_channels/order_items/ChannelSet (the order items) --> <give-it-a-name>.zip and import it into ExpressionEngine. **
Order
The following fields should be created for an Order Channel
Address fields
- billing_address
text input - billing_address2
text input - billing_city
text input - billing_country
text input - billing_zip
text input - billing_state
text input - shipping_address
text input - shipping_address2
text input - shipping_city
text input - shipping_country
text input - shipping_zip
text input - shipping_state
text input
Customer fields
- customer_first_name
text input - customer_last_name
text input - customer_company
text input - customer_tax_no
text input - customer_email
text input - customer_phone
text input
Price fields
- shipping
Reinos store - price - shipping_plus_tax
Reinos store - price - subtotal
Reinos store - price - subtotal_plus_tax
Reinos store - price - subtotal_before_discount
Reinos store - price - subtotal_before_discount_plus_tax
Reinos store - price - tax
Reinos store - price - discount
Reinos store - price - total
Reinos store - price - total_plus_tax
Reinos store - price
Other fields
- currency
text input - gateway
text input - is_paid
toggleortext input(1or0) - transaction_id
text input - order_id
text input - hash
text input - custom_fields
Reinos store - custom fields- render the custom fields - order_items
Reinos Store - Order Items- render the Items of an Order. This field needs no mapping: the Store fills every field of this type in the order channel, see Sync - Order items fieldtype
Order Items
The following fields should be created for the Order Items Channel
Default fields
- name
text input - entry_id
text input(the entry_id of the product) - entry_channel_id
text input(the channel of the product, e.g. to tell products apart without a channel entries tag) - sku
text input - qty
text input - note
text input - weight
text input
Price fields
- price
Reinos store - price - price_plus_tax
Reinos store - price - old_price
Reinos store - price - old_price_plus_tax
Reinos store - price - price_total
Reinos store - price - price_total_plus_tax
Reinos store - price - old_price_total
Reinos store - price - old_price_total_plus_tax
Reinos store - price - tax
Reinos store - price - tax_rate
text input(the tax rate in percentage)
Other fields
- custom_fields
Reinos store - custom fields- render the custom fields - order_id
text input- The order ID of the order - order_hash
text input- Next to the order ID, there is also a order Hash that is not guessable, good for url_titles - order_item_id
text input- This is the Order Item ID of the product that has been ordered - parent_order_item_id
text input- Parent Order Item ID: the order item this item reorders or renews, set by the reorder tag or theparent_order_item_idparam of the add_to_cart tag. Useful for renewals of virtual products
Orders settings
The following fields needs to configured in order to sync your Orders to Entries.
| Field | Description |
|---|---|
| Channel | Choose the channel where we should save the Order to. |
| Order Title Prefix | Set a prefix for the title, followed by the order id. By default Order # (e.g. Order #1024) |
| URL Title Prefix | Set a prefix for the URL title, followed by the order id. By default order (e.g. order1024). When the URL title is taken, -1, -2, ... is added. An entry with a mapped order hash that matches the order is linked again instead |
| Order Status | Select the Status from your Channel that we should map |
| Order Fields | Select a Field from your Channel that we should map |
Order Items Settings
Just like the orders, Order Items needs to be configured in the same way as Orders.
| Field | Description |
|---|---|
| Channel | Choose the channel where we should save the Order Item to. |
| Order Title Prefix | Set a prefix for the title |
| License key | Set a field where we can store a license key e.g. for digital products. |
| Order Status | Select the Status from your Channel that we should map |
| Order Fields | Select a Field from your Channel that we should map |
