Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One Page Checkout Support


Guest

Recommended Posts

Hi Ski

 

The answer to your question is they are meant for a custom right column if enabled, which appears to be left out in install instructions its in earleier versions install guide try 1.0.3 for the custom right column

 

Steve

Hi Steve.

 

Thanks for the info, I will take a look.

 

As for my shipping table option not showing, I was wondering if you could point me in the right direction on where I can look for this anomaly. Last night, I remove the OPC entirely from my shop and installed a different module (2 Steps Simple Checkout) to see what that module did. Well, lo and behold, the module replicates the exact same problem :huh:

The option to choose which shipping to use does not appear at all unless the shipping module does NOT have the Shipping Zone selected! :'( :angry: What gives?????

 

My shipping Tables Rates work flawlessly so that a customer from Europe (i.e. France) will pay one shipping amount versus a person from Kansas. So I do not understand how or where I can find what is causing the problem if my shipping Zones is set inside all of my Table Rates.

 

I sure could use some hints on where on the code or file I can look for this. I really would like to have OPC on my shop.

 

Thank you and appreciate any help you may be able to provide.

 

ski

Link to comment
Share on other sites

Hi Steve.

 

Thanks for the info, I will take a look.

 

As for my shipping table option not showing, I was wondering if you could point me in the right direction on where I can look for this anomaly. Last night, I remove the OPC entirely from my shop and installed a different module (2 Steps Simple Checkout) to see what that module did. Well, lo and behold, the module replicates the exact same problem :huh:

The option to choose which shipping to use does not appear at all unless the shipping module does NOT have the Shipping Zone selected! :'( :angry: What gives?????

 

My shipping Tables Rates work flawlessly so that a customer from Europe (i.e. France) will pay one shipping amount versus a person from Kansas. So I do not understand how or where I can find what is causing the problem if my shipping Zones is set inside all of my Table Rates.

 

I sure could use some hints on where on the code or file I can look for this. I really would like to have OPC on my shop.

 

Thank you and appreciate any help you may be able to provide.

 

ski

Hi Ski

 

Try this one http://addons.oscommerce.com/info/6521

Full support for ALL OsCommerce shipping modules

* Standard OsCommerce features like FREE SHIPPING, STOCK CHECK, ALLOW STOCK CHECKOUT are supported

* Virtual downloadable products are supported

* Basic Payment modules like Cash on Delivery, Bank Transfer and PayPal are supported

* Authorize.Net payment module is supported

 

I would also sugggest email itwebesperts email is in install.htm for sending bugs to

 

Steve

Edited by steve_s
Link to comment
Share on other sites

Hi,

 

I have a new problem, I have reverted to use the standard paypal until I can figure out how to get the IPN working, if anyone knows, if someone can tell me which one to implement that would be great, in regards to the standard paypal, everything works (did a few real transaction) however once the payment has been completed and approved, when i press onto returning to the oscommerce website from paypal, it goes to a white page in checkout_process.php if someone can help me in regards to that, it would be greatly appreciated

 

Kind regards

 

Epsilon Solutions

Link to comment
Share on other sites

Hi Ski

 

Try this one http://addons.oscommerce.com/info/6521

Full support for ALL OsCommerce shipping modules

* Standard OsCommerce features like FREE SHIPPING, STOCK CHECK, ALLOW STOCK CHECKOUT are supported

* Virtual downloadable products are supported

* Basic Payment modules like Cash on Delivery, Bank Transfer and PayPal are supported

* Authorize.Net payment module is supported

 

I would also sugggest email itwebesperts email is in install.htm for sending bugs to

 

Steve

Hi Steve!

 

Thanks for the suggestion and information. I guess I simply can't win :angry:

I went ahead and did the installation of the Ajax module you suggested. Lo and behold, the shipping table did show and it worked flawlessly with "Shipping Zone" in the Table Rates selected. . . . Hurray! . . . . . But oh! . . . . not so fast! :(

 

In Ajax, I cannot get my payment table to show (PayPal IPN or Google Checkout) :angry: I guess if I could simply combine the OPC and Ajax I would be able to have a fully operational mod :lol:

 

Oh well, I guess it's not meant to be. I will give it a rest and keep my site as is. It has worked for 3 years without issues, so if it's not broken why fix it?

 

As for reporting bugs. I did do that too. I reported the OPC issue and after trying the 2 Simple Page checkout I reported the issues I was having with that mod too. The creator on that one did write back, but he has not touched the mod for months and doesn't have any suggestions at the moment. He will work on the mod over the winter and see if he can make it standard for all shops. I guess we'll have to wait and see.

 

In any event, I had enough of this. I have tried 3 different mods and none of them have worked for me. Perhaps in the future I will try again.

 

Thanks for all you help. You have been very kind and patient with me and all the others who come in here for help. I commend you. :thumbsup:

 

Best regards,

 

ski

Link to comment
Share on other sites

Hi Steve!

 

Thanks for the suggestion and information. I guess I simply can't win :angry:

I went ahead and did the installation of the Ajax module you suggested. Lo and behold, the shipping table did show and it worked flawlessly with "Shipping Zone" in the Table Rates selected. . . . Hurray! . . . . . But oh! . . . . not so fast! :(

 

In Ajax, I cannot get my payment table to show (PayPal IPN or Google Checkout) :angry: I guess if I could simply combine the OPC and Ajax I would be able to have a fully operational mod :lol:

 

Oh well, I guess it's not meant to be. I will give it a rest and keep my site as is. It has worked for 3 years without issues, so if it's not broken why fix it?

 

As for reporting bugs. I did do that too. I reported the OPC issue and after trying the 2 Simple Page checkout I reported the issues I was having with that mod too. The creator on that one did write back, but he has not touched the mod for months and doesn't have any suggestions at the moment. He will work on the mod over the winter and see if he can make it standard for all shops. I guess we'll have to wait and see.

 

In any event, I had enough of this. I have tried 3 different mods and none of them have worked for me. Perhaps in the future I will try again.

 

Thanks for all you help. You have been very kind and patient with me and all the others who come in here for help. I commend you. :thumbsup:

 

Best regards,

 

ski

 

Hi Ski,

 

To get paypal ipn to work with other one, the calls would have to be made into ajax which im guessing is not an easy task, maybe wait a bit longer

 

Steve

Link to comment
Share on other sites

Hi Ski,

 

To get paypal ipn to work with other one, the calls would have to be made into ajax which im guessing is not an easy task, maybe wait a bit longer

 

Steve

Hi Steve!

 

Yeah I guess I will need to do that. It is simply frustrating at times when you find a real cool mod and you can't get it to work on your site. And the fact that, as far as I can tell, you are the only one offering support for the OPC while the actual creators of the mod offers no support. Why bother creating a mod if you are not going to help people integrate into your site? Perhaps that is the point, they simply throw a carrot out there and wait for someone to contact them and pay big money for integration help. ;)

 

In any event, I will give it a few more months. I do like the ajax mod, but unfortunately they do not offer any of the payment methods I currently run. I'd think that they would have PayPal IPN figure out by now, since they released their mod in February. I guess PayPal IPN is a big monster to tame :D

 

I'm still trying to figure my OPC issue with shipping, just not as hard as before. I was getting burned out. I will keep at it as I love a puzzle. Should I have success I will report my findings and maybe it will help others with similar issues.

 

On that note, I do have a quick question. . . . On your site, does the shipping method or charge shows up before you enter an address in the address field when you are a new customer? I know that it doesn't in the demo, but I had it showing in mine before I even got to the address. I don't know what that means yet, but I am curious.

 

Thanks and have a great day!

 

ski

Link to comment
Share on other sites

Hi

 

think is here in this bit of code

 

      if (tep_not_null($order_id)) {
       $this->query($order_id);
     } else {
       $this->cart();
     }
   }

   function query($order_id) {
     global $languages_id;

     $order_id = tep_db_prepare_input($order_id);

 

Steve

Thank you very much.

Link to comment
Share on other sites

Hi Steve!

 

On that note, I do have a quick question. . . . On your site, does the shipping method or charge shows up before you enter an address in the address field when you are a new customer? I know that it doesn't in the demo, but I had it showing in mine before I even got to the address. I don't know what that means yet, but I am curious.

 

Thanks and have a great day!

 

ski

 

Hi ski,

 

Answer to your question is no it doesn't for me

 

Steve

Link to comment
Share on other sites

hello,

A newbie is talking.

 

Thank you for the Add-on.

 

I have update all of the requirements except for the last part Data queries.

How do we enter this data in?

Do we create a SQL for this data

e.g. dummy.sql

then import into our myphpadmin then execute it?

 

Sorry, I am new with this.

 

Thank you in advance

Link to comment
Share on other sites

hello,

A newbie is talking.

 

Thank you for the Add-on.

 

I have update all of the requirements except for the last part Data queries.

How do we enter this data in?

Do we create a SQL for this data

e.g. dummy.sql

then import into our myphpadmin then execute it?

 

Sorry, I am new with this.

 

Thank you in advance

Hi,

 

Simply copy and paste it into sql tab on phpmyadmin

 

Steve

Link to comment
Share on other sites

I have the DCC installed on my shop and was unable to get it working with One page checkout. This was discussed earlier in this thread but cant be bothered to search the thread for it. Basically, you need a coder. IT Webexperts quoted me $300 to have them work together.

 

Sophia

 

Hi there, I've been searching through these pages looking at the same issues with DCC as i have both DCC and OnePageCheckout installed on my sight the thread seems to stop here. Does anyone know if a solution was ever found for gettign these two to work together?

 

Daz

Link to comment
Share on other sites

Hey there, another question if anyone is able to help, I'm running a site with a fixed width and this compresses the checkout comments field to a very small size. I'd like to move it to under the order total line but an not confident I can identify where to place the relevant code in the php file, if anyone can help it would be appreciated.

 

I think the code I need to move is:

  <tr>
	<td><?php
	$header = TABLE_HEADING_COMMENTS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/comments.php');
	$commentBox = ob_get_contents();
	ob_end_clean();

	buildInfobox($header, $commentBox);
   ?></td>
  </tr>

 

and the checkout.php file is as follows:

 

<?php
/*
 One Page Checkout, Version: 1.08

 I.T. Web Experts
 http://www.itwebexperts.com

 Copyright (c) 2009 I.T. Web Experts

 Released under the GNU General Public License
*/
 define('CHARSET', 'UTF-8');

 require('includes/application_top.php');
 require('includes/classes/http_client.php');

 if (ONEPAGE_LOGIN_REQUIRED == 'true'){
  if (!tep_session_is_registered('customer_id')){
	  $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT));
	  tep_redirect(tep_href_link(FILENAME_LOGIN));
  }
 }

 if (isset($_GET['rType'])){
  header('content-type: text/html; charset=' . CHARSET);
 }

 require('includes/classes/onepage_checkout.php');
 $onePageCheckout = new osC_onePageCheckout();

 if (!isset($_GET['rType']) && !isset($_GET['action']) && !isset($_POST['action']) && !isset($_GET['error_message']) && !isset($_GET['payment_error'])){
  $onePageCheckout->init();
 }

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 $onePageCheckout->loadSessionVars();
 $onePageCheckout->fixTaxes();

