You should run the Magento software in developer mode when you’re extending or customizing it. You can use this command line to show current mode :
php bin/magento deploy:mode:show
Use this command to change to developer mode :
php bin/magento deploy:mode:set developer
-
Copy Exponea plugin to
<your_project>/app/code
, the structure should becode/Exponea/Exponea
. -
In
<your_project>
directory runphp bin/magento setup:upgrade && php bin/magento setup:di:compile
You can now find Exponea plugin in Magento 2 admin, go to Stores -> Configuration -> Exponea
-
Get your project token from your Exponea app
Project settings -> General settings
, you will also need to use API secret and public key, you can generate those inProject settings -> API settings
, selectprivate
in the dropdown and generate new key. -
Default API route is
https://api.exponea.com/track/v2/projects
without the slash at the end.
Block is taking care of passing backend data to frontend, everything from Exponea.php
can be passed to frontend using defined functions.
Controller classes are taking care of importing catalogs and orders to your project, in case of catalog you need to define the name of catalog you want to create.
Helper.php
includes all the parsing functions and encapsulations for the right formating of the request. You can use these functions to write observers, there's a parser function for every object you can track.
Includes Tracking.php
- sending POST requests to Exponea API you define in your configuration.
Includes all the backend observers. Each of them gets fired on a different action - located in etc/events.xml
.
Includes all of the JavaScript that's included on frontend as a <script></script>
.