propulse / oxid
Creates proPulse credentials for OXID eShop and shows the shop URL, email, password and a QR code the mobile app can scan.
Package info
github.com/ErezanaBerisha/propulse-oxid
Language:JavaScript
Type:oxideshop-module
pkg:composer/propulse/oxid
Requires
- php: ^8.1
- oxid-esales/oxideshop-ce: ^7.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
proPulse for OXID eShop
Connect your OXID eShop to proPulse and see your sales in the proPulse mobile app.
What the module does
- When you activate it, the module creates proPulse connection credentials (an email-style login and a random password) for your shop.
- Adds Extensions → proPulse to the OXID admin. That page shows the shop URL, login email, password and a QR code. Scan the QR code with the proPulse app to connect the shop.
- Provides a small read-only endpoint,
index.php?cl=propulse_api, that returns order data to proPulse after it checks those credentials.
The module adds no cron jobs, no frontend output, no changes to existing shop classes and no outgoing network calls.
Compatibility
| OXID eShop | Module version | PHP | Tested on |
|---|---|---|---|
| 7.x (Twig admin) | 2.x | 8.1 or later | 7.5.2 with PHP 8.3, 7.0.5 with PHP 8.1 |
| 6.2 to 6.5 (Smarty admin) | 1.9 | 7.1 or later | 6.5.5 with PHP 7.4 |
You don't have to pick the version. Composer installs the one that matches your shop, and the commands below are the same for OXID 6 and 7.
Not supported: OXID eShop 6.0, 6.1 and earlier. Professional and Enterprise Editions and sub-shops have not been tested yet.
Requirements
- Shell (SSH) access to the server. If you don't have it, send this page to your developer or hosting provider.
- The shop must be reachable over HTTPS from the internet. The proPulse servers call the module's endpoint at
https://<your-shop>/index.php. - That URL must not be blocked by a firewall, WAF or basic-auth protection for the proPulse servers.
Installation
Run these commands in the shop root directory (the folder that contains composer.json, source/ and vendor/), as the user that owns the shop files:
composer require propulse/oxid vendor/bin/oe-console oe:module:activate solu1propulse
That's it. Continue with Connect the shop to proPulse.
- Instead of the second command, you can activate the module in the admin under Extensions → Modules → proPulse → Activate.
- For a sub-shop, add
--shop-id=<id>to the activate command. - OXID eShop cannot install modules from a ZIP uploaded in the admin panel.
Without Composer (ZIP)
-
Download
propulse-oxid.zipfrom the Releases page. Take the latest 2.x release for OXID 7, or the latest 1.9.x release for OXID 6. -
Extract it into
source/modules/solu1/propulse:mkdir -p source/modules/solu1/propulse unzip propulse-oxid.zip -d source/modules/solu1/propulse
source/modules/solu1/propulse/metadata.phpmust exist afterwards. -
Add the module's namespace to the
autoloadsection of the shop's rootcomposer.json:"autoload": { "psr-4": { "Solu1\\ProPulse\\": "./source/modules/solu1/propulse/src/" } }
-
Register and activate the module.
OXID 7:
composer dump-autoload vendor/bin/oe-console oe:module:install source/modules/solu1/propulse vendor/bin/oe-console oe:module:activate solu1propulse
OXID 6:
composer dump-autoload vendor/bin/oe-console oe:module:install-configuration source/modules/solu1/propulse vendor/bin/oe-console oe:module:activate solu1propulse
Connect the shop to proPulse
- In the OXID admin, open Extensions → proPulse.
- In the proPulse app, add a new shop and scan the QR code on that page. Or enter the shop URL, email and password shown on the page by hand.
- proPulse imports your orders. The first sync can take a few minutes on large shops.
Check that the shop URL on that page starts with https://. If it doesn't, fix the shop URL in your shop configuration (source/config.inc.php, sShopURL/sSSLShopURL) before you connect.
Permissions and data access
The proPulse credentials only work for the module's own endpoint. They are not an OXID admin or customer account, and they cannot sign in to the shop or the admin.
The endpoint is read-only. It has two actions:
| Action | Returns |
|---|---|
fnc=ping |
{"ok": true} if the credentials are valid |
fnc=orders |
Orders of the current shop, at most 100 per request |
Each order contains only these fields from oxorder: OXID, OXORDERNR, OXORDERDATE, OXTOTALNETSUM, OXTOTALORDERSUM, OXPAYMENTTYPE, OXFOLDER, OXTRANSSTATUS, OXSENDDATE, OXPAID, OXTIMESTAMP, OXSTORNO.
No customer data (names, email addresses, addresses), no order items and no product data are sent.
Credentials and security
- The password is a random 32-character hexadecimal string, generated on your shop when you activate the module. The package contains no credentials or API keys.
- OXID stores module settings in the shop's configuration files. On OXID 7 the credentials are in
var/configuration/shops/<shop-id>/modules/solu1propulse.yaml, on OXID 6 invar/configuration/shops/<shop-id>.yamland theoxconfigtable. Keep thevar/directory out of version control and public web access, as you would for the rest of the shop configuration. - The password is shown in plain text on Extensions → proPulse, so that it can be scanned or copied. Restrict admin access to trusted users.
- Credentials are compared in constant time. Requests without valid credentials get HTTP 401.
- Deactivating the module turns off the endpoint immediately. proPulse can no longer read data.
Rotate the password
The module has no button to create a new password yet. To get new credentials, remove the module configuration and install it again.
OXID 7:
vendor/bin/oe-console oe:module:deactivate solu1propulse vendor/bin/oe-console oe:module:uninstall solu1propulse vendor/bin/oe-console oe:module:install vendor/propulse/oxid vendor/bin/oe-console oe:module:activate solu1propulse vendor/bin/oe-console oe:cache:clear
If you installed from the ZIP, use source/modules/solu1/propulse instead of vendor/propulse/oxid.
OXID 6:
vendor/bin/oe-console oe:module:deactivate solu1propulse vendor/bin/oe-console oe:module:uninstall-configuration solu1propulse vendor/bin/oe-console oe:module:install-configuration source/modules/solu1/propulse vendor/bin/oe-console oe:module:activate solu1propulse vendor/bin/oe-console oe:cache:clear
Then reconnect the shop in the proPulse app with the new QR code.
Update
Installed with Composer:
composer update propulse/oxid vendor/bin/oe-console oe:cache:clear
On OXID 6, Composer asks whether it may overwrite the module files in source/modules. Answer y. The default is No, so without that answer the shop keeps the old version.
Installed from the ZIP: download the new ZIP, replace the contents of source/modules/solu1/propulse with it, then run composer dump-autoload and vendor/bin/oe-console oe:cache:clear.
Your existing proPulse credentials are kept.
Uninstall
First deactivate the module (Extensions → Modules → proPulse → Deactivate, or vendor/bin/oe-console oe:module:deactivate solu1propulse).
Installed with Composer:
composer remove propulse/oxid
This removes the code and the module configuration, including the stored credentials. Composer may print an [Error] about BackwardsCompatibilityClassMapProvider while OXID's Composer plugin cleans up. It comes from OXID itself and the module is still removed completely.
Installed from the ZIP:
vendor/bin/oe-console oe:module:uninstall solu1propulse rm -rf source/modules/solu1/propulse
On OXID 6, use oe:module:uninstall-configuration instead of oe:module:uninstall.
Then remove the Solu1\\ProPulse\\ line from the autoload section of the shop's composer.json, and run composer dump-autoload.
Finally, remove the shop in the proPulse app.
Troubleshooting
proPulse is not listed under Extensions → Modules.
Run vendor/bin/oe-console oe:cache:clear. If you installed from the ZIP, check that the autoload entry was added, that composer dump-autoload was run, and run vendor/bin/oe-console oe:module:install source/modules/solu1/propulse (OXID 6: oe:module:install-configuration).
Activation fails with a "class not found" error.
The Solu1\ProPulse\ namespace is not autoloaded. Run composer dump-autoload. If you installed from the ZIP, also check the autoload entry in the shop's composer.json.
Extensions → proPulse is missing after activation.
Run vendor/bin/oe-console oe:cache:clear, then sign out of the admin and sign in again.
The proPulse app cannot connect.
Test the endpoint from your computer. curl asks for the password, so the password doesn't end up in your shell history:
curl -u 'propulse-api@your-shop.example' 'https://your-shop.example/index.php?cl=propulse_api&fnc=ping'
{"ok":true}: the module works. Check the URL and credentials entered in the app.{"ok":false}with HTTP 401: the credentials are wrong, or the web server strips theAuthorizationheader before PHP. On Apache with PHP-FPM/CGI, addCGIPassAuth Onto the shop's.htaccessor virtual host.- An HTML page, 403 or timeout: a firewall, WAF, maintenance page or basic-auth protection is blocking the request.
Orders are missing. The endpoint returns orders of the shop the request is routed to. Check that the shop URL in proPulse is the URL of the right (sub-)shop.
Support
- Website: https://stathubs.com/
- Email: info@profihost.com
When you report a problem, include your OXID eShop version and edition, PHP version and module version. Never send the proPulse password.
License
See composer.json for the module license.
It includes QR Code Generator for JavaScript by Kazuhiko Arase, licensed under the MIT license (see the header of assets/src/js/qrcode-generator.js). "QR Code" is a registered trademark of DENSO WAVE INCORPORATED.