//  print_r($order);
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed

 if (!isset($_GET['action']) && !isset($_POST['action'])){
  // Start - CREDIT CLASS Gift Voucher Contribution
  //  if ($order->content_type == 'virtual') {
  if ($order->content_type == 'virtual' || $order->content_type == 'virtual_weight' ) {
	  // End - CREDIT CLASS Gift Voucher Contribution
	  $shipping = false;
	  $sendto = false;
  }
 }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();
 if (method_exists($cart, 'count_contents_virtual')){
  // Start - CREDIT CLASS Gift Voucher Contribution
  $total_count = $cart->count_contents_virtual();
  // End - CREDIT CLASS Gift Voucher Contribution
 }

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

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

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_total_modules->process();

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

 $action = (isset($_POST['action']) ? $_POST['action'] : '');
 if (isset($_POST['updateQuantities_x'])){
  $action = 'updateQuantities';
 }
 if (tep_not_null($action)){
  ob_start();
  switch($action){
	  case 'process':
		  echo $onePageCheckout->processCheckout();
	  break;
	  case 'countrySelect':
		  echo $onePageCheckout->getAjaxStateField();
	  break;
	  case 'processLogin':
		  echo $onePageCheckout->processAjaxLogin($_POST['email'], $_POST['pass']);
	  break;
	  case 'removeProduct':
		  echo $onePageCheckout->removeProductFromCart($_POST['pID']);
	  break;
	  case 'updateQuantities':
		  echo $onePageCheckout->updateCartProducts($_POST['qty'], $_POST['id']);
	  break;
	  case 'setPaymentMethod':
		  echo $onePageCheckout->setPaymentMethod($_POST['method']);
	  break;
	  case 'setShippingMethod':
		  echo $onePageCheckout->setShippingMethod($_POST['method']);
	  break;
	  case 'setSendTo':
	  case 'setBillTo':
		  echo $onePageCheckout->setCheckoutAddress($action);
	  break;
	  case 'checkEmailAddress':
		  echo $onePageCheckout->checkEmailAddress($_POST['emailAddress']);
	  break;
	  case 'saveAddress':
	  case 'addNewAddress':
		  echo $onePageCheckout->saveAddress($action);
	  break;
	  case 'selectAddress':
		  echo $onePageCheckout->setAddress($_POST['address_type'], $_POST['address']);
	  break;
	  case 'redeemVoucher':
		  echo $onePageCheckout->redeemCoupon($_POST['code']);
	  break;
	  case 'setMembershipPlan':
		  echo $onePageCheckout->setMembershipPlan($_POST['planID']);
	  break;
	  case 'updateCartView':
		  if ($cart->count_contents() == 0){
			  echo 'none';
		  }else{
			  include(DIR_WS_INCLUDES . 'checkout/cart.php');
		  }
	  break;
	  case 'updateShippingMethods':
		  include(DIR_WS_INCLUDES . 'checkout/shipping_method.php');
	  break;
	  case 'updatePaymentMethods':
		  include(DIR_WS_INCLUDES . 'checkout/payment_method.php');
	  break;
	  case 'getOrderTotals':
		  if (MODULE_ORDER_TOTAL_INSTALLED){
			  echo '<table cellpadding="2" cellspacing="0" border="0">' . 
				   $order_total_modules->output() . 
				   '</table>';
		  }
	  break;
	  case 'getProductsFinal':
		  include(DIR_WS_INCLUDES . 'checkout/products_final.php');
	  break;
	  case 'getNewAddressForm':
	  case 'getAddressBook':
		  $addresses_count = tep_count_customer_address_book_entries();
		  if ($action == 'getAddressBook'){
			  $addressType = $_POST['addressType'];
			  include(DIR_WS_INCLUDES . 'checkout/address_book.php');
		  }else{
			  include(DIR_WS_INCLUDES . 'checkout/new_address.php');
		  }
	  break;
	  case 'getEditAddressForm':
		  $aID = tep_db_prepare_input($_POST['addressID']);
		  $Qaddress = tep_db_query('select * from ' . TABLE_ADDRESS_BOOK . ' where customers_id = "' . $customer_id . '" and address_book_id = "' . $aID . '"');
		  $address = tep_db_fetch_array($Qaddress);
		  include(DIR_WS_INCLUDES . 'checkout/edit_address.php');
	  break;
	  case 'getBillingAddress':
		  include(DIR_WS_INCLUDES . 'checkout/billing_address.php');
	  break;
	  case 'getShippingAddress':
		  include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
	  break;
  }

  $content = ob_get_contents();
  ob_end_clean();
  echo utf8_encode($content);

  tep_session_close();
  exit;
 }

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT, '', $request_type));

 function buildInfobox($header, $contents){
  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($header));
  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($contents));
  new infoBox($info_box_contents);
 }

 function fixSeoLink($url){
  return str_replace('&', '&', $url);
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="stylesheet" type="text/css" href="ext/jQuery/themes/smoothness/ui.all.css">
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.ajaxq.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.pstrength.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.ui.js"></script>
<script type="text/javascript" language="javascript" src="includes/checkout/checkout.js"></script>
<style>
.pstrength-minchar {
font-size : 10px;
}
</style>
<script language="javascript"><!--
function CVVPopUpWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=233,screenX=150,screenY=150,top=150,left=150')
}

