Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Big 'N' Bold Packing Slip Rate Topic   - - - - -

 

Posted 23 May 2013 - 09:50 AM #1

A simple mod to allow larger display of the recipient address on standard packing slips.
  • Auto Capitalization of the customer's name and address.
  • Auto Uppercase for the City/Suburb
  • Uses the Code prefix rather than description (Victoria = VIC, Florida = FL)
  • Easier to read size for printouts on letter or A4 paper.
  • Hides the Country is 'Australia' - Change to your own country to save the extra print line.

skins/basic/mail/orders/print_packing_slip.tpl
Line 45 Start
Line End @ <tr align="top" class="scissors">

   	 {if $profile_fields.S}
        <table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-top: 32px;">
        <tr valign="top">
            <td width="100%" align="center" style="border-bottom: 1px dashed #000000; padding-bottom: 20px;">
            <!--    <h3 style="font: bold 17px Tahoma; padding: 0px 0px 3px 1px; margin: 0px;">{$lang.ship_to}:</h3> -->
                {if $order_info.s_firstname || $order_info.s_lastname}
                <p style="margin: 2px 0px 3px 0px; font-size: 32px; text-transform: capitalize;">
                    {$order_info.s_firstname} {$order_info.s_lastname}
                </p>
                {/if}
                {if $order_info.s_address || $order_info.s_address_2}
                <p style="margin: 2px 0px 3px 0px; font-size: 32px; text-transform: capitalize;">
                    {$order_info.s_address}, {$order_info.s_address_2}
                </p>
                {/if}
                {if $order_info.s_city || $order_info.s_state_descr || $order_info.s_zipcode}
                <p style="margin: 2px 0px 3px 0px; font-size: 32px; text-transform: uppercase;">
                    {$order_info.s_city}, <br />{$order_info.s_state}, {$order_info.s_zipcode}
                </p>
                {/if}
                {if $order_info.s_country_descr !="Australia"}
                <p style="margin: 2px 0px 3px 0px; font-size: 32px; text-transform: capitalize;">
                    {$order_info.s_country_descr}
                </p>
                {/if}
                {include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S}
            </td>
        </tr>

I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 

Posted 23 May 2013 - 01:50 PM #2

Wow this is great! Love that it will clean up the address.
Will this work with CS-Cart 2.2?

Just tried it and it works great in my cs-cart 2.2 !!
Thank you @JesseLeeStringer!

 

Posted 23 May 2013 - 04:05 PM #3

Hey @JesseLeeStringer, do you know how to 'hide' extra profile fields if they are not used?
I have a profile field called 'Company Name:' which will print out on the invoice/packing slip even if that field is blank. (most of my customers are regular buyers and not for a business).

I see that it looks for all the extra profiles here:
{include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S}

which then looks the profiles_extra_fields.tpl:
{foreach from=$fields item="field"}
{if !$field.field_name}
{assign var="value" value=$order_info.fields[$field.field_id]}
<p>
{$field.description}:
{if "AOL"|strpos:$field.field_type !== false} {* Titles/States/Countries *}
  {assign var="title" value="`$field.field_id`_descr"}
  {$user_data.$title}
{elseif $field.field_type == "C"}  {* Checkbox *}
  {if $value == "Y"}{$lang.yes}{else}{$lang.no}{/if}
{elseif $field.field_type == "D"}  {* Date *}
  {$value|date_format:$settings.Appearance.date_format}
{elseif "RS"|strpos:$field.field_type !== false}  {* Selectbox/Radio *}
  {$field.values.$value}
{else}  {* input/textarea *}
  {$value|default:"-"}
{/if}
</p>
{/if}
{/foreach}

Is it possible somehow (i think it would go into this tpl?) that if the extra field (in my case it would be the Company Name) if it is blank then it would not print it on the packing slip?

sorry to ask but I hope this is just an easy answer.
thanks!!

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3884 posts

Posted 23 May 2013 - 06:42 PM #4

Probably should be something like this:

{if $profile_fields.S}
	 {include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S}
{/if}


 
  • Scott_C
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 452 posts

