Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] CCGV (trad)


Vger

Recommended Posts

Here are lines 110-112:

 

function tep_db_insert_id( $link = 'db_link') {

global $$link;

return mysql_insert_id($$link);

}

 

I think its trying to insert the actually coupon code that is being generated into one of the databases and it doesnt like.

hmmm... as far as you know everything works fine except the gv_send function?

 

And does that mean gv can be sent in an email but not redeemed?

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

hmmm... as far as you know everything works fine except the gv_send function?

 

And does that mean gv can be sent in an email but not redeemed?

 

The coupon is created, I am able to redeem it in admin. When logged in as customer that made purchase to test, I can see it and send to another email address. When I click send it generates this error (but fyi, the email is sent).

 

The error is at the top of the page not within the page, this is message within page: Congratulations, your Gift Certificate has successfully been sent

 

gv 66420ceb0b

 

strange mysql error it appears.

Paul ------------

Link to comment
Share on other sites

woo hoo, the error is gone, thank you

 

prob, still cant get it to show on the checkout payment

 

<?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_SHIPPING, '', '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_SHIPPING, '', 'SSL'));
}
 }
// if we have been here before and are coming back get rid of the credit covers variable
if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');  //CCGV

// 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');// CCGV
 $order_total_modules = new order_total;// CCGV
 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(); // CCGV

// 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'));
?>
<!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">
<script language="javascript"><!--
var selected;
<?php /* following jscript function ICW ADDED FOR CCGV */ ?>
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
<?php /* END OF ICW ADDED FOR CCGV */ ?>
function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<?php echo $payment_modules->javascript_validation(); ?>
</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>
<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>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?><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>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['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><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td>
	  </tr>
	</table></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><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
			<td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br><br><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
			<td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="main" align="center" valign="top"><b><?php echo TITLE_BILLING_ADDRESS; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
				<td class="main" valign="top"><?php echo tep_address_label($customer_id, $billto, true, ' ', '<br>'); ?></td>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
			  </tr>
			</table></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"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
		  </tr>
		  <tr>
			<td class="main"><b><font color="#000000">Credit Card</font><img src="images/ccards/logo_ccVisa.gif" border="0" title=" Visa " alt="Visa" align="bottom"> 
			  <img src="images/ccards/logo_ccElectron.gif" border="0" title=" Electron " alt="Electron" align="bottom"> 
			  <img src="images/ccards/logo_ccMC.gif" border="0" title=" MasterCard " alt="MasterCard" align="bottom"> 
			  <img src="images/ccards/logo_ccDelta.gif" border="0" title="Delta" alt="Delta" align="bottom"> 
			  <img src="images/ccards/switch.gif" border="0" title="Switch" alt="Switch"align="bottom"> 
			  <img src="images/ccards/maestro.gif" border="0" title="Maestro" alt="Maestro"align="bottom"> 
			  <img src="images/ccards/logo_ccSolo.gif" border="0" title="Solo" alt="Solo"align="bottom"> 
			  <img src="images/ccards/logo_ccDiscover.gif" border="0" title="Discover" alt="Discover" align="bottom"> 
			  <img src="images/ccards/logo_ccAmex.gif" border="0" title=" American Express"> 
			  <font color="#000000">or</font> <img src="images/banner_intl.gif" border="0" title="PayPal" alt="PayPal" align="bottom"> 
			  <BR>
			  </b> <strong><font color="#000000">You do not need to be a PayPal 
			  member to pay by credit card.</font></strong> <script>
						 document.writeln('<a style="cursor:hand" onclick="javascript:popup=window.open('
										+ '\'http://www.nwcoin.com/catalog/CreditCardExplain.html\',\'popup\','
										+ '\'scrollbars,resizable,width=500,height=250,left=50,top=50\'); popup.focus(); return false;">'
										+ '<font color="blue"><u>[MORE INFORMAION]</u></font></a>');
					   </script>
			  <noscript>
			  <a href="CreditCardExplain.html" target="_blank"><font color="blue"><u>[<strong>MORE 
			  INFORMATION</strong>]</u></font></a> 
			  </noscript></td>
		  </tr>
		</table></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">
<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 } else {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 }

 $radio_buttons = 0;
 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
				<td class="main" align="right">