function CVVPopUpWindowEx(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=510,screenX=150,screenY=150,top=150,left=150')
}

 var onePage = checkout;
 onePage.initializing = true;
 onePage.ajaxCharset = '<?php echo CHARSET;?>';
 onePage.loggedIn = <?php echo (isset($customer_id) ? 'true' : 'false');?>;
 onePage.ccgvInstalled = <?php echo (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
 onePage.shippingEnabled = <?php echo ($onepage['shippingEnabled'] === true ? 'true' : 'false');?>;
 onePage.pageLinks = {
  checkout: '<?php echo fixSeoLink(tep_href_link(FILENAME_CHECKOUT, session_name() . '=' . session_id() . '&rType=ajax', $request_type));?>',
  shoppingCart: '<?php echo fixSeoLink(tep_href_link(FILENAME_SHOPPING_CART));?>'
 }

 function getFieldErrorCheck($element){
  var rObj = {};
  switch($element.attr('name')){
	  case 'billing_firstname':
	  case 'shipping_firstname':
		  rObj.minLength = <?php echo ENTRY_FIRST_NAME_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_FIRST_NAME_ERROR;?>';
	  break;
	  case 'billing_lastname':
	  case 'shipping_lastname':
		  rObj.minLength = <?php echo ENTRY_LAST_NAME_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_LAST_NAME_ERROR;?>';
	  break;
	  case 'billing_email_address':
		  rObj.minLength = <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_EMAIL_ADDRESS_ERROR;?>';
	  break;
	  case 'billing_street_address':
	  case 'shipping_street_address':
		  rObj.minLength = <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_STREET_ADDRESS_ERROR;?>';
	  break;
	  case 'billing_zipcode':
	  case 'shipping_zipcode':
		  rObj.minLength = <?php echo ENTRY_POSTCODE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_POST_CODE_ERROR;?>';
	  break;
	  case 'billing_city':
	  case 'shipping_city':
		  rObj.minLength = <?php echo ENTRY_CITY_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_CITY_ERROR;?>';
	  break;
	  case 'billing_dob':
		  rObj.minLength = <?php echo ENTRY_DOB_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_DATE_OF_BIRTH_ERROR;?>';
	  break;
	  case 'billing_telephone':
		  rObj.minLength = <?php echo ENTRY_TELEPHONE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_TELEPHONE_NUMBER_ERROR;?>';
	  break;
	  case 'billing_country':
	  case 'shipping_country':
		  rObj.errMsg = '<?php echo ENTRY_COUNTRY_ERROR;?>';
	  break;
	  case 'billing_state':
	  case 'shipping_state':
		  rObj.minLength = <?php echo ENTRY_STATE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_STATE_ERROR;?>';
	  break;
	  case 'password':
	  case 'confirmation':
		  rObj.minLength = <?php echo ENTRY_PASSWORD_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_PASSWORD_ERROR;?>';
	  break;
  }
return rObj;
 }

$(document).ready(function (){
$('#pageContentContainer').show();
var loginBoxOpened = false;
$('#loginButton').click(function (){
	if (loginBoxOpened){
		$('#loginBox').dialog('open');
		return false;
	}
	$('#loginBox').dialog({
		resizable: false,
		shadow: false,
		open: function (){
			var $dialog = this;
			$('input', $dialog).keypress(function (e){
				if (e.which == 13){
					$('#loginWindowSubmit', $dialog).click();
				}
			});

			$('#loginWindowSubmit', $dialog).hover(function (){
				this.style.cursor = 'pointer';
			}, function (){
				this.style.cursor = 'default';
			}).click(function (){
				var $this = $(this);
				$this.hide();
				var email = $('input[name="email_address"]', $dialog).val();
				var pass = $('input[name="password"]', $dialog).val();
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=processLogin&email=' + email + '&pass=' + pass,
					dataType: 'json',
					type: 'post',
					beforeSend: function (){
						onePage.showAjaxMessage('Refreshing Shopping Cart');
						if ($('#loginStatus', $this.parent()).size() <= 0){
							$('<div>')
							.attr('id', 'loginStatus')
							.html('Processing Login')
							.attr('align', 'center')
							.insertAfter($this);
						}
					},
					success: function (data){
						if (data.success == true){
							$('#loginStatus', $dialog).html(data.msg);
							$('#logInRow').hide();

							$('#changeBillingAddressTable').show();
							$('#changeShippingAddressTable').show();
							$('#newAccountEmail').remove();
							$('#diffShipping').parent().parent().parent().remove();

							onePage.updateAddressHTML('billing');
							onePage.updateAddressHTML('shipping');

							$('#shippingAddress').show();

							var updateTotals = true;
							onePage.updateCartView();
							onePage.updateFinalProductListing();
							onePage.updatePaymentMethods();
							if ($(':radio[name="payment"]:checked').size() > 0){
								onePage.setPaymentMethod($(':radio[name="payment"]:checked'));
								updateTotals = false;
							}
							onePage.updateShippingMethods();
							if ($(':radio[name="shipping"]:checked').size() > 0){
								onePage.setShippingMethod($(':radio[name="shipping"]:checked').val());
								updateTotals = false;
							}

							if (updateTotals == true){
								onePage.updateOrderTotals();
							}

							$('#loginBox').dialog('destroy');
						}else{
							$('#logInRow').show();
							$('#loggedInRow').hide();

							$('#loginStatus', $dialog).html(data.msg);
							setTimeout(function (){
								$('#loginStatus').remove();
								$('#loginWindowSubmit').show();
							}, 6000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 3');
							}, 3000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 2');
							}, 4000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 1');
							}, 5000);
						}
					},
					errorMsg: 'There was an error logging in, please inform IT Web Experts about this error.'
				});
			});
		}
	});
	loginBoxOpened = true;
	return false;
});

$('#changeBillingAddress, #changeShippingAddress').click(function (){
	var addressType = 'billing';
	if ($(this).attr('id') == 'changeShippingAddress'){
		addressType = 'shipping';
	}
	$('#addressBook').clone().show().appendTo(document.body).dialog({
		shadow: false,
		width: 550,
	   // height: 450,
		minWidth: 550,
		//minHeight: 500,
		open: function (){
			onePage.loadAddressBook($(this), addressType);
		},
		buttons: {
			'<?php echo addslashes(WINDOW_BUTTON_CANCEL);?>': function (){
				var $this = $(this);
				var action = $('input[name="action"]', $this).val();
				//alert($(':input, :select, :radio, :checkbox', this).serialize());
				if (action == 'selectAddress'){
					$this.dialog('close');
				}else if (action == 'addNewAddress' || action == 'saveAddress'){
					onePage.loadAddressBook($this, addressType);
				}
			},
			'<?php echo addslashes(WINDOW_BUTTON_CONTINUE);?>': function (){
				var $this = $(this);
				var action = $('input[name="action"]', $this).val();
				//alert($(':input, :select, :radio, :checkbox', this).serialize());
				if (action == 'selectAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Setting Address',
						dataType: 'json',
						data: $(':input, :radio', this).serialize(),
						type: 'post',
						success: function (data){
							$this.dialog('close');
							if (addressType == 'shipping'){
								onePage.updateAddressHTML('shipping');
								onePage.updateShippingMethods();
							}else{
								onePage.updateAddressHTML('billing');
								onePage.updatePaymentMethods();
							}
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}else if (action == 'addNewAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Saving New Address',
						dataType: 'json',
						data: $(':input, :select, :radio, :checkbox', this).serialize(),
						type: 'post',
						success: function (data){
							onePage.loadAddressBook($this, addressType);
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}else if (action == 'saveAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Updating Address',
						dataType: 'json',
						data: $(':input, :select, :radio, :checkbox', this).serialize(),
						type: 'post',
						success: function (data){
							onePage.loadAddressBook($this, addressType);
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}
			},
			'<?php echo addslashes(WINDOW_BUTTON_NEW_ADDRESS);?>': function (){
				var $this = $(this);
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=getNewAddressForm',
					type: 'post',
					beforeSendMsg: 'Loading New Address Form',
					success: function (data){
						$this.html(data);
						onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol')
					},
					errorMsg: 'There was an error loading new address form, please inform IT Web Experts about this error.'
				});
			},
			'<?php echo addslashes(WINDOW_BUTTON_EDIT_ADDRESS);?>': function (){
				var $this = $(this);
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=getEditAddressForm&addressID=' + $(':radio[name="address"]:checked', $this).val(),
					type: 'post',
					beforeSendMsg: 'Loading Edit Address Form',
					success: function (data){
						$this.html(data);
					},
					errorMsg: 'There was an error loading edit address form, please inform IT Web Experts about this error.'
				});
			}
		}
	});
   return false;
});

