View Single Post
  #3  
Old 02-26-2018, 12:34 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Update "Shipping Modifications" Tutorial?

As far as I see the most recent version still uses the same \XLite\Model\Shipping\Processor\AProcessor base class for integrating with shipping services, and getRates() method is still the one that returns the list of available shipping methods, however now it has a default implementation that works this way:
- it calls prepareInputData() to translate the order data into the data to be sent to the carrier's server
- then it calls performRequest() to perform the request to the carrier's server and returns an array of \XLite\Model\Shipping\Rate
- finally, it calls the postProcessRates() to do some extra work over the rates

I guess you are to implement these methods in your custom shipping carrier module. However, you are not forced to follow this logic - for example, the existing free AustraliaPost module has its own getRates() method.

Anyway, I think the tutorial should work for 5.3 too. What problems did you face when following the tutorial? What didn't work?
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote