osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Help with PayPal mod

This is a discussion on Help with PayPal mod within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; G'day and thanks for viewing my inquiry. I am currently trying to install Updated PayPal payment screen mod, but am ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-14-2005, 04:58 AM
New Member
 
Join Date: Dec 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Studio143
Default Help with PayPal mod

G'day and thanks for viewing my inquiry. I am currently trying to install
Updated PayPal payment screen mod, but am somewhat confused. I have uploaded all files as indicated in readme, now this is what I am to change in my checkout_payment.php file...

Edit your /catalog/checkout_payment.php file as follows:


Find Old code:
--------------

<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>



and replace with:
-----------------

<td class="main" colspan="3" nowrap><?php
if ($selection[$i]['module'] == 'PayPal') {
?>
<big><b>
Credit Card
<img src="catalog/images/logo_ccVisa.gif" border="0" title=" Visa " alt="Visa" align="bottom">
<img src="catalog/images/logo_ccMC.gif" border="0" title=" MasterCard " alt="MasterCard" align="bottom">
<img src="catalog/images/logo_ccDiscover.gif" border="0" title=" Discover " alt="Discover" align="bottom">
<img src="catalog/images/logo_ccAmex.gif" border="0" title=" American Express " alt="American Express"align="bottom">
or
<img src="catalog/images/banner_intl.gif" border="0" title=" PayPal " alt="PayPal" align="bottom">
</b></big>
<br>
You do not need to be a PayPal member to pay by credit card.
<script>
document.writeln('<a style="cursor:hand" onclick="javascriptopup=window.open('
+ '\'http://(your domain here)/catalog/CreditCardExplain.html\',\'popup\','
+ '\'scrollbars,resizable,width=500,height=600,left= 50,top=50\'); popup.focus(); return false;">'
+ '<font color="blue"><u>[info]</u></font></a>');
</script><noscript>
<a href="CreditCardExplain.html" target="_blank"><font color="blue"><u>[info]</u></font></a>
</noscript>
<?php
} else if ($selection[$i]['module'] == 'Check/Money Order') {
?><big><b>Check or Money Order </b></big>
<img src="/check.gif" border=0 alt=" Send Us a Check " align="absmiddle">
<?php
} else {
echo '<big><b>' . $selection[$i]['module'] . '</b></big>';
}
?></td>


Next edit as needed by adding your own information like, the image locations
domain name etc... and upload file.


However, this is currently what my check_out.php looks like:

<?php
/*
$Id: checkout_payment.php,v 1.113 2003/06/29 23:03:27 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART) );
}

// if no shipping method has been selected, redirect the customer to the shipping method selection page
if (!tep_session_is_registered('shipping')) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPP ING, '', 'SSL'));
}

// avoid hack attempts during the checkout procedure by checking the internal cartID
if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
if ($cart->cartID != $cartID) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPP ING, '', 'SSL'));
}
}

// Stock Check
if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART) );
break;
}
}
}

// if no billing destination address was selected, use the customers own address as default
if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
$billto = $customer_default_address_id;
} else {
// verify the selected billing address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
$billto = $customer_default_address_id;
if (tep_session_is_registered('payment')) tep_session_unregister('payment');
}
}

require(DIR_WS_CLASSES . 'order.php');
$order = new order;
require(DIR_WS_CLASSES . 'order_total.php');//ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total;//ICW ADDED FOR CREDIT CLASS SYSTEM

if (!tep_session_is_registered('comments')) tep_session_register('comments');

$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
$total_count = $cart->count_contents_virtual(); //ICW ADDED FOR CREDIT CLASS SYSTEM

// load all enabled payment modules
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment;

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

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

$content = CONTENT_CHECKOUT_PAYMENT;
$javascript = $content . '.js.php';

require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

can someone assist me as to where I need code changed?

Thanks Mates...
The Aussie!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 02-15-2005, 09:24 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,074
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Help with PayPal mod

Look in your templates/content dir for checkout_payment.tpl.php.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
paypal and paypal IPN, whats the diff? lhotch osCommerce 2.2 Installation Help 1 09-06-2003 07:34 PM


All times are GMT -8. The time now is 11:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax