Download the PHP package clawrock/m2-product-shipping without Composer
On this page you can find all versions of the php package clawrock/m2-product-shipping. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clawrock/m2-product-shipping
More information about clawrock/m2-product-shipping
Files in clawrock/m2-product-shipping
Package m2-product-shipping
Short Description Module is responsible for displaying shipping methods on product view page.
License OSL-3.0 AFL-3.0
Informations about the package m2-product-shipping
ProductShipping
Module is responsible for displaying available shipping methods for product view page using predefined country.
Requirements
1) Magento 2.1+
Installation (using composer)
composer require clawrock/m2-product-shipping
php bin/magento setup:upgrade
Installation (manually)
- Clone the repository to
app/code/ClawRock/ProductShipping
php bin/magento setup:upgrade
Configuration
- Go to Stores -> Configuration -> ClawRock -> Product Shipping
- Select country which will be used to calculate available shipping methods, otherwise shipping methods won't be returned
- You can also edit message that will be displayed when API returns empty array (shipping methods not found)
API
You can get shipping methods for product using API request.
Simple product
Body:
Configurable product
Body:
Keys in super_attribute array are super attribute ids, values are option ids, e.g. 142 is color attribute and 167 is red option.
Bundle product
Body:
Keys in bundle_option array are option ids, values are selection ids. There might be several selections in one option i.e. multiple select, checkboxes. Keys in bundle_option_qty array are options ids, values are qty of options.
Tests
To run test run from console: vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
All versions of m2-product-shipping with dependencies
magento/zendframework1 Version ^1.12
magento/module-catalog Version >=101.0
magento/module-bundle Version >=100.1
magento/module-quote Version >=100.1
magento/module-swatches Version >=100.1
magento/module-configurable-product Version >=100.1
magento/module-directory Version >=100.1
magento/module-tax Version >=100.1