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

Simple Sample Shipping Module

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 12-29-2014, 07:01 AM
 
Sunny Koh Sunny Koh is offline
 

Member
  
Join Date: Dec 2014
Posts: 10
 

Default Simple Sample Shipping Module

Hello,

Does anyone know where I can find the sample code for a very simple shipping module? I have written some php code for my WeightStep calculation for shipping but am unsure where should I fitting into the system. Thanks
__________________
Studio Head Personae Studios L.L.P.
Managing Partner Straits Pen L.L.P.
www.straitspen.com/shop/

Running
X-Cart 5.1.9 Business
Point OF Sales
Reply With Quote
  #2  
Old 12-29-2014, 10:13 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: Simple Sample Shipping Module

have you looked at the developer documentation?
__________________
X-Cart: 5.2.6
Reply With Quote
  #3  
Old 12-29-2014, 10:15 AM
 
Sunny Koh Sunny Koh is offline
 

Member
  
Join Date: Dec 2014
Posts: 10
 

Default Re: Simple Sample Shipping Module

Yes I have, doesn't tell me what are the methods I have to implement or what is the min needed.
__________________
Studio Head Personae Studios L.L.P.
Managing Partner Straits Pen L.L.P.
www.straitspen.com/shop/

Running
X-Cart 5.1.9 Business
Point OF Sales
Reply With Quote
  #4  
Old 12-29-2014, 10:17 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: Simple Sample Shipping Module

Are you looking to remove the other shipping options and have only yours, or do you want to modify values for existing shipping methods?
__________________
X-Cart: 5.2.6
Reply With Quote
  #5  
Old 12-29-2014, 12:37 PM
 
Sunny Koh Sunny Koh is offline
 

Member
  
Join Date: Dec 2014
Posts: 10
 

Default Re: Simple Sample Shipping Module

I am actually trying to implement my own shipping calculation method as the system provided ones do not suit the local post office tables. I already manage to write the code in php on implementing the calculation but am trying to hunt down what is needed to implement it as a module. The code I have posted http://forum.x-cart.com/showthread.php?t=70853 but this seems to be the place to ask some of these development questions.
__________________
Studio Head Personae Studios L.L.P.
Managing Partner Straits Pen L.L.P.
www.straitspen.com/shop/

Running
X-Cart 5.1.9 Business
Point OF Sales
Reply With Quote
  #6  
Old 12-29-2014, 12:45 PM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: Simple Sample Shipping Module

Your best bet would be to look at one of the pre-defined shipping modules like FedEx.
You will find this in /classes/XLite/Module/CDev/FedEx.

You will be able to see that the majority of functions relate to getting data and processing it - you could strip these out and remain with the core functions necessary to perform your tasks.

The core functions can be found in the subfolder Model\Shipping\Processor\fedex.php. This should give you a good point to start producing what you are looking for.

When in doubt, or when there is insufficient information or documentation, always have a look at how other modules do stuff.
__________________
X-Cart: 5.2.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev 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 09:05 AM.

   

 
X-Cart forums © 2001-2020