<?php
if (sizeof($selection) > 1) {
  echo tep_draw_radio_field('payment', $selection[$i]['id']);
} else {
  echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
				</td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
if (isset($selection[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
  for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
				  <tr>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
<?php
  }
?>
				</table></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
$radio_buttons++;
 }
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 echo $order_total_modules->credit_selection();// CCGV
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
	  </tr> 
	</table></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><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></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="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"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></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_draw_separator('pixel_silver.gif', '1', '5'); ?></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><?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%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></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="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<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></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'); ?>

Link to comment
Share on other sites

The coupon is created, I am able to redeem it in admin. When logged in as customer that made purchase to test, I can see it and send to another email address. When I click send it generates this error (but fyi, the email is sent).

 

The error is at the top of the page not within the page, this is message within page: Congratulations, your Gift Certificate has successfully been sent

 

gv 66420ceb0b

 

strange mysql error it appears.

strange, never seen this error before: When I click send it generates this error (but fyi, the email is sent).

 

and can't figure out why the SQL error shows up in the email after the gift voucher code.

 

i will try to delve in to the code to find out why that happens but off the top of my head i can't figure it out - i may have some time tomorrow to look at the contribution code in depth and try to work it out... if anyone else has any suggestons please post them :-)

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

If you are reporting an error in this thread then you need to post the error. The forums are not here for people to do things via PM which then can't be seen in the thread.

 

Vger

Link to comment
Share on other sites

If you are reporting an error in this thread then you need to post the error. The forums are not here for people to do things via PM which then can't be seen in the thread.

 

Vger

 

 

Vger, do you have a solution by chance to this? We have posted it in this thread but no response except from chooch, thanks.

Paul ------------

Link to comment
Share on other sites

I suspect that the reason you are having your problem is to do with the modifications you have made to checkout_payment.php (below)

<tr>
<td class="main"><b><font color="#000000">Credit Card</font><img src="images/ccards/logo_ccVisa.gif" border="0" title=" Visa " alt="Visa" align="bottom"> 
<img src="images/ccards/logo_ccElectron.gif" border="0" title=" Electron " alt="Electron" align="bottom"> 
<img src="images/ccards/logo_ccMC.gif" border="0" title=" MasterCard " alt="MasterCard" align="bottom"> 
<img src="images/ccards/logo_ccDelta.gif" border="0" title="Delta" alt="Delta" align="bottom"> 
<img src="images/ccards/switch.gif" border="0" title="Switch" alt="Switch"align="bottom"> 
<img src="images/ccards/maestro.gif" border="0" title="Maestro" alt="Maestro"align="bottom"> 
<img src="images/ccards/logo_ccSolo.gif" border="0" title="Solo" alt="Solo"align="bottom"> 
<img src="images/ccards/logo_ccDiscover.gif" border="0" title="Discover" alt="Discover" align="bottom"> 
<img src="images/ccards/logo_ccAmex.gif" border="0" title=" American Express"> 
<font color="#000000">or</font> <img src="images/banner_intl.gif" border="0" title="PayPal" alt="PayPal" align="bottom"> 
<BR>
</b> <strong><font color="#000000">You do not need to be a PayPal 
member to pay by credit card.</font></strong> <script>
document.writeln('<a style="cursor:hand" onclick="javascript:popup=window.open('
+ '\'http://www.nwcoin.com/catalog/CreditCardExplain.html\',\'popup\','
+ '\'scrollbars,resizable,width=500,height=250,left=50,top=50\'); popup.focus(); return false;">'
+ '<font color="blue"><u>[MORE INFORMAION]</u></font></a>');
</script>
<noscript>
<a href="CreditCardExplain.html" target="_blank"><font color="blue"><u>[<strong>MORE 
INFORMATION</strong>]</u></font></a> 
</noscript></td>
</tr>

 

Vger

Link to comment
Share on other sites

Yes, sorry, that was 3 pages back. There are only 3 places in all of osCommerce where that code shows up (listed below)

admin\includes\functions\database.php(115): return mysql_insert_id();

includes\functions\database.php(111): return mysql_insert_id();

install\includes\functions\database.php(57): return mysql_insert_id();

 

Notice that one of them is when osCommerce is being installed. If the install did not go absolutely right then that function may not have been set up.

 

Vger

Link to comment
Share on other sites

Yes, sorry, that was 3 pages back. There are only 3 places in all of osCommerce where that code shows up (listed below)

Notice that one of them is when osCommerce is being installed. If the install did not go absolutely right then that function may not have been set up.

 

Vger

 

Thanks again, will have a more detailed look at the modified files. This cart has 97 mods on it and I saved all the files that were changed with the mod number so it should be pretty easy to find. Thanks for pointing that out - it surely helps!

Paul ------------

Link to comment
Share on other sites

I suspect that the reason you are having your problem is to do with the modifications you have made to checkout_payment.php (below)

<tr>
<td class="main"><b><font color="#000000">Credit Card</font><img src="images/ccards/logo_ccVisa.gif" border="0" title=" Visa " alt="Visa" align="bottom"> 
<img src="images/ccards/logo_ccElectron.gif" border="0" title=" Electron " alt="Electron" align="bottom"> 
<img src="images/ccards/logo_ccMC.gif" border="0" title=" MasterCard " alt="MasterCard" align="bottom"> 
<img src="images/ccards/logo_ccDelta.gif" border="0" title="Delta" alt="Delta" align="bottom"> 
<img src="images/ccards/switch.gif" border="0" title="Switch" alt="Switch"align="bottom"> 
<img src="images/ccards/maestro.gif" border="0" title="Maestro" alt="Maestro"align="bottom"> 
<img src="images/ccards/logo_ccSolo.gif" border="0" title="Solo" alt="Solo"align="bottom"> 
<img src="images/ccards/logo_ccDiscover.gif" border="0" title="Discover" alt="Discover" align="bottom"> 
<img src="images/ccards/logo_ccAmex.gif" border="0" title=" American Express"> 
<font color="#000000">or</font> <img src="images/banner_intl.gif" border="0" title="PayPal" alt="PayPal" align="bottom"> 
<BR>
</b> <strong><font color="#000000">You do not need to be a PayPal 
member to pay by credit card.</font></strong> <script>
document.writeln('<a style="cursor:hand" onclick="javascript:popup=window.open('
+ '\'http://www.nwcoin.com/catalog/CreditCardExplain.html\',\'popup\','
+ '\'scrollbars,resizable,width=500,height=250,left=50,top=50\'); popup.focus(); return false;">'
+ '<font color="blue"><u>[MORE INFORMAION]</u></font></a>');
</script>
<noscript>
<a href="CreditCardExplain.html" target="_blank"><font color="blue"><u>[<strong>MORE 
INFORMATION</strong>]</u></font></a> 
</noscript></td>
</tr>

 

Vger

 

ok, i took my page down and uploaded the checkout_payment from the mod itself, but still, it doesnt show up.

 

:(

Link to comment
Share on other sites

prob, still cant get it to show on the checkout payment

 

hey liz,

 

i was having the same problem a few days ago.

i'm not an expert in php, so i don't know if this is a bug or a one off solution

(i'd be interested to see what you think rhea!).

 

i followed the code through to the file:

 

catalog/includes/classes/order_total.php

 

at line 119, i replaced the 'or' for an 'and' beacause i had two iterations, and the second was overwriting the first (it's only one week on and i've already forgotten exactly what was happening!!!)...

 

original : if ( ($use_credit_string !='' ) || ($selection_string != '') ) {

change to : if ( ($use_credit_string !='' ) && ($selection_string != '') ) {

 

hope this helps,

good luck

 

mike

Link to comment
Share on other sites

hey liz,

 

i was having the same problem a few days ago.

i'm not an expert in php, so i don't know if this is a bug or a one off solution

(i'd be interested to see what you think rhea!).

 

i followed the code through to the file:

 

catalog/includes/classes/order_total.php

 

at line 119, i replaced the 'or' for an 'and' beacause i had two iterations, and the second was overwriting the first (it's only one week on and i've already forgotten exactly what was happening!!!)...

 

original : if ( ($use_credit_string !='' ) || ($selection_string != '') ) {

change to : if ( ($use_credit_string !='' ) && ($selection_string != '') ) {

 

hope this helps,

good luck

 

 

 

mike

 

i gave it a shot, but i still cant get it to show on the page :(

Link to comment
Share on other sites

Here are lines 110-112:

 

function tep_db_insert_id( $link = 'db_link') {

global $$link;

return mysql_insert_id($$link);

}

 

I think its trying to insert the actually coupon code that is being generated into one of the databases and it doesnt like.

 

I think I have it....

 

you have to do 2 things....

 

NUMBER ONE: BACK UP your catalog/includes/functions/database.php file and then change your lines 110-112 to this instead:

 

function tep_db_insert_id() {

return mysql_insert_id();

}

 

 

NUMBER TWO: make sure you overwrite it on your original lines and add the above and see what happens, it should work now BUT you must must find out why you had your original code....

 

... if it was part of a contribution you added then it will result in it obviously not working therefore you will probably have to make a choice to use 'that' contribution or the 'CCGV' until you find a fix

 

let us know how it went and if you have trouble try to identify what the contribution was that made you edit the database file. in any even at least you have your database file to fall back on as your back up until a solution is found!

 

hope that helps :-)

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

In which case you would have been better off installing one of the simpler Coupon only contributions. CCGV is overkill if you don't want/need Gift Vouchers.

 

Vger

 

I had looked for some, but i could not find what i needed, i found one called simple coupon but once i installed it, there was no way to get to it from the admin to create a coupon, and there was no support for it.

Link to comment
Share on other sites

thank you kindly Chooch, I will dig in there and see what is going on, there were a few programmers working on this before me, so god knows what is going on. I do know that i installed a mod called Titles, and i had to edit that file, i will see if it belongs to that, if not, god knows there are plenty of other mods it could be part of ;)

 

I will check it out and let you know, thanks for the help. My next tackle is Affiliates, I believe written by Vger also no?

Link to comment
Share on other sites

thank you kindly Chooch, I will dig in there and see what is going on, there were a few programmers working on this before me, so god knows what is going on. I do know that i installed a mod called Titles, and i had to edit that file, i will see if it belongs to that, if not, god knows there are plenty of other mods it could be part of ;)

 

I will check it out and let you know, thanks for the help. My next tackle is Affiliates, I believe written by Vger also no?

sorry, that code was for the problem EthosPaul is having - it was a reply to his question

 

i do think that with amount of contributions you have added and the fact that others have worked on the store before you bought it - it isn't advisable for you to make any more alterations/additions till you isolate each problem that you have for each error and sort them out one by one, once you sort them out you should add other contributions...

 

.. up to you

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

sorry, that code was for the problem EthosPaul is having - it was a reply to his question

 

i do think that with amount of contributions you have added and the fact that others have worked on the store before you bought it - it isn't advisable for you to make any more alterations/additions till you isolate each problem that you have for each error and sort them out one by one, once you sort them out you should add other contributions...

 

.. up to you

 

 

oh man, and here i thought my prayers were answered ;)

ok, well i guess i wont look into that file then :)

thanks for clarifying that for me

Edited by tec
Link to comment
Share on other sites

Thanks Chooch, will focus on that tonight. When I started developing this cart, I was careful to add a //modified begin

//modified end

to each and every line of code changed. I just do not see that code being altered, only around it, so need to try and narrow it down.

 

Its a wonderfully stable cart until I added this contrib, great contribution but need to fix that error. I could suppress it, but that would be - well - cheating :>

 

Thanks again.

Paul ------------

Link to comment
Share on other sites

I have now manually gone through all the files and all should be fine, but the voucher still want go away after an order has been done..

 

Acustumer uses the gift vocher to buy the goods but they don't loose it from the gift vocher balance..

 

I fund this in mySQL admin:

 

" PRIMARY and INDEX keys should not both be set for column `customer_id`"

 

What can I do about this?

Link to comment
Share on other sites

That MySQL notice is not the cause of your problem. Check in includes/configure.php that you have the http cookie domain set up correctly. It should be just www.yourdomain.com or just yourdomain.com (either way there's no http:// in front of it).

 

Vger

Link to comment
Share on other sites

It seems to be ok:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://timogtina.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://timogtina.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'timogtina.com');

define('HTTPS_COOKIE_DOMAIN', 'timogtina.com');

Link to comment
Share on other sites

Did you enable Gift Vouchers in osC admin, under Modules --> Order Total, because Gift Vouchers are products and can be bought like any other product - but the system won't fully work unless they have been enabled. Also please make sure that the Model Number for the Gift Vouchers starts with GIFT

 

As your site does not have an SSL certificate your settings should be as follows:

define('HTTP_SERVER', 'http://timogtina.com');

define('HTTPS_SERVER', '');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'timogtina.com');

define('HTTPS_COOKIE_DOMAIN', '');

 

Vger

Link to comment
Share on other sites

Hi have installed the latest release from the thread dated april 12th on a fresh install of OSC everything is working great except the GVque When GV are purchased nothing is going into the que. This is not a big deal sense I can just creat a GV for the client once I receive confirmation of payment. But I would like to have this work any thoughts. my site www.productdeliveryservice.com -- thank you.

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.
Note: Your post will require moderator approval before it will be visible.

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