plugineria / product-shipping-price-magento2
Show product Shipping price in Magento2
Requires
- php: ~7.3.0||~7.4.0
- magento/framework: ^102.0||^103.0
- magento/module-catalog: ^103.0||^104.0
- magento/module-configurable-product: ^100
- magento/module-customer: ^102.0||^103.0
- magento/module-quote: ^101.1
- magento/module-shipping: ^100.3
- magento/module-store: ^101.0
- magento/module-webapi: ^100.0
- plugineria/product-shipping-price: ^0.2.2
Requires (Dev)
- magento/magento-coding-standard: ^6.0
- magento/magento2-base: ^2.3
- magento/module-dhl: ^100.3
- magento/module-eav: ^102.1
- magento/module-fedex: ^100.3
- magento/module-offline-shipping: ^100.3
- magento/module-ups: ^100.3
- magento/module-usps: ^100.3
- magento/theme-frontend-blank: ^100.3
- magepal/magento2-customshippingrate: ^1.6
- phpstan/phpstan: ^0.12.64
- phpunit/phpunit: ^9.5
- shipperhq/module-shipper: ^20.39
- slevomat/coding-standard: ^6.4
- squizlabs/php_codesniffer: ^3.5
- symfony/dom-crawler: ^4.4
- symfony/http-client: ^5.2
- tddwizard/magento2-fixtures: ^1.0
- webshopapps/module-matrixrate: ^20.1
Replaces
This package is auto-updated.
Last update: 2024-12-22 00:19:24 UTC
README
Estimate product shipping rates right on product page.
- Calculates minimal available shipping rate on product page.
- Displays all available shipping options for signle product before adding to cart.
- Provides REST API endpoints
- Possibility to configure default shipping address or use existing address for registered users.
Tested shipping methods
- Flatrate
- DHL
- UPS
- US Postal Service
- Federal Express
- Free Shipping
- Table rate
Tested product types
- Simple
- Virtual
- Configurable
Architecture
An implementation of Magento2 module with Hexagonal architecture by Yury Ksenevich.
Source code is split into 4 tiers:
- Domain / Business logic - implemented in
plugineria/product-shipping-price
library. - Application logic - implemented in
plugineria/product-shipping-price
library. - Infrastructure - Magento-specific adapters for business logic, located in
Magento2/Infrastructure/
- UI - API endpoints, frontend controllers and routers located in
Magento2/Ui/
System requirements
- Tested on Magento versions: 2.3.6+, 2.4.1+
- PHP 7.3 or 7.4
Installation as a Magento2 module
:warning: Please note that you can only install the extension using composer.
- Backup your store database and web directory
Open a terminal and move to Magento root directory
run these commands in console:
composer require plugineria/product-shipping-price-magento2
bin/magento module:enable Plugineria_ProductShippingPrice
Configure Example Shipping Address in
admin
>Stores
>Configuration
>Plugineria
>Product Shipping Price
>Example Shipping Address
Flush cache
REST API
GET /V1/products/{sku}/shippingRates
Gets list of shipping rates for product
Request params
- sku - string product SKU
Response
[
{
"price": 0,
"code": "string",
"title": "string",
"description": "string",
"shipping_method": {
"id": "string",
"title": "string"
}
}
]
GET /V1/products/{sku}/shippingRates/minimal
Gets minimal shipping rate for product
Request params
- sku - string product SKU
Response
If rate found:
{
"price": 0,
"code": "string",
"title": "string",
"description": "string",
"shipping_method": {
"id": "string",
"title": "string"
}
}
If rate not found:
{}
User Interface
Product page
Minimal shipping rate block in add to cart section:
Popup with all shipping rates for product:
License
- OSL 3.0
- AFL 3.0
- Icons by Semantic UI
- No warranty, explicit or implicit, provided.
Contributing
By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the license(s) under which this project is distributed.