Posted 23 May 2013 - 11:44 PM #5

Nice work. The auto capitalisation feature is a good idea, makes things more legible for a busy courier. Its amazing how many customers either write everything in pixie writing (no caps) OR EVERYTHING IN CAPS. Lol.

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3884 posts

Posted 24 May 2013 - 12:51 AM #6

Nice work. The auto capitalisation feature is a good idea, makes things more legible for a busy courier. Its amazing how many customers either write everything in pixie writing (no caps) OR EVERYTHING IN CAPS. Lol.


I hear that. Probably should implement it in the fields at checkout/registration to nip it in the bud in the beginning. :D

 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 831 posts

Posted 24 May 2013 - 04:54 PM #7

@Kung Pow Kitty,
I was able to edit profile_extra_fields.tpl to omit the Company when not present like this:
{foreach from=$fields item="field"}
{if !$field.field_name}
{assign var="value" value=$order_info.fields[$field.field_id]}
{if $field.description == "Company"}<p style="margin: 2px 0px 2px 0px; font-size: 16px; text-transform: capitalize;">{* input/textarea *}{$value|default:""}</p>
{else}
<p>
{$field.description}:
{if "AOL"|strpos:$field.field_type !== false} {* Titles/States/Countries *}
  {assign var="title" value="`$field.field_id`_descr"}
  {$user_data.$title}
{elseif $field.field_type == "C"}  {* Checkbox *}
  {if $value == "Y"}{$lang.yes}{else}{$lang.no}{/if}
{elseif $field.field_type == "D"}  {* Date *}
  {$value|date_format:$settings.Appearance.date_format}
{elseif "RS"|strpos:$field.field_type !== false}  {* Selectbox/Radio *}
  {$field.values.$value}
{else}  {* input/textarea *}
  {$value|default:"-"}
{/if}
</p>
{/if}
{/if}
{/foreach}

The problem with using this template for "formatting" the Packing Slip's address label is that the formatting applies to ALL pages where the profile extra fields are used, including Invoice, etc.

I don't understand why CS-Cart includes a Company Name in the customer's profile information, but not in the Shipping or Billing information. This would be a lot easier if something as fundamentally required as a "company name" was in with the order info.

CS-Cart Ultimate ver 4.11.3


 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 831 posts

Posted 03 June 2013 - 03:34 PM #8

I've stopped creating Mailing Labels for customers who purchase USPS First Class Mail as I'm now able to actually USE the top of the packing list as the mailing label. This saved time, money, paper and prevents typos.
I took JesseLeeSinger's fabulous work and formatted the top of the Packing Slip template (/skins/basic/mail/orders/print_packing_slip.tpl). I moved the table border so it's not around the Mailing Label and dotted line. You will have to tweak the first cell width in the table so your city,state,zip all print on one line. Also, "United States" is hard-coded into the template as my country - you can change this to any other country so it doesn't print on the mailing label when you are mailing intra-country.
starting at line 36 - replaces all code thru the Customer info comment in the original template.
{if !$company_placement_info}
{assign var="company_placement_info" value=$order_info.company_id|fn_get_company_placement_info}
{/if}
{assign var="profile_fields" value='I'|fn_get_profile_fields}
	    {if $profile_fields.S}
	    <table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
	 <td style="width: 13%; font-size: 8px; font-family: Arial; border-bottom: 1px solid #000000;">
  <p style="font-size: 8px; margin: 2px 0px 2px 0px;"><strong>{$company_placement_info.company_name}</strong><br />
  {$company_placement_info.company_address}<br />
  {$company_placement_info.company_city}{if $company_placement_info.company_city && ($company_placement_info.company_state_descr || $company_placement_info.company_zipcode)},{/if} {$company_placement_info.company_state_descr} {$company_placement_info.company_zipcode}<br />
  {$company_placement_info.company_country_descr}</p>
	 </td>
	 <td align="left" valign="middle" style="border-bottom: 1px solid #000000;"><img src="{if $manifest.Mail_logo.vendor}{$config.images_path}{else}{$images_dir}/{/if}{$manifest.Mail_logo.filename}" width="150" height="34" border="0" alt="{$manifest.Mail_logo.alt}" /></td>
	    </tr>
<tr valign="top">
		    <td colspan="2" width="100%" align="left" style="border-bottom: 1px dashed #000000; padding-left: 50px; padding-bottom: 10px;">
			    {if $order_info.s_firstname || $order_info.s_lastname}
			    <p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: capitalize;">
				    {$order_info.s_firstname} {$order_info.s_lastname}
			    </p>
			    {/if}
  {include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S}
  {if $order_info.s_address || $order_info.s_address_2}
			    <p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: capitalize;">
				    {$order_info.s_address} <br />{$order_info.s_address_2}
			    </p>
			    {/if}
			    {if $order_info.s_city || $order_info.s_state_descr || $order_info.s_zipcode}
			    <p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: uppercase;">
				    <strong>{$order_info.s_city}  {$order_info.s_state}  {$order_info.s_zipcode}</strong>
			    </p>
			    {/if}
			    {if $order_info.s_country_descr !="United States"}
			    <p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: uppercase;">
				    <strong>{$order_info.s_country_descr}</strong>
			    </p>
			    {/if}
			   
		    </td>
	    </tr>
<tr valign="top" class="scissors">
  <td colspan="2" width="100%" style="padding-left: 20px;">
   <img src="{$images_dir}/scissors.gif" border="0" />
  </td>
</tr>
</table>
{/if}
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="background-color: #f4f6f8; height: 100%;">
<tr>
<td align="center" style="width: 100%; height: 100%; padding: 24px 0;">
<div style="background-color: #ffffff; border: 1px solid #e6e6e6; margin: 0px auto; padding: 0px 44px 0px 46px; width: 510px; text-align: left;">
  {* Customer info *}

CS-Cart Ultimate ver 4.11.3


 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 831 posts

Posted 03 June 2013 - 03:35 PM #9

Also, a paper cutter is required :-)

CS-Cart Ultimate ver 4.11.3


 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 831 posts

Posted 03 July 2013 - 03:20 PM #10

I have referenced http://www.bitboost....ss-formats.html for years to assist me in formatting International Address formats for shipping.
In an effort to apply the rules for proper placement of Postal Codes on mailing labels I have modified the Packing List template so the top of the printed packing list can be cut off an actually used as the mailing label for First Class & First Class International shipments. (In the US, you can ship up to 4 lbs or $400 value via First Class International, and up to 13oz via First Class domestic).
I have additionally added the Order Number to the label for easy matching to the package, since I pack and ship in separate steps.

Starting at line 36 (CS-Cart v3.0.6) - replaces all code thru the Customer info comment in the original template.
{if !$company_placement_info}
{assign var="company_placement_info" value=$order_info.company_id|fn_get_company_placement_info}
{/if}
{assign var="profile_fields" value='I'|fn_get_profile_fields}
		{if $profile_fields.S}
		<table cellpadding="0" cellspacing="0" width="100%" style="padding-bottom: 10px; border-bottom: 1px dashed #000000;">
<tr>
	 <td style="width: 13%; font-size: 8px; font-family: Arial; border-bottom: 1px solid #000000;">
  <p style="font-size: 8px; margin: 2px 0px 2px 0px;"><strong>{$company_placement_info.company_name}</strong><br />
  {$company_placement_info.company_address}<br />
  {$company_placement_info.company_city}{if $company_placement_info.company_city && ($company_placement_info.company_state_descr || $company_placement_info.company_zipcode)},{/if} {$company_placement_info.company_state_descr} {$company_placement_info.company_zipcode}<br />
  {$company_placement_info.company_country_descr}</p>
	 </td>
	 <td align="left" valign="middle" style="border-bottom: 1px solid #000000;"><img src="{if $manifest.Mail_logo.vendor}{$config.images_path}{else}{$images_dir}/{/if}{$manifest.Mail_logo.filename}" width="150" height="34" border="0" alt="{$manifest.Mail_logo.alt}" /></td>
		</tr>
