CryptWerk Plugin
This is a CryptWerk plugin for PrestaShop. It converts your available products into an XML feed that CryptWerk can parse.
Features
+ The module exposes a <code>/module/cryptwerk/feed</code> endpoint that outputs all in-stock products as XML. + Each product includes: ID, title, link, price, description, categories, image, and brand (if available). + The feed is automatically updated as your catalog changes. + Adds a <code>CryptWerk Feed</code> tab under Catalog in PrestaShop admin
Requirements
Please ensure that you meet the following requirements before installing this plugin.
+ You have a CryptWerk account. + You are using PHP 8.1 or higher. + Your PrestaShop is version 9.0.0 or higher. + The intl, mbstring and simplexml PHP extensions are available.
Usage
1. Download the latest CryptWerk plugin. 2. Go to your PrestaShop store and upload the zip via <code>Modules > Module Manager > Upload a module</code>. 3. Click on <code>Catalog -> CryptWerk Feed</code>, which will redirect you to your feed URL. 4. Setup product sync within CryptWerk <code>Dashboard -> Synchronization & Import</code> using the <code>XML</code> type and your feed URL. 5. Await moderator approval on CryptWerk.
Development
If you want to work on the plugin, it is recommended to install/use the following:
Local development environment
1. Copy <code>development/.env.dist</code> to <code>development/.env</code> and adjust as needed. 2. Run:
cd development
docker compose up -d
3. Access PrestaShop at http://localhost:8000, which will redirect you to the proper Ngrok URL.
Building and linting
- <code>make build</code> – Installs dependencies and builds <code>cryptwerk.zip</code> in the <code>build/</code> folder.
- <code>make lint</code> – Runs PHP CS Fixer and PHPCS for code style checks.
- <code>make clean</code> – Cleans build artifacts and vendor folders.
Code structure
- <code>modules/cryptwerk/cryptwerk.php</code> – Main module class and PrestaShop integration
- <code>modules/cryptwerk/controllers/front/feed.php</code> – XML feed controller
- <code>modules/cryptwerk/src/Factory.php</code> – XML feed builder logic
- <code>modules/cryptwerk/config/routes.yml</code> – Custom routes
- <code>development/</code> – Docker, environment, and helper scripts
Autocomplete
- <code>development/autocomplete.php</code> provides PrestaShop class stubs for IDE autocompletion.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Contributing
Contributors looking to help out, before opening a pull request, please create an issue to get early feedback, discuss the best ways to tackle the problem and to ensure there is no work duplication.
Security
Please report security issues privately via email. See SECURITY.md for details.
PrestaShop Support
PrestaShop support can be found through its official channels.
License
Software, logo and designs are provided under MIT License.
Commentaires (0)
Votre avis ne peut pas être envoyé
Signaler le commentaire
Signalement envoyé
Votre signalement ne peut pas être envoyé