Installation
Before installing the extension, please make sure to Backup your web directory and store database
- Unzip the extension package file into the root folder of your Magento 2 installation.
- Connect to SSH console of your server:
- Navigate to the root folder of your Magento 2 setup
Run command as per below sequence,
php -f bin/magento setup:upgrade
php -f bin/magento module:enable Magedelight_Productavailability
php -f bin/magento setup:static-content:deploy
- Flush store cache
- log out from the backend and log in again
Backend Configuration (Admin side)
- Enable Module: Select “Yes” from Enable Module to enable extension
- Save postcode report for API: Select "Yes" to save postcode report
- Shipping Unavailability Message: Specify message to be displayed when shipping is not available
- Estimate Delivery Message: Specify message to display estimate delivery
- Check COD on Product: Select "Yes" to enable checking of COD on Products
COD Availability Message: Specify message to be displayed if COD is available
COD Unavailability Message: Specify message to be displayed when COD is unavailable
- Allow Alert When Product Available On Postcode: Specify “Yes” to allow to send alert when product is available for said postal code.
- Alert Email Template: Specify email template to be sent to user for the alert messages
Backend Functionality
Delivery Check > Postcode > Manage Postcode
Here, you can see list of previously added Post/Zip codes.
- Action – from Action you can select single Zip code for edit or delete the same.
- Bulk Actions – From top, you can also delete Post/Zip code in bulk.
- Filter – Filter is available to search Zip code with advance options
Add Postal code
This form will be used to add new postal/zip code. You will need to fill below details, (*, represents mandatory fields)
- Status: Specify “Yes”, if Post/Zip code is enabled
- Post/Zip is Range: Enable to enter Post/Zip code in range
- Postcode From: Specify postcode starting from (For postcode range)
- Postcode To: Specify postcode ending to (For postcode range)
- Post/Zip Code: Enter Post/Zip code for which you want to allow shipping or COD
- City/District: Enter City name for Post/Zip code
- Country: Select country from the given list
- State/Province: Specify State/Province of the given Post/Zip code
Restrict Shipping Method for Pin/Zip code
- Shipping Estimation Message: Specify message to display shipping estimate
- Is Restrict Shipping Method: Enable to restrict shipping methods for specific pin/zip code or range of pin/zip code
Restrict Payment Method for Pin/Zip code
Postcode Rule
Here, you can see list of previously added Postcode rules,
- Action – from Action you can select single Postcode rule for edit or delete the same.
- Bulk Actions – From top, you can also delete Postcode rule in bulk.
- Filter – Filter is available to search Postcode rule with advance options
Edit the postcode rule,
Assign product to postcode in bulk using CSV file. Please find sample CSV file on click of download button.
Import Product: Choose CSV file to import and click on "Save Postcode Rule"
1. Import postcode from geonames using "php -dmemory_limit=-1 bin/magento magedelight:postcode:import --file IN.zip --clear" command
http://download.geonames.org/export/zip/
2. We can export csv using the admin side and command line. exported csv will save to var directory
command to export csv : "php bin/magento magedelight_postcode_export"
3. After export csv we can change csv as per our need and we can reupload csv by admin side and command line.
We can not upload csv more than 1 MB size from admin side.
We can reupload csv more than 1 MB size using command line as below
"php -dmemory_limit=-1 bin/magento magedelight:postcode:update --file US.csv --clear"
Note: We have to use csv file name as a country code. like IN.csv,US.csv etc.
Please check below video for points 1 and 3
https://www.loom.com/share/050f166eead6473a9b5759274136b3ab
Please check below video for point 2
https://www.loom.com/share/7d1325e6799d4312adcf3940e87da533
For first time while we add postcodes from terminal please use insert command (php -dmemory_limit=-1 bin/magento magedelight:postcode:import --file IN.zip --clear)
If we want to update records then we have to use command (php -dmemory_limit=-1 bin/magento magedelight:postcode:update --file IN.csv --clear)
Import Postal Code
- Import Postcodes: Select CSV File to import Postcodes and click on "Import Postcodes"
- Export Postcodes: Click on Export to export Postcode in CSV file
Import using Geo Names using Command Prompt
Step 1: Please get zip of country from http://download.geonames.org/export/zip/ and keep to /var directory of your Magento installation
Step 2: Run php bin/magento magedelight:postcode:import --file <ZIPFileName> --clear
here, file name is case sensitive
--clear: use clear option to remove existing postal codes for particular country
Reports
Postcode search count
This report will provide number of count for individual postal codes.
Product wise postcode search count
This report will show product wise postal code search.
Postcode search count for unavailable products
This report will show postal code search count for unavailable products.
Frontend Functionality
User is able to check for delivery availability by entering postal code/zip code in below text box and click on “Check” button.
Thank you for choosing MageDelight!