onePage.initCheckout();
});

<?php
// Start - CREDIT CLASS Gift Voucher Contribution 
if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){
if (MODULE_ORDER_TOTAL_INSTALLED)
$temp=$order_total_modules->process();
$temp=$temp[count($temp)-1];
$temp=$temp['value'];

$gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
$gv_result = tep_db_fetch_array($gv_query);

if ($gv_result['amount']>=$temp){ $coversAll=true;

?>
 function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
for (counter = 0; counter < document.checkout.payment.length; counter++) {
  // If a radio button has been selected it will return true
  // (If not it will return false)
  if (document.checkout.cot_gv.checked){
	document.checkout.payment[counter].checked = false;
	document.checkout.payment[counter].disabled=true;
  } else {
	document.checkout.payment[counter].disabled=false;
  }
}
 }
<?php
} else { 
 $coversAll=false;?>

 function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
 }
<?php } 
}?>
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>  
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
  </table></td>
<?php
}
?>  
<!-- body_text //-->
  <td width="100%" valign="top">
<noscript>
<p>Please follow the instructions for your web browser:<br /><br />Internet Explorer</p>
<ol>
 <li>On the <strong>Tools</strong> menu, click <strong>Internet Options</strong>, and then click the <strong>Security</strong> tab.</li>
 <li>Click the <strong>Internet</strong> zone.</li>
 <li>If you do not have to customize your Internet security settings, click <strong>Default Level</strong>. Then do step 4<blockquote>If you have to customize your Internet security settings, follow these steps:<br />
a. Click <strong>Custom Level</strong>.<br />
b. In the <strong>Security Settings – Internet Zone</strong> dialog box, click <strong>Enable</strong> for <strong>Active Scripting</strong> in the <strong>Scripting</strong>section.</blockquote></li>
 <li>Click the <strong>Back</strong> button to return to the previous page, and then click the <strong>Refresh</strong> button to run scripts.</li>
</ol>
<p><br />Firefox</p>
<ol>
 <li>On the <strong>Tools</strong> menu, click <strong>Options</strong>.</li>
 <li>On the <strong>Content</strong> tab, click to select the <strong>Enable JavaScript</strong> check box.</li>
 <li>Click the <strong>Go back one page</strong> button to return to the previous page, and then click the <strong>Reload current page</strong> button to run scripts.</li>
</ol>
<p> </p>
</noscript>
<div id="pageContentContainer" style="display:none;">
  <?php echo tep_draw_form('checkout', tep_href_link(FILENAME_CHECKOUT, '', $request_type)) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
   <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  </tr>
  <!--<tr>
   <td class="main" align="center" style="height:100px;"><div id="ajaxLoader" style="display:none;"<img src="ext/jQuery/themes/smoothness/images/ajax_load.gif"><br>Please wait while ajax requests finish...</div></td>
  </tr>-->
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
 if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
?>
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
   <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
  <tr class="infoBoxNoticeContents">
   <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
	 <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
	</tr>
   </table></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
 }
?>
<tr>
 <td class="main" width="50%"><?php
  $header = TABLE_HEADING_PRODUCTS;

  ob_start();
  include(DIR_WS_INCLUDES . 'checkout/cart.php');
  $cartContents = ob_get_contents();
  ob_end_clean();

  $cartContents .= '<br><div style="float:right" class="orderTotals">' . 
  (MODULE_ORDER_TOTAL_INSTALLED ? '<table cellpadding="2" cellspacing="0" border="0">' . $order_total_modules->output() . '</table>' : '') . '</div>';

  buildInfobox($header, $cartContents);
 ?></td>
</tr>
<tr>
 <td class="main" style="padding-top:5px;"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  <tr>
   <td class="main" width="50%" align="left"><?php
	if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){
		echo '<table cellpadding="2" cellspacing="0" border="0">
		 <tr>
		  <td class="main"><b>Have A Coupon?</b></td>
		 </tr>
		 <tr>
		  <td class="main">' . tep_draw_input_field('gv_redeem_code', 'redeem code') . '</td>
		  <td class="main">' . tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'id="voucherRedeem"') . '</td>
		 </tr>
		</table>';
	}
   ?></td>
   <td class="main" width="50%" align="right"><table cellpadding="2" cellspacing="0" border="0">
	<tr>
	 <td class="main"><b>Make Changes?</b></td>
	</tr>
	<tr>
	 <td><?php echo tep_image_submit('button_update_cart.gif', IMAGE_UPDATE_CART, 'name="updateQuantities" id="updateCartButton"');?></td>
	</tr>
   </table></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
   <td class="main" width="50%" valign="top"><?php
	$header = TABLE_HEADING_BILLING_ADDRESS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/billing_address.php');
	$billingAddress = ob_get_contents();
	ob_end_clean();

	$billingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
	 <tr id="logInRow"' . (isset($_SESSION['customer_id']) ? ' style="display:none"' : '') . '>
	  <td class="main">Already have an account? <a href="' . fixSeoLink(tep_href_link(FILENAME_LOGIN)) . '" id="loginButton">' . tep_image_button('button_login.gif', IMAGE_LOGIN) . '</a></td>
	 </tr>
	</table>' . $billingAddress;


	buildInfobox($header, $billingAddress);
   ?><table id="changeBillingAddressTable" border="0" width="100%" cellspacing="0" cellpadding="2"<?php echo (isset($_SESSION['customer_id']) ? '' : ' style="display:none"');?>>
	<tr>
	 <td class="main" align="right"><a id="changeBillingAddress" href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', $request_type);?>"><?php echo tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS);?></a></td>
	</tr>
   </table></td>
<?php
 if ($onepage['shippingEnabled'] === true){
?>       
   <td class="main" width="50%" valign="top"><?php
	$header = TABLE_HEADING_SHIPPING_ADDRESS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
	$shippingAddress = ob_get_contents();
	ob_end_clean();

	if (!tep_session_is_registered('customer_id')){
		$shippingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
		 <tr>
		  <td class="main">Different from billing address? <input type="checkbox" name="diffShipping" id="diffShipping" value="1"></td>
		 </tr>
		</table>' . $shippingAddress;
	}

	buildInfobox($header, $shippingAddress);
   ?><table id="changeShippingAddressTable" border="0" width="100%" cellspacing="0" cellpadding="2" <?php echo (isset($_SESSION['customer_id']) ? '' : ' style="display:none"');?>>
	<tr>
	 <td class="main" align="right"><a id="changeShippingAddress" href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', $request_type);?>"><?php echo tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS);?></a></td>
	</tr>
   </table></td>
<?php
 }
?>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
  <tr>
	<td><?php
	$header = TABLE_HEADING_PAYMENT_METHOD;

	$paymentMethod = '';
	if (isset($_SESSION['customer_id'])){
		ob_start();
		include(DIR_WS_INCLUDES . 'checkout/payment_method.php');
		$paymentMethod = ob_get_contents();
		ob_end_clean();
	}

	$paymentMethod = '<div id="noPaymentAddress" class="main noAddress" align="center" style="font-size:15px;' . (isset($_SESSION['customer_id']) ? 'display:none;' : '') . '">Please fill in your <b>billing address</b> for payment options</div><div id="paymentMethods"' . (!isset($_SESSION['customer_id']) ? ' style="display:none;"' : '') . '>' . $paymentMethod . '</div>';
	buildInfobox($header, $paymentMethod);
   ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($onepage['shippingEnabled'] === true){
  if (tep_count_shipping_modules() > 0) {
?>
  <tr>
	<td><?php
	$header = TABLE_HEADING_SHIPPING_METHOD;

	$shippingMethod = '';
	if (isset($_SESSION['customer_id'])){
		ob_start();
		include(DIR_WS_INCLUDES . 'checkout/shipping_method.php');
		$shippingMethod = ob_get_contents();
		ob_end_clean();
	}

	$shippingMethod = '<div id="noShippingAddress" class="main noAddress" align="center" style="font-size:15px;' . (isset($_SESSION['customer_id']) ? 'display:none;' : '') . '">Please fill in <b>at least</b> your billing address to get shipping quotes.</div><div id="shippingMethods"' . (!isset($_SESSION['customer_id']) ? ' style="display:none;"' : '') . '>' . $shippingMethod . '</div>';
	buildInfobox($header, $shippingMethod);
   ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
  }
 }
