Code to display customer's phone#?

I'm trying to add the custmer's phone number to the packaging slip and not just the invoice.



I went into admin > design > template editor > my skin > mail > orders and clicked on invoice.tpl to copy the following code, which I believe, displays the customer's phone#?



{/if}
{if $order_info.s_phone && $profields_s.s_phone}


{if $profields_s.s_phone}{$order_info.s_phone} {/if}






I'm editing print_packing_slip.tpl in /skins/my_skin/mail/orders but after adding the code it does nothing (just a blank space). The order I'm viewing the packaging slip for does have a customer's phone# assoicated with it. Is my code wrong?



I am a bit outdated but using CS-CART: version 2.1.3 PROFESSIONAL. Any help would be appreciated.

Outside the formatting issues (your closing p tag should be inside the closing smarty if tag)…

If there is no SHIPPING phone number then it will not show

Note there are possibly 3 phone numbers in an order:

  1. contact phone (phone) (for registered customer)
  2. billing phone (b_phone)
  3. shipping phone (s_phone)



    Suggest you add a 2 comment lines to show when the s_phone is present and when it's not. Then view the source of the email that is sent and look for the comments.

I'm confused. I tried to add:



{if $order_info.phone_descr}


{$order_info.phone_descr}


{/if}




Is the _desrc line throwing it off? Nothing appears. I checked the order and customer registered with a phone#. It displays in admin when I pull up their order.

Try {$order_info.s_phone|default:$order_info.phone}

or 'b_phone' if you're looking for the billing phone.

If not set, it will use the contact phone instead.

I just wanted to say thank you! I found this info very helpful in editing my print_packing_slip.tpl file using this code:



{if $order_info.s_phone}


{$order_info.s_phone|default:$order_info.phone}


{/if}