LokiCheckout_Calcurates
This Magento 2 module is an add-on package to the LokiCheckout. It makes the Calcurates shipping integration (calcurates/module-magento) work in the Loki Checkout.
Features
- Calcurates rates (flat rates, carriers, table rates, in-store pickup) in the Loki shipping step, with the carrier image of Calcurates as icon and the info message of the rate below it;
- Delivery date and time slot selection for rates that offer time slots. The choice (plus its fee) is stored in the Calcurates quote data and copied to the order by Calcurates;
- In-store pickup: Selecting a pickup store replaces the shipping address with the store address;
- Shipping labels and tracking are created in the Magento Admin by Calcurates itself (no Loki specific code needed).
Installation
Install this package via composer:
composer require loki-checkout/magento2-calcurates
Next, enable this module:
bin/magento module:enable LokiCheckout_Calcurates
Configuration
Configure Calcurates under Stores > Configuration > Sales > Delivery Methods > Calcurates:
carriers/calcurates/active: Yescarriers/calcurates/calcurates_token: The API token of your Calcurates website (Website > Edit > Integration). This value is stored encrypted, so use the Admin Panel orbin/magento config:set carriers/calcurates/calcurates_token <token>(which encrypts it), not a raw database update.carriers/calcurates/api_url:https://api.calcurates.com(default)
The Calcurates account itself needs at least one shipping option (flat rate, carrier, in-store pickup) for an origin that ships to your customers. Without shipping options, Calcurates only returns the error rate "This shipping method is not available". For shipping labels, a carrier with services needs to be connected in Calcurates.
Testing
The unit, integration and Playwright tests use a fake Calcurates API (Test/Fake, Test/fixtures). For Playwright, the fixture module LokiCheckout_CalcuratesTestFixture (Test/Fixture/CalcuratesTestFixture, installed by hersir-additional.sh and in GitLab CI) wires this fake API into the shop. Never install the fixture module in production.
The integration test Test/Integration/Webservice/LiveApiTest.php runs against the real API when the environment variable CALCURATES_API_KEY is set.
Current status
@dev
to the composer command.
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_Calcurates.git
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout-calcurates.delivery-date.date
loki-checkout-calcurates.delivery-date.time
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
Calcurates_ModuleMagento
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Magento_AdminNotification
Magento_Backend
Magento_Catalog
Magento_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Cms
Magento_Config
Magento_Csp
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Indexer
Magento_MediaGalleryUiApi
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Rule
Magento_Sales
Magento_SalesRule
Magento_SalesSequence
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Theme
Magento_Ui
Magento_User
Magento_Variable
Magento_Vault
Magento_Widget
Yireo_CspUtilities
Composer details
LokiCheckout_Calcuratesloki-checkout/magento2-calcurates
calcurates/module-magento: ^1.49
ext-json: *
ext-pcre: *
loki-checkout/magento2-core: ^2.5
loki/magento2-components: ^2.6
loki/magento2-css-utils: ^1.0
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-quote: ^101.2
magento/module-shipping: ^100.4
magento/module-store: ^101.1
php: >=8.2 <8.6