?>
  <tr>
	<td><?php
	$header = TABLE_HEADING_COMMENTS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/comments.php');
	$commentBox = ob_get_contents();
	ob_end_clean();

	buildInfobox($header, $commentBox);
   ?></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" id="checkoutYesScript" style="display:none;">
		<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" id="checkoutMessage"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><div id="ajaxMessages" style="display:none;"></div><div id="checkoutButtonContainer"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'id="checkoutButton" formUrl="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', $request_type) . '"'); ?><input type="hidden" name="formUrl" id="formUrl" value=""></div><div id="paymentHiddenFields" style="display:none;"></div></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>

	  <tr class="infoBoxContents" id="checkoutNoScript">
		<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 '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>to update/view your order.'; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_update.gif', IMAGE_BUTTON_UPDATE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form>
</div></td>
<!-- body_text_eof //-->
<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>  
<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>
<?php
}elseif (ONEPAGE_SHOW_CUSTOM_COLUMN == 'true'){
?>  
<td width="200px" valign="top"><table border="0" width="200px" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'checkout/column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
<?php
}
?>  
 </tr>
</table>
<!-- body_eof //-->

<!-- dialogs_bof //-->
<div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0">
<tr>
 <td class="main"><?php echo ENTRY_EMAIL_ADDRESS;?></td>
 <td><?php echo tep_draw_input_field('email_address');?></td>
</tr>
<tr>
 <td class="main"><?php echo ENTRY_PASSWORD;?></td>
 <td><?php echo tep_draw_password_field('password');?></td>
</tr>
<tr>
 <td colspan="2" align="right" class="main"><a href="<?php echo tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL');?>"><?php echo TEXT_PASSWORD_FORGOTTEN;?></a></td>
</tr>
<tr>
 <td colspan="2" align="right"><?php echo tep_image_button('button_login.gif', IMAGE_BUTTON_LOGIN, 'id="loginWindowSubmit"');?></td>
</tr>
</table></div>
<div id="addressBook" title="Address Book" style="display:none"></div>
<div id="newAddress" title="New Address" style="display:none"></div>
<!-- dialogs_eof//-->

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

Link to comment
Share on other sites

thank you steve!!!!

 

One more question, how do I put the paypal logo on the payment option instead just the word paypal?

includes/languages/xxxx/modules/paypment/paypal.php or any paypal file add simply change paypal to <img src="images/papypal.jpg">

 

Steve

Link to comment
Share on other sites

Hey there, another question if anyone is able to help, I'm running a site with a fixed width and this compresses the checkout comments field to a very small size. I'd like to move it to under the order total line but an not confident I can identify where to place the relevant code in the php file, if anyone can help it would be appreciated.

 

I think the code I need to move is:

  <tr>
	<td><?php
	$header = TABLE_HEADING_COMMENTS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/comments.php');
	$commentBox = ob_get_contents();
	ob_end_clean();

	buildInfobox($header, $commentBox);
   ?></td>
  </tr>

 

and the checkout.php file is as follows:

 

<?php
/*
 One Page Checkout, Version: 1.08

 I.T. Web Experts
 http://www.itwebexperts.com

 Copyright (c) 2009 I.T. Web Experts

 Released under the GNU General Public License
*/
 define('CHARSET', 'UTF-8');

 require('includes/application_top.php');
 require('includes/classes/http_client.php');

 if (ONEPAGE_LOGIN_REQUIRED == 'true'){
  if (!tep_session_is_registered('customer_id')){
	  $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT));
	  tep_redirect(tep_href_link(FILENAME_LOGIN));
  }
 }

 if (isset($_GET['rType'])){
  header('content-type: text/html; charset=' . CHARSET);
 }

 require('includes/classes/onepage_checkout.php');
 $onePageCheckout = new osC_onePageCheckout();

 if (!isset($_GET['rType']) && !isset($_GET['action']) && !isset($_POST['action']) && !isset($_GET['error_message']) && !isset($_GET['payment_error'])){
  $onePageCheckout->init();
 }

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 $onePageCheckout->loadSessionVars();
 $onePageCheckout->fixTaxes();

//  print_r($order);
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed

 if (!isset($_GET['action']) && !isset($_POST['action'])){
  // Start - CREDIT CLASS Gift Voucher Contribution
  //  if ($order->content_type == 'virtual') {
  if ($order->content_type == 'virtual' || $order->content_type == 'virtual_weight' ) {
	  // End - CREDIT CLASS Gift Voucher Contribution
	  $shipping = false;
	  $sendto = false;
  }
 }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();
 if (method_exists($cart, 'count_contents_virtual')){
  // Start - CREDIT CLASS Gift Voucher Contribution
  $total_count = $cart->count_contents_virtual();
  // End - CREDIT CLASS Gift Voucher Contribution
 }

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

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

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_total_modules->process();

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

 $action = (isset($_POST['action']) ? $_POST['action'] : '');
 if (isset($_POST['updateQuantities_x'])){
  $action = 'updateQuantities';
 }
 if (tep_not_null($action)){
  ob_start();
  switch($action){
	  case 'process':
		  echo $onePageCheckout->processCheckout();
	  break;
	  case 'countrySelect':
		  echo $onePageCheckout->getAjaxStateField();
	  break;
	  case 'processLogin':
		  echo $onePageCheckout->processAjaxLogin($_POST['email'], $_POST['pass']);
	  break;
	  case 'removeProduct':
		  echo $onePageCheckout->removeProductFromCart($_POST['pID']);
	  break;
	  case 'updateQuantities':
		  echo $onePageCheckout->updateCartProducts($_POST['qty'], $_POST['id']);
	  break;
	  case 'setPaymentMethod':
		  echo $onePageCheckout->setPaymentMethod($_POST['method']);
	  break;
	  case 'setShippingMethod':
		  echo $onePageCheckout->setShippingMethod($_POST['method']);
	  break;
	  case 'setSendTo':
	  case 'setBillTo':
		  echo $onePageCheckout->setCheckoutAddress($action);
	  break;
	  case 'checkEmailAddress':
		  echo $onePageCheckout->checkEmailAddress($_POST['emailAddress']);
	  break;
	  case 'saveAddress':
	  case 'addNewAddress':
		  echo $onePageCheckout->saveAddress($action);
	  break;
	  case 'selectAddress':
		  echo $onePageCheckout->setAddress($_POST['address_type'], $_POST['address']);
	  break;
	  case 'redeemVoucher':
		  echo $onePageCheckout->redeemCoupon($_POST['code']);
	  break;
	  case 'setMembershipPlan':
		  echo $onePageCheckout->setMembershipPlan($_POST['planID']);
	  break;
	  case 'updateCartView':
		  if ($cart->count_contents() == 0){
			  echo 'none';
		  }else{
			  include(DIR_WS_INCLUDES . 'checkout/cart.php');
		  }
	  break;
	  case 'updateShippingMethods':
		  include(DIR_WS_INCLUDES . 'checkout/shipping_method.php');
	  break;
	  case 'updatePaymentMethods':
		  include(DIR_WS_INCLUDES . 'checkout/payment_method.php');
	  break;
	  case 'getOrderTotals':
		  if (MODULE_ORDER_TOTAL_INSTALLED){
			  echo '<table cellpadding="2" cellspacing="0" border="0">' . 
				   $order_total_modules->output() . 
				   '</table>';
		  }
	  break;
	  case 'getProductsFinal':
		  include(DIR_WS_INCLUDES . 'checkout/products_final.php');
	  break;
	  case 'getNewAddressForm':
	  case 'getAddressBook':
		  $addresses_count = tep_count_customer_address_book_entries();
		  if ($action == 'getAddressBook'){
			  $addressType = $_POST['addressType'];
			  include(DIR_WS_INCLUDES . 'checkout/address_book.php');
		  }else{
			  include(DIR_WS_INCLUDES . 'checkout/new_address.php');
		  }
	  break;
	  case 'getEditAddressForm':
		  $aID = tep_db_prepare_input($_POST['addressID']);
		  $Qaddress = tep_db_query('select * from ' . TABLE_ADDRESS_BOOK . ' where customers_id = "' . $customer_id . '" and address_book_id = "' . $aID . '"');
		  $address = tep_db_fetch_array($Qaddress);
		  include(DIR_WS_INCLUDES . 'checkout/edit_address.php');
	  break;
	  case 'getBillingAddress':
		  include(DIR_WS_INCLUDES . 'checkout/billing_address.php');
	  break;
	  case 'getShippingAddress':
		  include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
	  break;
  }

  $content = ob_get_contents();
  ob_end_clean();
  echo utf8_encode($content);

  tep_session_close();
  exit;
 }

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT, '', $request_type));

 function buildInfobox($header, $contents){
  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($header));
  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($contents));
  new infoBox($info_box_contents);
 }

 function fixSeoLink($url){
  return str_replace('&', '&', $url);
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="stylesheet" type="text/css" href="ext/jQuery/themes/smoothness/ui.all.css">
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.ajaxq.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.pstrength.js"></script>
<script type="text/javascript" language="javascript" src="ext/jQuery/jQuery.ui.js"></script>
<script type="text/javascript" language="javascript" src="includes/checkout/checkout.js"></script>
<style>
.pstrength-minchar {
font-size : 10px;
}
</style>
<script language="javascript"><!--
function CVVPopUpWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=233,screenX=150,screenY=150,top=150,left=150')
}

