Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

If anyone has both Paypal WPP and Google Checkout, please help


natasha21

Recommended Posts

easy can be done.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

I was able to get the admin side working, but I'm having trouble on coding the shopping_cart.php, because they overlap.

I've tried some different variations. Sometimes I get a fatal error and sometimes the right column is missing.

Edited by natasha21
Link to comment
Share on other sites

works for me. Note file also has some other mods that may not match your site.

www.pavepatch.com

 

<?php
/*
 $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $
 and Autoremove1.08
 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require("includes/application_top.php");

//  print_r($_REQUEST);
//  echo '<pre>';
//  print_r($_SESSION);
//  echo '</pre>';

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

//---PayPal WPP Modification START ---//	
 if (tep_paypal_wpp_enabled() && $cart->count_contents() > 0) {
   $ec_enabled = true;
   //If they're here, they're either about to go to paypal or were sent back by an error, so clear these session vars
   if (tep_session_is_registered('paypal_ec_temp')) tep_session_unregister('paypal_ec_temp');
   if (tep_session_is_registered('paypal_ec_token')) tep_session_unregister('paypal_ec_token');
   if (tep_session_is_registered('paypal_ec_payer_id')) tep_session_unregister('paypal_ec_payer_id');
   if (tep_session_is_registered('paypal_ec_payer_info')) tep_session_unregister('paypal_ec_payer_info');
 } else {
   $ec_enabled = false;
 }
//---PayPal WPP Modification END---//

 $breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SHIPPING) . '\')">' . '<img src="images/icons/shipcost.gif" border="0"> ' . TEXT_SHIPPING_COST . '</a>'; ?></td></tr>
<!-- END estimated shipping -->
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
     </tr>
<?php
   if ($any_out_of_stock == 1) {
     if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
     <tr>
       <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
     </tr>
<?php
     } else {
?>
     <tr>
       <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
     </tr>
<?php
     }
   }
?>
     <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])) {
?>
               <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
   }
?>
               <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></form></td>
     </tr>
  <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 
     </tr>
  <tr>
    <td class="main">
   <?php
   // ** GOOGLE CHECKOUT **
   // Checks if the Google Checkout payment module has been enabled and if so 
   // includes gcheckout.php to add the Checkout button to the page 
   if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
     include_once('googlecheckout/gcheckout.php');
   }
   // ** END GOOGLE CHECKOUT **
   ?>
       </td>
     </tr>
  <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 
     </tr>
<? //---PayPal WPP Modification START ---// ?>
<?php
   if ($ec_enabled) {
?>
     <!--<tr>
       <td><?php // echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 
     </tr>-->
     <!--<tr>
       <td class="main" width="50%" valign="top"><b><?php // echo TEXT_PAYPALWPP_EC_HEADER; ?></b></td>
     <tr> -->
       <td width="100%" colspan=2 valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2">
         <tr>
           <td><table border="0" align="right" width="25%" height="100%" cellspacing="0" cellpadding="2">
             <tr>
               <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 align="right"><a href="<?php echo tep_href_link('ec_process.php', '', 'SSL'); ?>"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border=0></a> </td>
<!--                    <td align="left" valign="middle"><span style="font-size:11px; font-family: Arial, Verdana;"><?php // echo TEXT_PAYPALWPP_EC_BUTTON_TEXT; ?></span></td>
-->                    <!--<td width="10"><?php //echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> -->
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php } ?>
<? //---PayPal WPP Modification END ---// ?>
<?php
 } else {
?>
     <tr>
       <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
     </tr>
     <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 align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT_HOME) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 }
?>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

-Dave

Link to comment
Share on other sites

hey Brian,

 

I got

Fatal error:

Cannot redeclare class flat in /home/pixyc4/public_html/includes/modules/shipping/flat.php on line 13

 

on the bottom of my shopping_cart page and the right side was missing, but when i checked flat.php everything was the same as the orignal oscommerce version

Link to comment
Share on other sites

If anyone has paypal wpp and google checkout on their site, can I see your shopping_cart.php?

thanks!

 

I have been trying to set my checkout the same way. They both seem to work but I am having problems with paypal. But I want to know how your process works. For example I like the way google works, but not that fond of Paypal I wish they could work the same. I think it might confuse people if they click on paypal as a check out and still have to log-in on to my site. And have the option to still be able to pay on my site .

 

Or better yet which 2 did you install for google and paypal?

Site is underconstruction I am always looking for good advice on how to improve my site fill free to comment.

Thanks! ATise

Link to comment
Share on other sites

I have been trying to set my checkout the same way. They both seem to work but I am having problems with paypal. But I want to know how your process works. For example I like the way google works, but not that fond of Paypal I wish they could work the same. I think it might confuse people if they click on paypal as a check out and still have to log-in on to my site. And have the option to still be able to pay on my site .

 

Or better yet which 2 did you install for google and paypal?

 

paypal wpp by Dynamoeffects 0.9.2 and the official GC by Ropu 1.4.5

-Dave

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...