Development

Changeset 20814

You must first sign up to be able to contribute.

Changeset 20814

Show
Ignore:
Timestamp:
08/05/09 22:52:28 (4 years ago)
Author:
davec
Message:

Updated readme with more details useage and installation notes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfUPSShippingPlugin/README

    r20794 r20814  
    22 
    33 
    4 = sfShoppingCartPlugin plugin = 
     4= sfUPSShippingPlugin plugin = 
    55 
    66The 'sfUPSShippingPlugin' library is used to retreive shipping cost estimates from the UPS XML API. You can submit to/from zip codes, and get back the cost for a specific shipping type, or get back a list 
     
    1515 
    1616  {{{ 
    17     symfony plugin-install http://plugins.symfony-project.com/sfUPSShippingPlugin 
     17    symfony plugin:install sfUPSShippingPlugin 
    1818  }}} 
    1919 
     
    2424  }}} 
    2525 
     26== Usage == 
     27 
     28  {{{ 
     29 
     30//Populate these with your UPS developer account/key info 
     31//You can register at https://www.ups.com/one-to-one/register?sysid=myups&lang=en&langc=US&loc=en_US 
     32$accessKey = ''; 
     33$userId = ''; 
     34$password = ''; 
     35$shipperPostalCode = ''; 
     36$shipperCountry = ''; 
     37$upsAccountNumber = ''; 
     38 
     39//Create the object thru which we will make UPS API requists 
     40$ups = new UPSShipping($accessKey, $userId, $password, $shipperPostalCode, $shipperCountry, $upsAccountNumber); 
     41$ups->debugOn = true; 
     42 
     43//Get a price quote for a single shipping type 
     44$price = $ups->getSingleShippingCost(97007, 'US', 90210, 'US', UPSShipping::SERVICE_CODE_GROUND, 1.2, 12, 12, 12); 
     45print "Price is $price\n"; 
     46 
     47//Get a list of price/shipping type options 
     48$priceList = $ups->getShippingPriceOptionList(97007, 'US', 90210, 'US', 1.2, 12, 12, 12); 
     49print "Options are : " . print_r($priceList, true) . "\n"; 
     50 
     51  }}}