function CVVPopUpWindowEx(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=510,screenX=150,screenY=150,top=150,left=150')
}

 var onePage = checkout;
 onePage.initializing = true;
 onePage.ajaxCharset = '<?php echo CHARSET;?>';
 onePage.loggedIn = <?php echo (isset($customer_id) ? 'true' : 'false');?>;
 onePage.ccgvInstalled = <?php echo (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
 onePage.shippingEnabled = <?php echo ($onepage['shippingEnabled'] === true ? 'true' : 'false');?>;
 onePage.pageLinks = {
  checkout: '<?php echo fixSeoLink(tep_href_link(FILENAME_CHECKOUT, session_name() . '=' . session_id() . '&rType=ajax', $request_type));?>',
  shoppingCart: '<?php echo fixSeoLink(tep_href_link(FILENAME_SHOPPING_CART));?>'
 }

 function getFieldErrorCheck($element){
  var rObj = {};
  switch($element.attr('name')){
	  case 'billing_firstname':
	  case 'shipping_firstname':
		  rObj.minLength = <?php echo ENTRY_FIRST_NAME_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_FIRST_NAME_ERROR;?>';
	  break;
	  case 'billing_lastname':
	  case 'shipping_lastname':
		  rObj.minLength = <?php echo ENTRY_LAST_NAME_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_LAST_NAME_ERROR;?>';
	  break;
	  case 'billing_email_address':
		  rObj.minLength = <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_EMAIL_ADDRESS_ERROR;?>';
	  break;
	  case 'billing_street_address':
	  case 'shipping_street_address':
		  rObj.minLength = <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_STREET_ADDRESS_ERROR;?>';
	  break;
	  case 'billing_zipcode':
	  case 'shipping_zipcode':
		  rObj.minLength = <?php echo ENTRY_POSTCODE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_POST_CODE_ERROR;?>';
	  break;
	  case 'billing_city':
	  case 'shipping_city':
		  rObj.minLength = <?php echo ENTRY_CITY_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_CITY_ERROR;?>';
	  break;
	  case 'billing_dob':
		  rObj.minLength = <?php echo ENTRY_DOB_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_DATE_OF_BIRTH_ERROR;?>';
	  break;
	  case 'billing_telephone':
		  rObj.minLength = <?php echo ENTRY_TELEPHONE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_TELEPHONE_NUMBER_ERROR;?>';
	  break;
	  case 'billing_country':
	  case 'shipping_country':
		  rObj.errMsg = '<?php echo ENTRY_COUNTRY_ERROR;?>';
	  break;
	  case 'billing_state':
	  case 'shipping_state':
		  rObj.minLength = <?php echo ENTRY_STATE_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_STATE_ERROR;?>';
	  break;
	  case 'password':
	  case 'confirmation':
		  rObj.minLength = <?php echo ENTRY_PASSWORD_MIN_LENGTH;?>;
		  rObj.errMsg = '<?php echo ENTRY_PASSWORD_ERROR;?>';
	  break;
  }
return rObj;
 }

$(document).ready(function (){
$('#pageContentContainer').show();
var loginBoxOpened = false;
$('#loginButton').click(function (){
	if (loginBoxOpened){
		$('#loginBox').dialog('open');
		return false;
	}
	$('#loginBox').dialog({
		resizable: false,
		shadow: false,
		open: function (){
			var $dialog = this;
			$('input', $dialog).keypress(function (e){
				if (e.which == 13){
					$('#loginWindowSubmit', $dialog).click();
				}
			});

			$('#loginWindowSubmit', $dialog).hover(function (){
				this.style.cursor = 'pointer';
			}, function (){
				this.style.cursor = 'default';
			}).click(function (){
				var $this = $(this);
				$this.hide();
				var email = $('input[name="email_address"]', $dialog).val();
				var pass = $('input[name="password"]', $dialog).val();
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=processLogin&email=' + email + '&pass=' + pass,
					dataType: 'json',
					type: 'post',
					beforeSend: function (){
						onePage.showAjaxMessage('Refreshing Shopping Cart');
						if ($('#loginStatus', $this.parent()).size() <= 0){
							$('<div>')
							.attr('id', 'loginStatus')
							.html('Processing Login')
							.attr('align', 'center')
							.insertAfter($this);
						}
					},
					success: function (data){
						if (data.success == true){
							$('#loginStatus', $dialog).html(data.msg);
							$('#logInRow').hide();

							$('#changeBillingAddressTable').show();
							$('#changeShippingAddressTable').show();
							$('#newAccountEmail').remove();
							$('#diffShipping').parent().parent().parent().remove();

							onePage.updateAddressHTML('billing');
							onePage.updateAddressHTML('shipping');

							$('#shippingAddress').show();

							var updateTotals = true;
							onePage.updateCartView();
							onePage.updateFinalProductListing();
							onePage.updatePaymentMethods();
							if ($(':radio[name="payment"]:checked').size() > 0){
								onePage.setPaymentMethod($(':radio[name="payment"]:checked'));
								updateTotals = false;
							}
							onePage.updateShippingMethods();
							if ($(':radio[name="shipping"]:checked').size() > 0){
								onePage.setShippingMethod($(':radio[name="shipping"]:checked').val());
								updateTotals = false;
							}

							if (updateTotals == true){
								onePage.updateOrderTotals();
							}

							$('#loginBox').dialog('destroy');
						}else{
							$('#logInRow').show();
							$('#loggedInRow').hide();

							$('#loginStatus', $dialog).html(data.msg);
							setTimeout(function (){
								$('#loginStatus').remove();
								$('#loginWindowSubmit').show();
							}, 6000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 3');
							}, 3000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 2');
							}, 4000);
							setTimeout(function (){
								$('#loginStatus').html('Try again in 1');
							}, 5000);
						}
					},
					errorMsg: 'There was an error logging in, please inform IT Web Experts about this error.'
				});
			});
		}
	});
	loginBoxOpened = true;
	return false;
});

