Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Trouble with Checkout Confirmation Page


  • You cannot reply to this topic
6 replies to this topic

#1 g3jewelry

  • Community Member
  • 10 posts
  • Real Name:Quincy Brown

Posted 14 January 2009, 07:30

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.

[img]http://www.g3jewelry.com/images/checkout-duplicateinfo.jpg[/img]

#2 hotprinka

  • Community Member
  • 6 posts
  • Real Name:Hotprinka
  • Location:Netherlands

Posted 14 January 2009, 08:39

Hello Quincy,

Can you post your code (checkout_confirmation.php) so we can take a look at it?

#3 g3jewelry

  • Community Member
  • 10 posts
  • Real Name:Quincy Brown

Posted 14 January 2009, 14:14

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.

#4 g3jewelry

  • Community Member
  • 10 posts
  • Real Name:Quincy Brown

Posted 14 January 2009, 14:48

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.

#5 jsalis

  • Community Member
  • 44 posts
  • Real Name:Jason Salis
  • Gender:Male
  • Location:Nevada City, CA

Posted 06 March 2009, 22:04

View Postg3jewelry, on Jan 14 2009, 06:48 AM, said:

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.
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.

#6 jsalis

  • Community Member
  • 44 posts
  • Real Name:Jason Salis
  • Gender:Male
  • Location:Nevada City, CA

Posted 07 March 2009, 00:03

View Postjsalis, on Mar 6 2009, 02:04 PM, said:

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.
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.

#7 dsdintn

  • Community Member
  • 1 posts
  • Real Name:Damon

Posted 25 July 2011, 20:42

View Postjsalis, on 07 March 2009, 00:03, said:

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