<tr valign="top">
			<td colspan="2">
	  <table cellpadding="0" cellspacing="0" width="100%">
	  <tr valign="top">
	   <td width="5%" style="font-size: 8px; font-family: Arial;">{$order_info.order_id}</td>
	   <td style="padding-left: 20px;">	
	{if $order_info.s_firstname || $order_info.s_lastname}
	<p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: capitalize;">
		{$order_info.s_firstname} {$order_info.s_lastname}
	</p>
	{/if}
	{include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S}
	{if $order_info.s_address || $order_info.s_address_2}
	<p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: capitalize;">
		{$order_info.s_address} <br />{$order_info.s_address_2}
	</p>
	{/if}
	{if $order_info.s_city || $order_info.s_state_descr || $order_info.s_zipcode}
	<p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: uppercase;">
	 {if $order_info.s_country_descr == "United States" || $order_info.s_country_descr == "Canada" || $order_info.s_country_descr == "Australia" || $order_info.s_country_descr == "United States Virgin Islands" || $order_info.s_country_descr == "Puerto Rico" || $order_info.s_country_descr == "India"  || $order_info.s_country_descr == "Indonesia" || $order_info.s_country_descr == "New Zealand" || $order_info.s_country_descr == "Republic of Singapore" || $order_info.s_country_descr == "South Korea" || $order_info.s_country_descr == "Taiwan"}
	 <strong>{$order_info.s_city}  {$order_info.s_state}  {$order_info.s_zipcode}</strong>
	 {elseif $order_info.s_country_descr == "United Kingdom (Great Britain)" || $order_info.s_country_descr == "Isle of Man" || $order_info.s_country_descr == "South Africa" || $order_info.s_country_descr == "Russia" || $order_info.s_country_descr == "Ukraine"}
	 <strong>{$order_info.s_city}  {$order_info.s_state}<br />{$order_info.s_zipcode}</strong>
	 {else}
	 <strong>{$order_info.s_zipcode}  {$order_info.s_city}  {$order_info.s_state}</strong>
	 {/if}
	</p>
	{/if}
	{if $order_info.s_country_descr !="United States"}
	<p style="margin: 2px 0px 2px 0px; font-size: 14px; text-transform: uppercase;">
		<strong>{$order_info.s_country_descr}</strong>
	</p>
	{/if}
	   </td>
	  </tr>
	  </table>
			</td>
		</tr>
</table>
{/if}
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="background-color: #f4f6f8; height: 100%;">
<tr>
<td align="center" style="width: 100%; height: 100%; padding: 24px 0;">
<div style="background-color: #ffffff; border: 1px solid #e6e6e6; margin: 0px auto; padding: 0px 44px 0px 46px; width: 510px; text-align: left;">
  {* Customer info *}

If you ship small packages (under 4 lbs and under $400 in value) worldwide, this is a great time saver.
I should note that I include a small (150 x 34) image of my Logo for Invoices in the label, you will have to adjust these dimensions to accommodate your own logo.

I hope you find this helpful. I have.

Note: In Admin, Shipping&Taxes > Countries, I renamed country name "Singapore" to "Republic of Singapore" - this is the new official name and is used in the logic above.

CS-Cart Ultimate ver 4.11.3


 

Posted 15 October 2013 - 01:31 PM #11

Does anyone know where this is located in CS-Cart v 4.x?

NVM, found it in the backend files!

Edited by LocalGoodness, 15 October 2013 - 02:15 PM.


 
  • websmart
  • Junior Member
  • Members
  • Join Date: 11-Feb 10
  • 78 posts

Posted 17 December 2013 - 06:35 PM #12

To locate the print packing slip file go to the design folder > backend > mail > orders >

You'll find those files there to edit

Happy coding!

 

Posted 18 December 2013 - 12:22 AM #13

If you want to add the customer's email address on the packing slip (so your peons don't need to search for it);


   	 <tr valign="top">
            <td style="font: 12px verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$lang.email}:</td>
            <td valign="bottom">{$order_info.email}</td>
        </tr>

I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.