View Single Post
  #140  
Old 01-22-2015, 06:33 AM
 
cjstancil cjstancil is offline
 

Member
  
Join Date: May 2011
Posts: 26
 

Default Re: NEW xcart template - xtreme Gear

Update from my previous post (and plea for help):

Max from the X-Cart Store realized what was happening. Here's his response in case others encounter this issue:

The thing is that admin backend doesn't have access to variables of frontend templates. X-Cart admin is loading invoice .tpl files from the active template.

If you need to get the value of $xg_top_logo variable to show the invoice logo in admin area you should:
(1) Open file:
/include/history_order.php

(2) Find lines:
------------
} elseif ($mode == 'invoice') {

if (defined('IS_ADMIN_USER')) {

if (!empty($active_modules['XMultiCurrency'])) {

define('ADMIN_INVOICE', TRUE);
}

$smarty->assign('show_order_details', 'Y');
------------

(3) Add the folowing block of code below these lines:
------------
### TheXCartStore: Add logo to invoice (admin area) #######
$txs_xg_settings = TXS_XG_load_settings();
if ($txs_xg_settings['top_logo_id']) {
$query = "SELECT image_x, image_y, image_path FROM $sql_tbl[images_XG] WHERE id=$txs_xg_settings[top_logo_id]";
$xg_top_logo = func_query_first($query);
if (!empty($xg_top_logo['image_path'])) {
$xg_top_logo['image_url'] = func_get_image_url($txs_xg_settings['top_logo_id'], "XG", $xg_top_logo['image_path']);
} else {
$xg_top_logo = false;
}
$smarty->assign('xg_top_logo', $xg_top_logo);
}
### /TheXCartStore: Add logo to invoice (admin area) ######


I've done exactly what he suggested and now our company logo DOES appear when we "Print Receipt" from the store backend.

Chuck
__________________
Chuck
Logic Rail Technologies
X-Cart 4.7.10
Reply With Quote