Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Update "Shipping Modifications" Tutorial?
 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 01-26-2017, 08:35 PM
 
jake.middleton jake.middleton is offline
 

Member
  
Join Date: Oct 2011
Posts: 14
 

Question Update "Shipping Modifications" Tutorial?

Hey there,

I've developed a few modules in the past for the company that I work for, but this time I'm looking to create a new shipping method for a new carrier that's not offered by default. I was looking at the "Shipping Modifications" tutorial in the developer docs, but it appears to be out of date with X-Cart 5.3. Would it be possible to update this tutorial for X-Cart 5.3 as many of the other tutorials were? It would be a great help. Thanks!
Reply With Quote
  #2  
Old 02-08-2018, 12:08 PM
 
rct rct is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 83
 

Default Re: Update "Shipping Modifications" Tutorial?

Quote:
Originally Posted by jake.middleton
Hey there,

I've developed a few modules in the past for the company that I work for, but this time I'm looking to create a new shipping method for a new carrier that's not offered by default. I was looking at the "Shipping Modifications" tutorial in the developer docs, but it appears to be out of date with X-Cart 5.3. Would it be possible to update this tutorial for X-Cart 5.3 as many of the other tutorials were? It would be a great help. Thanks!

Agree !! It would be great if someone can update it! Thanks
__________________
JOHN - X Cart 4.4.5 (LIVE) working on x cart v.5.3 biz, X-payment 2.1.1
Reply With Quote
  #3  
Old 02-26-2018, 12:34 AM
  qualiteam's Avatar 
qualiteam qualiteam is online now
 

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

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
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:15 AM.

   

 
X-Cart forums © 2001-2018