mattyb Posted December 27, 2004 Share Posted December 27, 2004 Did the install of this contrib. and it seems to work fine except when I actually view the invoice or packing slip. As you can it is printing out the field names inside of the invoice. It does the same for the packing slip. Any suggestions on how to fix this. I'm also a little new on the whole PHP thing as well. Thanx in advance. Matt Quote Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2004 Share Posted December 27, 2004 you must have missed a language file for the contribution, where you have defines, read thru the contribution again Quote Link to comment Share on other sites More sharing options...
mattyb Posted December 27, 2004 Author Share Posted December 27, 2004 Thanx. I missed the the language file on the admin side. However, it still prints the price twice, the total twice, the footer info. as defined in the contrib. Any thoughts? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2004 Share Posted December 27, 2004 that means whatever application it is using is calling the info twice to print. you will need to troubleshoot the code and find the duplicate calls. Quote Link to comment Share on other sites More sharing options...
mattyb Posted December 27, 2004 Author Share Posted December 27, 2004 Thanx for the help. I didn't realize that the price and total twice is displayed so that it shows the price with and without tax. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2004 Share Posted December 27, 2004 Thanx. I missed the the language file on the admin side. However, it still prints the price twice, the total twice, the footer info. as defined in the contrib. Any thoughts? <{POST_SNAPBACK}> This is a somewhat hacked up solution, but it works. In catalog/admin/language/english/invoice.php ------------------------------------------------------------------------------------------ Find this define('TABLE_HEADING_PRICE_EXCLUDING_TAX', 'Unit Price (Tax ex.)'); define('TABLE_HEADING_PRICE_INCLUDING_TAX', 'Unit Price (Tax inc.)'); define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Total (Tax ex.)'); define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Total (Tax inc.)'); Change to this define('TABLE_HEADING_PRICE_EXCLUDING_TAX', 'Price'); define('TABLE_HEADING_PRICE_INCLUDING_TAX', 'Price'); define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Total'); define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Total'); ------------------------------------------------------------------------------------------ In catalog/admin/invoice.php ------------------------------------------------------------------------------------------ Find this <td class="dataTableHeadingContent-invoice" align="right"><?php echo TABLE_HEADING_TAX; ?></td> Change to this <td class="dataTableHeadingContent-invoice" align="right"></td> ------------------------------------------------------------------------------------------ Find this <td class="dataTableHeadingContent-invoice" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> Change to this <td class="dataTableHeadingContent-invoice" align="right"></td> ------------------------------------------------------------------------------------------ Find this <td class="dataTableHeadingContent-invoice" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> Change to this <td class="dataTableHeadingContent-invoice" align="right"></td> ------------------------------------------------------------------------------------------ Find this echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . Change to this echo ' <td class="dataTableContent" align="right" valign="top">' . "\n" . ------------------------------------------------------------------------------------------ Find this ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . Change to this ' <td class="dataTableContent" align="right" valign="top"><b>' . '</b></td>' . "\n" . ------------------------------------------------------------------------------------------ Find this ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . Change to this ' <td class="dataTableContent" align="right" valign="top"><b>' . '</b></td>' . "\n" . ------------------------------------------------------------------------------------------ I think the problem might have to do with whether or not your prices are set to display with tax included. The form seems to be set up to show prices and totals with and without tax included regardless of whether or not you have configured your site to show prices with tax included. I didn't spend any time looking at the code to figure out how to fix it, I just hacked it up to display what I wanted on my invoices. BACK UP FILES BEFORE MAKING CHANGES............ Quote Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2004 Share Posted December 27, 2004 Thanx. I missed the the language file on the admin side. However, it still prints the price twice, the total twice, the footer info. as defined in the contrib. Any thoughts? <{POST_SNAPBACK}> To edit the footer, edit this line in catalog/admin/includes/language/english/invoice.php (line 44): define('ENTRY_FOOTER', 'Invoice Footer<br><br><br><br>Invoice Footer<br>Invoice Footer: 12345/67890'); 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.