NewBudda Posted October 6, 2009 Posted October 6, 2009 There are two things that I would like to change about the Invoice that is generated. 1. I would like to switch the Invoice with the Dellivery Address. 2. I would like to remove the date stamp at the bottom right of the invoice page. How do I do that? I look at the source code of the invoice.php but I dont't even understand where to start... Could anybody help me out? I would like to avoid installing a contribution if possible! Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
knifeman Posted October 6, 2009 Posted October 6, 2009 There are two things that I would like to change about the Invoice that is generated. 1. I would like to switch the Invoice with the Dellivery Address. 2. I would like to remove the date stamp at the bottom right of the invoice page. How do I do that? I look at the source code of the invoice.php but I dont't even understand where to start... Could anybody help me out? I would like to avoid installing a contribution if possible! I don't understand what you want done in #1, but the item #2 is controlled by your printer settings, not the invoice.php. In your browser, click file-print-page setup. Tim
NewBudda Posted October 6, 2009 Author Posted October 6, 2009 the item #2 is controlled by your printer settings, not the invoice.php. In your browser, click file-print-page setup.Tim Thank you Tim, that was it! Regarding the first Item: When printing the Invoice I get 2 Textfields with addresses, on the left "Delivery Adress" and on the right "Billing Adress". Sadly the Information for these are swapped. So the Delivery Adress is under the Heading for Billing adress. This is confusing my customers greatly! Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
knifeman Posted October 6, 2009 Posted October 6, 2009 Thank you Tim, that was it! Regarding the first Item: When printing the Invoice I get 2 Textfields with addresses, on the left "Delivery Adress" and on the right "Billing Adress". Sadly the Information for these are swapped. So the Delivery Adress is under the Heading for Billing adress. This is confusing my customers greatly! Here is the code from a stock RC2a invoice. Sold to on the left and ship to on the right: <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table>
NewBudda Posted October 6, 2009 Author Posted October 6, 2009 Hmm mine looks like this: <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'store_logo.png', STORE_NAME); ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <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" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> </table> Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
knifeman Posted October 7, 2009 Posted October 7, 2009 is it possible that your defines are mixed up? These 2 defines are in admin/includes/languages/english/invoice.php define('ENTRY_SOLD_TO', 'SOLD TO:'); define('ENTRY_SHIP_TO', 'SHIP TO:'); Tim
NewBudda Posted October 7, 2009 Author Posted October 7, 2009 is it possible that your defines are mixed up? These 2 defines are in admin/includes/languages/english/invoice.php define('ENTRY_SOLD_TO', 'SOLD TO:'); define('ENTRY_SHIP_TO', 'SHIP TO:'); Tim I checked those and they are fine. Thanks for the idea. Where are the adresses in your invoice? Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
knifeman Posted October 7, 2009 Posted October 7, 2009 I checked those and they are fine. Thanks for the idea. Where are the adresses in your invoice? SOLD TO is on the left SHIP To is on the right
NewBudda Posted October 8, 2009 Author Posted October 8, 2009 ah so its the same. This is so annoying as the "windows" in all the invoice enevelopes is on the left... Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
Recommended Posts
Archived
This topic is now archived and is closed to further replies.