Order Storage
To start receiving orders from users in your application, you need to create and configure an order storage. Order storage includes:
- A form for receiving orders
- A payment system
- A list of received orders and tools to work with them
You can create an unlimited number of order storages. This will help group orders, for example, by type, delivery method, or payment method.
Creating an Order Storage
To create a new order storage, go to the "Orders" section in the left menu and open the Order Storages tab. This section contains a form for creating a new order storage and a list of already existing storages.
To create a storage, fill out the form by specifying:
- Name - A non-unique string used in the system interface to identify the order storage. Name it in a way that makes it easy for you to work with.
- Type - The type of orders that will be contained in the order storage.
- Marker - A unique string used within your application's code.
After filling out the form, click the "Add" button. If all data is filled in correctly, the new order storage will be added to the general list of storages.
Configuring the Order Storage
You can access the order storage settings by clicking the edit icon on the selected storage from the list.
Then, open the Settings tab.
In the settings, you can change:
- Name and Marker — the name and marker of the order storage.
- Form selection — the order form.
- Selection of payment accounts — the payment accounts for the storage. You can select multiple.
- Price retention time — the time to retain the price. Specify an integer with a unit of measurement:
ms(milliseconds),s(seconds),m(minutes), orh(hours), for example,30m. This field is mandatory: without a valid value, the storage settings will not be saved.
If you opened the settings of a newly created order storage, the form and payment account configuration blocks will be empty. Since these settings are mandatory, they must be filled out for the order processing mechanism to work correctly.
First, create a form with the type "Orders". Pass the necessary set of data as attributes to this form. For example, the attributes may include the username, address, delivery type, order comments, etc.
Before creating a form with the type "Orders", your project must have a set of attributes with the type "Products", which includes an attribute for price and currency. This attribute does not need to be added to the form, but your products must contain an attribute indicating the price and currency.
Also, if you do not have a payment account yet, you need to create one.
Once the form and payment account are created, add them in the settings to the created order storage. If everything is done correctly, the changes will be saved automatically, and the order storage will be ready for use.