Today , we will learn about , how the shipping calculated in the opencart hyperlocal module . The hyperlocal shipping calculation is based on the distance between the seller and buyer . The shipping calculation is divided into two phases :
1 . In the first phase we calculate the distance between the seller and buyer by using the distance method . We pass the latitude and longitude of the seller and buyer with the unit (either ‘K’ for kilometers or ‘M’ for miles) and method returns the distance in specified unit .
2. In the second phase , we calculate the cost of shipping . It is divided into the three steps:
I. First module checks that seller have entered the price according to the weight and range of the product . If yes then it will be applied otherwise it goes to the second step .
II. In this step , module checks that whether the seller have entered the default price / flat rate or not . If yes then the shipping will be applied otherwise it moves to the last step .
III. In the last step , module applies the flat rate entered by the admin at the shipping module setting . The default flat rate in the admin setting is mandatory , so finally it will be applied .
Be the first to comment.