barkster Posted March 6, 2008 Share Posted March 6, 2008 I've been searching around trying to find a way to send customer information to process an order to USPS to ship and I cannot find anything. I've looked over their web tools and mainly see stuff for getting rates etc. I found a few classes on calculating postage but nothing on processing an order for shipment. Is this possible or anyone know of a class that I can use to do this? Thanks Link to comment https://forums.phpfreaks.com/topic/94771-shippopulate-package-with-usps/ Share on other sites More sharing options...
amites Posted March 6, 2008 Share Posted March 6, 2008 what exactly are you trying to do? track the sale? arrange pick-up from USPS? please be more specific Link to comment https://forums.phpfreaks.com/topic/94771-shippopulate-package-with-usps/#findComment-485584 Share on other sites More sharing options...
barkster Posted March 10, 2008 Author Share Posted March 10, 2008 I'm trying to ship packages via USPS or at least send the address data to USPS so I don't have to manually input it. Link to comment https://forums.phpfreaks.com/topic/94771-shippopulate-package-with-usps/#findComment-488413 Share on other sites More sharing options...
barkster Posted March 18, 2008 Author Share Posted March 18, 2008 I found this for those who are interested, I've hacked it up a bit but you get the idea <script src="https://sss-web.usps.com/cns/jscript/labelInformation.js"></script> <form target="_blank" method="post" action="https://sss-web.usps.com/cns/labelInformation.do" name="labelInformationForm" id="labelInformationForm"> <p> <input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value=""> </div> <input type="hidden" name="shortName" value=""> <input type="hidden" name="returnShortName" value=""> <input type="hidden" name="submitControl" value=""> <input type="hidden" name="previousPage" value="landingView"> <input type="hidden" name="previousPageParameters" value="deliveryCountry=1"> <input type="hidden" name="nextPage" value="noPage"> <input type="hidden" name="submitType" value=""> <input type="hidden" name="packageId" value=""> <input type="hidden" name="batch" value="false"> <input type="hidden" name="labelId" value=""> <input type="hidden" name="returnFullName" value="<?php echo $USPS_RETURN_FULLNAME; ?>" id="returnFullName"> <input type="hidden" name="returnCompanyName" value="<?php echo $USPS_RETURN_COMPANY_NAME; ?>" id="returnFullName"> <input type="hidden" name="returnAddressOne" value="<?php echo $USPS_RETURN_ADDRESSONE; ?>" id="returnAddressOne"> <input type="hidden" name="returnAddressTwo" value="<?php echo $USPS_RETURN_ADDRESSTWO; ?>" id="returnAddressTwo"> <input type="hidden" name="returnCity" value="<?php echo $USPS_RETURN_CITY; ?>" id="returnCity"> <input type="hidden" name="returnState" value="<?php echo $USPS_RETURN_STATE; ?>" id="returnState"> <input type="hidden" name="returnZipcode" value="<?php echo $USPS_RETURN_ZIPCODE; ?>" id="returnZipcode"> <input type="hidden" name="returnPhoneNumber" value="<?php echo $USPS_RETURN_PHONENUMBER; ?>" id="returnPhoneNumber"> <input type="hidden" name="deliveryCountry" value="<?php echo $USPS_DELIVERY_COUNTRY; ?>" id="deliveryCountry"> <input type="hidden" name="deliveryFullName" value="<?php echo $USPS_DELIVERY_FULLENAME; ?>" id="deliveryFullName"> <input type="hidden" name="deliveryCompanyName" value="<?php echo $USPS_DELIVERY_COMPANY; ?>" id="deliveryCompanyName"> <input type="hidden" name="deliveryAddressOne" value="<?php echo $USPS_DELIVERY_ADDRESSONE; ?>" id="deliveryAddressOne"> <input type="hidden" name="deliveryAddressTwo" value="<?php echo $USPS_DELIVERY_ADDRESSTWO; ?>" id="deliveryAddressTwo"> <input type="hidden" name="deliveryCity" value="<?php echo $USPS_DELIVERY_CITY; ?>" id="deliveryCity"> <input type="hidden" name="deliveryEmail" value="<?php echo $USPS_DELIVERY_EMAIL; ?>" id="deliveryEmail"> <input type="hidden" name="emailNotification" value="<?php echo $USPS_DELIVERY_NOTIFY; ?>" id="emailNotification"> <input type="hidden" name="deliveryPhoneNumber" value="<?php echo $USPS_DELIVERY_PHONE; ?>" id="deliveryPhoneNumber"> <input type="hidden" name="deliveryRefNbr" value="<?php echo $USPS_DELIVERY_REFNUM; ?>" id="deliveryRefNbr"> <input type="hidden" name="shippingWeightInPounds" value="<?php echo $USPS_WEIGHT_POUNDS; ?>" id="shippingWeightInPounds"> <input type="hidden" name="shippingWeightInOunces" value="<?php echo $USPS_WEIGHT_OUNCES; ?>" id="shippingWeightInOunces"> <input type="hidden" name="girthExceedMax" value="N" id="girthExceedMax"> <?php if ($USPS_SHIP_FROM_ZIP == 'same') { ?> <input type="hidden" name="shipFromZipCode" value="same" id="shipFromZipCode"> <?php } elseif ($USPS_SHIP_FROM_ZIP != 'same') { ?> <input type="hidden" name="shipFromZipCode" value="new" id="shipFromZipCode"> <input type="hidden" name="otherZipCode" value="<?php echo $USPS_SHIP_FROM_ZIP; ?>" id="otherZipCode"> <?php } ?> <?php if ($USPS_SHIP_COUNTRY == 1) { ?> <input type="hidden" name="deliveryState" value="<?php echo $USPS_DELIVERY_STATE; ?>" id="deliveryState"> <input type="hidden" name="deliveryZipcode" value="<?php echo $USPS_DELIVERY_ZIP; ?>" id="deliveryZipcode"> <?php } else { ?> <input type="hidden" name="deliveryAddressThree" value="" id="deliveryAddressThree"> <input type="hidden" name="deliveryPostalCode" value="<?php echo $order_check->fields['delivery_postcode']; ?>" id="deliveryPostalCode"> <?php if (USPS_DELIVERY_DEFAULT_CONTENTS_VALUE == "subtotal") { ?> <input type="hidden" name="intlContentsValue" value="<?php echo $order_total_check->fields['value']; ?>" id="intlContentsValue"> <?php } else if (USPS_DELIVERY_DEFAULT_CONTENTS_VALUE == "total") { ?> <input type="hidden" name="intlContentsValue" value="<?php echo $order_total_check2->fields['value']; ?>" id="intlContentsValue"> <?php } else { ?> <input type="hidden" name="intlContentsValue" value="<?php echo USPS_DELIVERY_DEFAULT_CONTENTS_VALUE; ?>" id="intlContentsValue"> <?php } ?> <input type="hidden" name="province" value="<?php echo $order_check->fields['delivery_state']; ?>" id="province"> <input type="hidden" name="returnToSender" value="<?php echo USPS_DELIVERY_DEFAULT_NONDELIVERY; ?>" id="returnToSender"> <input type="hidden" name="privacyActStmt" value="<?php echo USPS_DELIVERY_DEFAULT_ACKNOWLEDGE; ?>" id="privacyActStmt"> <?php } ?> <?php if ($USPS_INSURANCE_VALUE == "subtotal") { ?> <input type="hidden" name="contentsValue" value="<?php echo $USPS_INSURANCE_VALUE; ?>" id="contentsValue"> <?php } else if ($USPS_INSURANCE_VALUE == "total") { ?> <input type="hidden" name="contentsValue" value="<?php echo $USPS_INSURANCE_VALUE; ?>" id="contentsValue"> <?php } else { ?> <input type="hidden" name="contentsValue" value="<?php echo $USPS_INSURANCE_VALUE; ?>" id="contentsValue"> <?php } ?> </p> <p> <label> <input type="submit" name="button" id="button" value="Submit" /> </label> <label></label> </p> </form> Link to comment https://forums.phpfreaks.com/topic/94771-shippopulate-package-with-usps/#findComment-495170 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.