User interface for custom discounts

You can create a user interface for merchants to specify their own promo rule variations or any other user preferences you may require for your app. We recommend adding a new tab into the Ecwid Control Panel's promotion section for optimal experience using the: Native applications feature and Application storage features.

Settings and User interface

First, set up a new tab in Ecwid Control Panel, which will serve as a settings page for your users. This tab will load a page from your server in an iframe in a separate tab of Ecwid Control Panel. See Native Applications for more info.


Once the settings are saved there, Ecwid will send them in a POST request to your application alongside cart details when customer is at checkout stage. The request will contain all data from your application storage, including public and other keys that were saved by the app. Use it to idetify the store and apply discounts accordingly. See Application storage for more info.


After you get a request from Ecwid, your application endpoint should get its components and return discounts back to the customer in a response.