$('#changeBillingAddress, #changeShippingAddress').click(function (){
	var addressType = 'billing';
	if ($(this).attr('id') == 'changeShippingAddress'){
		addressType = 'shipping';
	}
	$('#addressBook').clone().show().appendTo(document.body).dialog({
		shadow: false,
		width: 550,
	   // height: 450,
		minWidth: 550,
		//minHeight: 500,
		open: function (){
			onePage.loadAddressBook($(this), addressType);
		},
		buttons: {
			'<?php echo addslashes(WINDOW_BUTTON_CANCEL);?>': function (){
				var $this = $(this);
				var action = $('input[name="action"]', $this).val();
				//alert($(':input, :select, :radio, :checkbox', this).serialize());
				if (action == 'selectAddress'){
					$this.dialog('close');
				}else if (action == 'addNewAddress' || action == 'saveAddress'){
					onePage.loadAddressBook($this, addressType);
				}
			},
			'<?php echo addslashes(WINDOW_BUTTON_CONTINUE);?>': function (){
				var $this = $(this);
				var action = $('input[name="action"]', $this).val();
				//alert($(':input, :select, :radio, :checkbox', this).serialize());
				if (action == 'selectAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Setting Address',
						dataType: 'json',
						data: $(':input, :radio', this).serialize(),
						type: 'post',
						success: function (data){
							$this.dialog('close');
							if (addressType == 'shipping'){
								onePage.updateAddressHTML('shipping');
								onePage.updateShippingMethods();
							}else{
								onePage.updateAddressHTML('billing');
								onePage.updatePaymentMethods();
							}
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}else if (action == 'addNewAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Saving New Address',
						dataType: 'json',
						data: $(':input, :select, :radio, :checkbox', this).serialize(),
						type: 'post',
						success: function (data){
							onePage.loadAddressBook($this, addressType);
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}else if (action == 'saveAddress'){
					onePage.queueAjaxRequest({
						url: onePage.pageLinks.checkout,
						beforeSendMsg: 'Updating Address',
						dataType: 'json',
						data: $(':input, :select, :radio, :checkbox', this).serialize(),
						type: 'post',
						success: function (data){
							onePage.loadAddressBook($this, addressType);
						},
						errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
					});
				}
			},
			'<?php echo addslashes(WINDOW_BUTTON_NEW_ADDRESS);?>': function (){
				var $this = $(this);
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=getNewAddressForm',
					type: 'post',
					beforeSendMsg: 'Loading New Address Form',
					success: function (data){
						$this.html(data);
						onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol')
					},
					errorMsg: 'There was an error loading new address form, please inform IT Web Experts about this error.'
				});
			},
			'<?php echo addslashes(WINDOW_BUTTON_EDIT_ADDRESS);?>': function (){
				var $this = $(this);
				onePage.queueAjaxRequest({
					url: onePage.pageLinks.checkout,
					data: 'action=getEditAddressForm&addressID=' + $(':radio[name="address"]:checked', $this).val(),
					type: 'post',
					beforeSendMsg: 'Loading Edit Address Form',
					success: function (data){
						$this.html(data);
					},
					errorMsg: 'There was an error loading edit address form, please inform IT Web Experts about this error.'
				});
			}
		}
	});
   return false;
});

onePage.initCheckout();
});

<?php
// Start - CREDIT CLASS Gift Voucher Contribution 
if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){
if (MODULE_ORDER_TOTAL_INSTALLED)
$temp=$order_total_modules->process();
$temp=$temp[count($temp)-1];
$temp=$temp['value'];

$gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
$gv_result = tep_db_fetch_array($gv_query);

if ($gv_result['amount']>=$temp){ $coversAll=true;

?>
 function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
for (counter = 0; counter < document.checkout.payment.length; counter++) {
  // If a radio button has been selected it will return true
  // (If not it will return false)
  if (document.checkout.cot_gv.checked){
	document.checkout.payment[counter].checked = false;
	document.checkout.payment[counter].disabled=true;
  } else {
	document.checkout.payment[counter].disabled=false;
  }
}
 }
<?php
} else { 
 $coversAll=false;?>

 function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
 }
<?php } 
}?>
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>  
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
  </table></td>
<?php
}
?>  
<!-- body_text //-->
  <td width="100%" valign="top">
<noscript>
<p>Please follow the instructions for your web browser:<br /><br />Internet Explorer</p>
<ol>
 <li>On the <strong>Tools</strong> menu, click <strong>Internet Options</strong>, and then click the <strong>Security</strong> tab.</li>
 <li>Click the <strong>Internet</strong> zone.</li>
 <li>If you do not have to customize your Internet security settings, click <strong>Default Level</strong>. Then do step 4<blockquote>If you have to customize your Internet security settings, follow these steps:<br />
a. Click <strong>Custom Level</strong>.<br />
b. In the <strong>Security Settings – Internet Zone</strong> dialog box, click <strong>Enable</strong> for <strong>Active Scripting</strong> in the <strong>Scripting</strong>section.</blockquote></li>
 <li>Click the <strong>Back</strong> button to return to the previous page, and then click the <strong>Refresh</strong> button to run scripts.</li>
</ol>
<p><br />Firefox</p>
<ol>
 <li>On the <strong>Tools</strong> menu, click <strong>Options</strong>.</li>
 <li>On the <strong>Content</strong> tab, click to select the <strong>Enable JavaScript</strong> check box.</li>
 <li>Click the <strong>Go back one page</strong> button to return to the previous page, and then click the <strong>Reload current page</strong> button to run scripts.</li>
</ol>
<p> </p>
</noscript>
<div id="pageContentContainer" style="display:none;">
  <?php echo tep_draw_form('checkout', tep_href_link(FILENAME_CHECKOUT, '', $request_type)) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
   <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  </tr>
  <!--<tr>
   <td class="main" align="center" style="height:100px;"><div id="ajaxLoader" style="display:none;"<img src="ext/jQuery/themes/smoothness/images/ajax_load.gif"><br>Please wait while ajax requests finish...</div></td>
  </tr>-->
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
 if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
?>
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
   <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
  <tr class="infoBoxNoticeContents">
   <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
	 <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
	</tr>
   </table></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
 }
?>
<tr>
 <td class="main" width="50%"><?php
  $header = TABLE_HEADING_PRODUCTS;

  ob_start();
  include(DIR_WS_INCLUDES . 'checkout/cart.php');
  $cartContents = ob_get_contents();
  ob_end_clean();

  $cartContents .= '<br><div style="float:right" class="orderTotals">' . 
  (MODULE_ORDER_TOTAL_INSTALLED ? '<table cellpadding="2" cellspacing="0" border="0">' . $order_total_modules->output() . '</table>' : '') . '</div>';

  buildInfobox($header, $cartContents);
 ?></td>
</tr>
<tr>
 <td class="main" style="padding-top:5px;"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  <tr>
   <td class="main" width="50%" align="left"><?php
	if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){
		echo '<table cellpadding="2" cellspacing="0" border="0">
		 <tr>
		  <td class="main"><b>Have A Coupon?</b></td>
		 </tr>
		 <tr>
		  <td class="main">' . tep_draw_input_field('gv_redeem_code', 'redeem code') . '</td>
		  <td class="main">' . tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'id="voucherRedeem"') . '</td>
		 </tr>
		</table>';
	}
   ?></td>
   <td class="main" width="50%" align="right"><table cellpadding="2" cellspacing="0" border="0">
	<tr>
	 <td class="main"><b>Make Changes?</b></td>
	</tr>
	<tr>
	 <td><?php echo tep_image_submit('button_update_cart.gif', IMAGE_UPDATE_CART, 'name="updateQuantities" id="updateCartButton"');?></td>
	</tr>
   </table></td>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
   <td class="main" width="50%" valign="top"><?php
	$header = TABLE_HEADING_BILLING_ADDRESS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/billing_address.php');
	$billingAddress = ob_get_contents();
	ob_end_clean();

	$billingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
	 <tr id="logInRow"' . (isset($_SESSION['customer_id']) ? ' style="display:none"' : '') . '>
	  <td class="main">Already have an account? <a href="' . fixSeoLink(tep_href_link(FILENAME_LOGIN)) . '" id="loginButton">' . tep_image_button('button_login.gif', IMAGE_LOGIN) . '</a></td>
	 </tr>
	</table>' . $billingAddress;


	buildInfobox($header, $billingAddress);
   ?><table id="changeBillingAddressTable" border="0" width="100%" cellspacing="0" cellpadding="2"<?php echo (isset($_SESSION['customer_id']) ? '' : ' style="display:none"');?>>
	<tr>
	 <td class="main" align="right"><a id="changeBillingAddress" href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', $request_type);?>"><?php echo tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS);?></a></td>
	</tr>
   </table></td>
<?php
 if ($onepage['shippingEnabled'] === true){
?>       
   <td class="main" width="50%" valign="top"><?php
	$header = TABLE_HEADING_SHIPPING_ADDRESS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
	$shippingAddress = ob_get_contents();
	ob_end_clean();

	if (!tep_session_is_registered('customer_id')){
		$shippingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
		 <tr>
		  <td class="main">Different from billing address? <input type="checkbox" name="diffShipping" id="diffShipping" value="1"></td>
		 </tr>
		</table>' . $shippingAddress;
	}

	buildInfobox($header, $shippingAddress);
   ?><table id="changeShippingAddressTable" border="0" width="100%" cellspacing="0" cellpadding="2" <?php echo (isset($_SESSION['customer_id']) ? '' : ' style="display:none"');?>>
	<tr>
	 <td class="main" align="right"><a id="changeShippingAddress" href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', $request_type);?>"><?php echo tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS);?></a></td>
	</tr>
   </table></td>
<?php
 }
