g3jewelry Posted January 14, 2009 Share Posted January 14, 2009 There's probably a simple solution to this, but I don't know what it is, so I'm asking for help. I've attached an image of what my delima is. As you can probably see, order information (Sub-Total, Shipping Amount and Total Order Amount) is showing up twice. It seems to be a display issue, because I called PayPal and ran a test transcation and they said its only passing 1 amount, so its actually chargin people the right amount, in this case $895, but why the heck is it showing up twice. Please help. Thanks. Quote Link to comment Share on other sites More sharing options...
identidadoc Posted January 14, 2009 Share Posted January 14, 2009 Hello Quincy, Can you post your code (checkout_confirmation.php) so we can take a look at it? Quote Link to comment Share on other sites More sharing options...
g3jewelry Posted January 14, 2009 Author Share Posted January 14, 2009 Yes. Here is the code from the checkout_confirmation page that renders the section in the image that duplicates itself: <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><!-- PWA BOF --> <td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="' . ((tep_session_is_registered('customer_is_guest'))?tep_href_link(FILENAME_CREATE_ACCOUNT, 'guest=guest', 'SSL'):tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr><!-- PWA EOF --> <tr> <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td> </tr> <tr> <td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> <td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2"> <?php if (MODULE_ORDER_TOTAL_INSTALLED) { $order_total_modules->process(); echo $order_total_modules->output(); } ?> </table></td> </tr> </table> ---------------------------------------------------------------------------------------------------------------------------------- And here is the rendered code when I do a view source on that page. You can see its duplicating the results: <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><!-- PWA BOF --> <td class="main"><b>Billing Address</b> <a href="https://www.g3jewelry.com/catalog/create_account.php/guest/guest?osCsid=g48snn4al93vog0fl5sksj61t0"><span class="orderEdit">(Edit)</span></a></td> </tr><!-- PWA EOF --> <tr> <td class="main">Tim Clark<br> 34 time street<br> Tampa, AL 26716<br> United States</td> </tr> <tr> <td class="main"><b>Payment Method</b> <a href="https://www.g3jewelry.com/catalog/checkout_payment.php?osCsid=g48snn4al93vog0fl5sksj61t0"><span class="orderEdit">(Edit)</span></a></td> </tr> <tr> <td class="main">Credit Card</td> </tr> </table></td> <td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td align="right" class="main">Sub-Total:</td> <td align="right" class="main">$895.00</td> </tr> <tr> <td align="right" class="main">Sub-Total:</td> <td align="right" class="main">$895.00</td> </tr> <tr> <td align="right" class="main">Flat Rate (FREE UPS Ground Shipping):</td> <td align="right" class="main">$0.00</td> </tr> <tr> <td align="right" class="main">Flat Rate (FREE UPS Ground Shipping):</td> <td align="right" class="main">$0.00</td> </tr> <tr> <td align="right" class="main">Total:</td> <td align="right" class="main"><b>$895.00</b></td> </tr> <tr> <td align="right" class="main">Total:</td> <td align="right" class="main"><b>$895.00</b></td> </tr> </table></td> </tr> </table> ------------------------------------------------------------------------------------------------------------------- Any assistance you can provide would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
g3jewelry Posted January 14, 2009 Author Share Posted January 14, 2009 Ok. I was able to fix this on my own. There was an extra line of code in the head that was spitting out duplicate results. Not sure how it got there, but I commented it out and now the page looks fine. The only thing is now, when something goes wrong with the transaction, such as decline card or invalid address, there are no warning messages showing. It just goes back to the credit card informatio page. Any idea why? I used to see that colored bar at the top of the page with the message inside of it. Thanks for all your help. Quote Link to comment Share on other sites More sharing options...
jsalis Posted March 6, 2009 Share Posted March 6, 2009 Ok. I was able to fix this on my own. There was an extra line of code in the head that was spitting out duplicate results. Not sure how it got there, but I commented it out and now the page looks fine. The only thing is now, when something goes wrong with the transaction, such as decline card or invalid address, there are no warning messages showing. It just goes back to the credit card informatio page. Any idea why? I used to see that colored bar at the top of the page with the message inside of it. Thanks for all your help. I am very happy to hear that you figured this out, but could you please tell everyone exactly what extra line of code you commented out. I have the exact same issue and would love to know the solution. Quote I run a completely customized osC2.2 RC1 shop with mostly custom modifications that replicate the features of many contributions available except in a way that the data is more easily synced with Quickbooks on a continuous basis. Link to comment Share on other sites More sharing options...
jsalis Posted March 7, 2009 Share Posted March 7, 2009 I am very happy to hear that you figured this out, but could you please tell everyone exactly what extra line of code you commented out. I have the exact same issue and would love to know the solution. I was able to figure this out with only moderate levels of frustration. The problem was that the following line of code: $order_total_modules->process(); Was on line 69, but it was also on line 264 as part of the FWR tax exempt contribution. The following line of code outputs whatever is processed in the above line of code. echo $order_total_modules->output(); Since the former was called twice before it was output I was getting the same effect as the original poster (displaying the entries of the order confirmation page twice). This code is found in the checkout_confirmation.php file of course. Hope this helps anyone else having this problem. Basically any number of contributions which call $order_total_modules->process(); can be installed, but you need to make sure you are only calling it once, otherwise when you call echo $order_total_modules->output(); the entries will be displayed however, many times the former was called. Quote I run a completely customized osC2.2 RC1 shop with mostly custom modifications that replicate the features of many contributions available except in a way that the data is more easily synced with Quickbooks on a continuous basis. Link to comment Share on other sites More sharing options...
dsdintn Posted July 25, 2011 Share Posted July 25, 2011 I was able to figure this out with only moderate levels of frustration. The problem was that the following line of code: $order_total_modules->process(); Was on line 69, but it was also on line 264 as part of the FWR tax exempt contribution. The following line of code outputs whatever is processed in the above line of code. echo $order_total_modules->output(); Since the former was called twice before it was output I was getting the same effect as the original poster (displaying the entries of the order confirmation page twice). This code is found in the checkout_confirmation.php file of course. Hope this helps anyone else having this problem. Basically any number of contributions which call $order_total_modules->process(); can be installed, but you need to make sure you are only calling it once, otherwise when you call echo $order_total_modules->output(); the entries will be displayed however, many times the former was called. can you tell me what file this is in Opencart? I am having the same problem but cannot locate where the email is actually generated. Thank You, Damon 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.