Posted - 01/24/2022 : 09:10:49
For those in the USA or Australia using Sendle.com (shipping service that is like Stamps.com or Endicia.com, but without the high monthly fees - and lower First Class rates for packages that are 1 lb or less) here is a mod to automatically send your customer's address and details to the Sendle site:
in incorders.php, around line 1612 find:
if(! ($isprinter || $doedit)){ ?> <div class="billing container container12"> <div class="clipboard left"></div>
Replace with:
if(! ($isprinter || $doedit) && $alldata['ordShipName']==''){ ?> <div class="billing container container12"> <div class="clipboard left"><?php print '<a href="https://www.sendle.com/dashboard/prepare_form?description=Artwork&customer_reference=' . $alldata['ordID'] . '&delivery_address_line1=' . $alldata['ordAddress'] . '&delivery_address_line2=' . $alldata['ordAddress2'] . '&delivery_country=USA' . '&delivery_address_suburb=' . $alldata['ordCity'] . '&delivery_address_state=' . $alldata['ordState'] . '&delivery_address_postcode=' . $alldata['ordZip'] . '&receiver_name=' . $alldata['ordName'] . '&receiver_email=' . str_replace('@','%40',$alldata['ordEmail']) . '&receiver_contact_number=' . $alldata['ordPhone'] . '" target="_Sendle"> <img src="adminimages/sendle.png" width=87 height=22 alt="Sendle"></a>';?></div>
Find near line 1708:
<div class="ship container container12"> <div class="clipboard left"></div>
Replace with:
<div class="ship container container12"> <div class="clipboard left"><?php print '<a href="https://www.sendle.com/dashboard/prepare_form?description=Artwork&customer_reference=' . $alldata['ordID'] . '&delivery_address_line1=' . $alldata['ordShipAddress'] . '&delivery_address_line2=' . $alldata['ordShipAddress2'] . '&delivery_country=USA' . '&delivery_address_suburb=' . $alldata['ordShipCity'] . '&delivery_address_state=' . $alldata['ordShipState'] . '&delivery_address_postcode=' . $alldata['ordShipZip'] . '&receiver_name=' . $alldata['ordShipName'] . '&receiver_email=' . str_replace('@','%40',$alldata['ordEmail']) . '&receiver_contact_number=' . $alldata['ordShipPhone'] . '" target="_Sendle"> <img src="adminimages/sendle.png" width=87 height=22 alt="Sendle"></a>';?></div>
Get/save this image and upload it to your /vsadmin/adminimages: [img]https://www.orientaloutpost.com/vsadmin/adminimages/sendle.png[/img]
You will need to be logged in to your Sendle.com account for this to work (otherwise, you just find a page that asks you to log in or sign up). The link opens in a new _Sendle target tab on your browser (change that if you want).
You will want to change the default description from description=Artwork to something appropriate for your business. I sell artwork, so that's my placeholder. Sendle requires a brief description. Use + signs if there are spaces like description=Amazing+Products so the link does not break.
At the top, I added a $alldata['ordShipName']=='' question, which determines if there is shipping info. It will only show the Sendle and Copy buttons on the billing if that is the only info. This helps you not make a mistake (and ship to billing if there is a shipping address).
If you are in Australia, you will need to tinker with the delivery_country=USA part. Sendle is only domestic in the USA, but Australia has more options that I don't have access to.
[url="https://www.OrientalOutpost.com"]Oriental Outpost Custom Wall Scrolls[/url]
|