Advance software forum
February 04, 2012, 02:12:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Moving the Google Checkout Button, and only using the google checkout button  (Read 581 times)
0 Members and 1 Guest are viewing this topic.
overbound
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: February 07, 2009, 12:43:13 AM »

I'm using the level one google checkout module found here: http://addons.oscommerce.com/info/6525

I'm having google checkout as my only option so I would like to move the google checkout button up as shown in the picture below.



Now I know a little html and the basic php structure and this wouldn't seem like a hard thing to do so I decided to attempt to do this my self.  Here is the code  I used to attempt to move the button up into the table:

Code:
<tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
                <td class="main"><?php echo tep_image_submit('button_update_cart.gif'IMAGE_BUTTON_UPDATE_CART); ?></td>
<td align = "right" class="main"><?php if (defined('GOOGLECHECKOUT_ENABLED') && GOOGLECHECKOUT_ENABLED == 'true') include('googlecheckout/google_shopping_cart.php');?></td>

The problem with this code is when I click the google checkout button it just reloads the shopping cart and does not go to google checkout.  I cannot figure out why.

However if I stick to the orignial which has the google button under the gray outlined table it works just fine.  Here's that code:

Code:
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
                <td class="main"><?php echo tep_image_submit('button_update_cart.gif'IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
    $back 
sizeof($navigation->path)-2;
    if (isset(
$navigation->path[$back])) {
?>

               
<?php
    
}
?>

<tr>
   
   
        </td>
      </tr>
               
              </tr>
            </table></td>
          </tr>
        </table></form></td>
      </tr>
<tr>
    <td>
     <?php
    
if (defined('GOOGLECHECKOUT_ENABLED') && GOOGLECHECKOUT_ENABLED == 'true') include('googlecheckout/google_shopping_cart.php');
    
?>

        </td>
      </tr>

So does anyone know what's going on I haven't the slightest idea.
Logged
Alex
Administrator
Full Member
*****
Offline Offline

Posts: 128


View Profile
« Reply #1 on: February 07, 2009, 09:38:51 AM »

Hello overbound,

This is very simple, man. The google checkout button itself is a FORM which is submitted via google checkout button, and CANNOT be placed inside other form. By the code above it is obviously seen that you have placed a google checkout button placeholder INSIDE the shopping cart form.

Solution is: find where the </form> tag of shopping cart appears, and place google checkout button after it, OR
remake the whole shopping cart form of Osc so it will finish AFTER update cart button, then </form>, then include google checkout button.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!