?>
  </tr>
 </table></td>
</tr>
<tr>
 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
  <tr>
	<td><?php
	$header = TABLE_HEADING_PAYMENT_METHOD;

	$paymentMethod = '';
	if (isset($_SESSION['customer_id'])){
		ob_start();
		include(DIR_WS_INCLUDES . 'checkout/payment_method.php');
		$paymentMethod = ob_get_contents();
		ob_end_clean();
	}

	$paymentMethod = '<div id="noPaymentAddress" class="main noAddress" align="center" style="font-size:15px;' . (isset($_SESSION['customer_id']) ? 'display:none;' : '') . '">Please fill in your <b>billing address</b> for payment options</div><div id="paymentMethods"' . (!isset($_SESSION['customer_id']) ? ' style="display:none;"' : '') . '>' . $paymentMethod . '</div>';
	buildInfobox($header, $paymentMethod);
   ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($onepage['shippingEnabled'] === true){
  if (tep_count_shipping_modules() > 0) {
?>
  <tr>
	<td><?php
	$header = TABLE_HEADING_SHIPPING_METHOD;

	$shippingMethod = '';
	if (isset($_SESSION['customer_id'])){
		ob_start();
		include(DIR_WS_INCLUDES . 'checkout/shipping_method.php');
		$shippingMethod = ob_get_contents();
		ob_end_clean();
	}

	$shippingMethod = '<div id="noShippingAddress" class="main noAddress" align="center" style="font-size:15px;' . (isset($_SESSION['customer_id']) ? 'display:none;' : '') . '">Please fill in <b>at least</b> your billing address to get shipping quotes.</div><div id="shippingMethods"' . (!isset($_SESSION['customer_id']) ? ' style="display:none;"' : '') . '>' . $shippingMethod . '</div>';
	buildInfobox($header, $shippingMethod);
   ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
  }
 }
?>
  <tr>
	<td><?php
	$header = TABLE_HEADING_COMMENTS;

	ob_start();
	include(DIR_WS_INCLUDES . 'checkout/comments.php');
	$commentBox = ob_get_contents();
	ob_end_clean();

	buildInfobox($header, $commentBox);
   ?></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" id="checkoutYesScript" style="display:none;">
		<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" id="checkoutMessage"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><div id="ajaxMessages" style="display:none;"></div><div id="checkoutButtonContainer"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'id="checkoutButton" formUrl="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', $request_type) . '"'); ?><input type="hidden" name="formUrl" id="formUrl" value=""></div><div id="paymentHiddenFields" style="display:none;"></div></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>

	  <tr class="infoBoxContents" id="checkoutNoScript">
		<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 '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>to update/view your order.'; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_update.gif', IMAGE_BUTTON_UPDATE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form>
</div></td>
<!-- body_text_eof //-->
<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>  
<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>
<?php
}elseif (ONEPAGE_SHOW_CUSTOM_COLUMN == 'true'){
?>  
<td width="200px" valign="top"><table border="0" width="200px" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'checkout/column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
<?php
}
?>  
 </tr>
</table>
<!-- body_eof //-->

<!-- dialogs_bof //-->
<div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0">
<tr>
 <td class="main"><?php echo ENTRY_EMAIL_ADDRESS;?></td>
 <td><?php echo tep_draw_input_field('email_address');?></td>
</tr>
<tr>
 <td class="main"><?php echo ENTRY_PASSWORD;?></td>
 <td><?php echo tep_draw_password_field('password');?></td>
</tr>
<tr>
 <td colspan="2" align="right" class="main"><a href="<?php echo tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL');?>"><?php echo TEXT_PASSWORD_FORGOTTEN;?></a></td>
</tr>
<tr>
 <td colspan="2" align="right"><?php echo tep_image_button('button_login.gif', IMAGE_BUTTON_LOGIN, 'id="loginWindowSubmit"');?></td>
</tr>
</table></div>
<div id="addressBook" title="Address Book" style="display:none"></div>
<div id="newAddress" title="New Address" style="display:none"></div>
<!-- dialogs_eof//-->

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

Hi im not sure but you can change size of comments box

 

includes/checkout/comments.php

find

 <td width="50%"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?></td>

 

and simply amend it 60 and 5

 

Steve

Link to comment
Share on other sites

Hi im not sure but you can change size of comments box

 

includes/checkout/comments.php

find

 <td width="50%"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?></td>

 

and simply amend it 60 and 5

 

Steve

 

Cheers Steve, you pointed me in the right direction so thanks...i forgot with this there is some file segregation in the checkout.php so all I ended up doing was repositioning the comments box in the comments.php file and it all works fine now.

 

I just wish I could sort out the peskie DCC problem...

 

Daz

Edited by Brooks552
Link to comment
Share on other sites

In catalog/checkout.php:

 

***FIND:

<?php
/*
 $Id: checkout_shipping.php 1739 2007-12-20 00:52:16Z hpdl $

 

***CHANGE TO:

<?php header("Content-Type: text/html; charset=UTF-8\n");
/*
 $Id: checkout_shipping.php 1739 2007-12-20 00:52:16Z hpdl $

 

Not pretty, but does this work?

 

I have not tried charset=UTF-8. I fixed my € issue using charset=ISO_8859-1.

 

Hi there, I have a currency symbol problem with this contribution, my main site is running on charset=ISO_8859-1 and this contribution on UTF-8 and as a result any info box I have in column right and left aren't showing the correct currency sign (£). I tried the suggestion above but don't have the relevant line in my checkout.php file, can anyone assist with how I go about correcting this?

 

Daz

Link to comment
Share on other sites

Hi there, I have a currency symbol problem with this contribution, my main site is running on charset=ISO_8859-1 and this contribution on UTF-8 and as a result any info box I have in column right and left aren't showing the correct currency sign (£). I tried the suggestion above but don't have the relevant line in my checkout.php file, can anyone assist with how I go about correcting this?

 

Daz

HiDaz

 

replace the pound sign with 163; removing the space between # and 163 this is utf8 for the pound sign, it will be renedered £ in any char coding set you have set up

 

Steve

Edited by steve_s
Link to comment
Share on other sites

HiDaz

 

replace the pound sign with 163; removing the space between # and 163 this is utf8 for the pound sign, it will be renedered £ in any char coding set you have set up

 

Steve

 

Simple solutions are always the best :D

 

Cheers Steve

Link to comment
Share on other sites

Hi Steve,

After excuted the SQL and trying the it out, I got the shipping method error as follow:

 

Warning: include(includes/checkout/shipping_method.php) [function.include]: failed to open stream: No such file or directory in /home/topdispl/public_html/checkout.php on line 138

 

Warning: include() [function.include]: Failed opening 'includes/checkout/shipping_method.php' for inclusion (include_path='.:/usr/local/php52/pear') in /home/topdispl/public_html/checkout.php on line 138

 

You know how I could fix this or point me to a right direction.

 

Thank you

Link to comment
Share on other sites

Hi Steve,

After excuted the SQL and trying the it out, I got the shipping method error as follow:

 

Warning: include(includes/checkout/shipping_method.php) [function.include]: failed to open stream: No such file or directory in /home/topdispl/public_html/checkout.php on line 138

 

Warning: include() [function.include]: Failed opening 'includes/checkout/shipping_method.php' for inclusion (include_path='.:/usr/local/php52/pear') in /home/topdispl/public_html/checkout.php on line 138

 

You know how I could fix this or point me to a right direction.

 

Thank you

Hi

 

Upload folder catalog/includes/checkout folder to your website

 

Steve

Link to comment
Share on other sites

Hi Steve,

Thank you for the reply. I have uploaded the all folders into the require directory.

:(

 

Its saying the files arent there check permissions of files in catalog/includes/checkout folder that they can be read 444 permissions

 

Steve

Edited by steve_s
Link to comment
Share on other sites

Hello guys, I am experiencing a problem when integrating OPC.

 

Fatal error: Call to a member function pre_confirmation_check() on a non-object in user/html/includes/classes/onepage_checkout.php on line 644

 

Please help out.

 

Regards,

 

Rebellion.

Edited by Rebellion1986
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...