Hello Steven,
Yes, EasyStore supports dynamic, API-calculated shipping methods, so you do not need to configure static shipping amounts in the backend.
EasyStore uses a dynamic carrier plugin architecture under the easystoreshipping plugin group. To set this up, please check the following:
1. EasyStore Configuration
- Go to System → Plugins in Joomla, locate your custom shipping plugin under the
easystoreshipping group, enable it, and configure your API parameters.
- Go to EasyStore → Settings → Shipping.
- Edit the relevant shipping zone (for example, Uruguay).
- Under Carrier Options, enable your custom carrier plugin.
- You do not need to define static prices or weight-based rules for the carrier if the shipping cost is being returned dynamically by your API.
2. Custom Plugin Requirements
If the rate is not appearing during checkout, please make sure your plugin follows EasyStore's shipping plugin architecture:
- The plugin group should be
easystoreshipping in the plugin manifest.
- The plugin should extend
JoomShaper\Component\EasyStore\Administrator\Plugin\CommonShippingPlugin.
- The plugin should listen for the
onEasyStoreGetShippingMethods event.
- The shipping address can be retrieved from the checkout event, including the country, state, city, postcode, and address.
- After receiving the shipping cost from your API, the calculated rate needs to be added to the
shippingMethods array and passed back through the event.
For example:
namespace YourNamespace\Plugin\EasyStoreShipping\UruguayCarrier\Extension;
use Joomla\Event\Event;
use JoomShaper\Component\EasyStore\Administrator\Plugin\CommonShippingPlugin;
class UruguayCarrierShipping extends CommonShippingPlugin
{
public function onEasyStoreGetShippingMethods(Event $event)
{
$arguments = $event->getArguments();
$shippingAddress = $arguments['subject']->shipping_address;
// Validate the shipping address
if (
empty($shippingAddress) ||
empty($shippingAddress->country_code) ||
empty($shippingAddress->city)
) {
return;
}
// Call your Uruguay shipping API here
$apiResponse = $this->callUruguayCarrierApi($shippingAddress);
$shippingMethods = $event->getArgument('shippingMethods') ?? [];
foreach ($apiResponse['rates'] as $rate) {
$shippingMethods[] = [
'uuid' => $this->generate_uuid(),
'id' => 'uruguay_carrier_' . $rate['code'],
'name' => $rate['title'],
'rate' => (float) $rate['amount'],
'estimate' => $rate['delivery_time'],
'provider' => $this->_name,
];
}
$event->setArgument('shippingMethods', $shippingMethods);
}
}
The important part is that the rate value is populated with the amount returned by your API. EasyStore can then use that value as the shipping cost during checkout without requiring a predefined static amount in the shipping configuration.
If you are still having trouble with your current implementation, please share the plugin code and any error messages/console or network errors you see when the shipping address is entered at checkout. We can then check whether the issue is related to the event, address data, API response, or the way the shipping method is being registered.