bigpedro Posted December 17, 2013 Share Posted December 17, 2013 We do not need to have the site logo on our printed invoice as it is used for internal purposes only. However we would like both the delivery and billing address to be shown. On admin/skins/default/templates/orders.print.php I have deleted the store logo and it is my intention to display the billing address in it's place. However this is where my problem is!! I guess I have to call this info on admin/sources/orders.in.php ? I'm sure it's an easy answer. I just can't find it! Any Ideas? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 17, 2013 Share Posted December 17, 2013 CubeCart gets all the data relevant to an order. However, some of that data is not in a human-readable form. In /admin/sources/orders.index.inc.php, near line 417, starts the gathering/processing of data to be printed. Near line 458 is a pair of statements that fetches the state name from the supplied state code number for the delivery address (state_d and country_d). We need to add two more statements that will do the same for the billing address (state and country): $summary['state'] = (is_numeric($summary['state'])) ? getStateFormat($summary['state']) : $summary['state']; $summary['country'] = getCountryFormat($summary['country']); Fixing the above, we now have a full workable array to be used in the template: $order.company_name $order.title $order.first_name $order.line1 $order.line2 $order.town $order.state $order.postcode $order.country Quote Link to comment Share on other sites More sharing options...
bigpedro Posted December 18, 2013 Author Share Posted December 18, 2013 You sir, are a genius! Quote Link to comment Share on other sites More sharing options...
Ms Holly Posted January 13, 2014 Share Posted January 13, 2014 I would love to add the billing name to the order invoice. So say Ordered By: and the billing name. In a box under the shipping information. Is there an easy way to do this? Thanks in advance Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 13, 2014 Share Posted January 13, 2014 In the file /admin/skins/default/templates/orders.print.php, near line 65, starts a fieldset of shipping information. If you want to add another fieldset below it, try adding the following after the </fieldset> on line 70:<fieldset class="other"><legend>Order placed by:</legend> <div> {if !empty($order.name) && empty($order.last_name)}{$order.name}{else}{$order.title} {$order.first_name} {$order.last_name}{/if}<br /> {if !empty($order.company_name)}{$order.company_name}<br />{/if} </div> </fieldset> This gives us the First and Last Name (and the Company Name if it exists) of the Billing Address info. Finally, in admin, Maintenance, Rebuild tab, clear the cache so that CubeCart will fetch and use this new copy of the template. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.