Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

### POINTS AND REWARDS MODULE V1.00 ###


Recommended Posts

1.in regard the .00  please read the buttom of INSTALL.txt again.

2.in regard to your bigger problem, just turn off the points module and place a test order to see if you got email and orders.

its just a quick check to see if the problem coused by the points module or some others.

if you get orders and mail when the system is off, then go over the install step again.

ok, i turned off the Points system and the order email are not being generated so i am looking in to it.

 

1) but the Points system isn't working properly either, no matter how many Points i choose to redeem at checkout, when i go to my_points.php or checkout_payment.php the Points are not getting minused. i started with 213.85 Points and have made several transaction but all other methods are showing as minused (with or without CCGV etc) but the Points are not minusing.

 

 

 

2) this what my acount history ino php shows even though i used points (the blank line is where the Points are supposed to go)

 

Sub-Total: ?11.90

Flat Rate (Best Way): ?0.00

 

Gift Vouchers: -?11.90

Total: ?0.00

 

i puchased an item and used 17 points at 0.05 redeemed and rest as chash on delivery. all was showing up and checkout and transaction completed. yet when i go to account_history_info.php, the order shows as ALL cash on delivery and no mention of Points

 

 

 

3) Also, in the the admin/orders.php when i click an order, the word 'Points' are not showing as a method of payment used. Only Cash on delivery shows as method of payment - everthing else is fine

 

i think all other Points functions are working except these three problems. does anyone else have these issues?

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

Hi !

Is it any easy way to install this module in my running shop ? Means auto installer !

Please reply,

Maria

 

ok, i turned off the Points system and the order email are not being generated so i am looking in to it.

 

1) but the Points system isn't working properly either, no matter how many Points i choose to redeem at checkout, when i go to my_points.php or checkout_payment.php the Points are not getting minused. i started with 213.85 Points and have made several transaction but all other methods are showing as minused (with or without CCGV etc) but the Points are not minusing.

2) this what my acount history ino php shows even though i used points (the blank line is where the Points are supposed to go)

 

Sub-Total: ?11.90

Flat Rate (Best Way): ?0.00

 

Gift Vouchers: -?11.90

Total: ?0.00

 

i puchased an item and used 17 points at 0.05 redeemed and rest as chash on delivery. all was showing up and checkout and transaction completed. yet when i go to account_history_info.php, the order shows as ALL cash on delivery and no mention of Points

3) Also, in the the admin/orders.php when i click an order, the word 'Points' are not showing as a method of payment used. Only Cash on delivery shows as method of payment - everthing else is fine

 

i think all other Points functions are working except these three problems. does anyone else have these issues?

Link to comment
Share on other sites

ok, i turned off the Points system and the order email are not being generated so i am looking in to it.

 

1) but the Points system isn't working properly either, no matter how many Points i choose to redeem at checkout, when i go to my_points.php or checkout_payment.php the Points are not getting minused. i started with 213.85 Points and have made several transaction but all other methods are showing as minused (with or without CCGV etc) but the Points are not minusing.

2) this what my acount history ino php shows even though i used points (the blank line is where the Points are supposed to go)

 

Sub-Total: ?11.90

Flat Rate (Best Way): ?0.00

 

Gift Vouchers: -?11.90

Total: ?0.00

 

i puchased an item and used 17 points at 0.05 redeemed and rest as chash on delivery. all was showing up and checkout and transaction completed. yet when i go to account_history_info.php, the order shows as ALL cash on delivery and no mention of Points

3) Also, in the the admin/orders.php when i click an order, the word 'Points' are not showing as a method of payment used. Only Cash on delivery shows as method of payment - everthing else is fine

 

i think all other Points functions are working except these three problems. does anyone else have these issues?

The system worked before and now you have some problems.

Did you receently installed any new mods?

Are you having problem using gift vouchers?

Why emails are not being sent out?

can you post here the code for your catalog/checkout.php?

I will try to do my best to help you.(im on holiday with my kid and using internet cafe)

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Hi !

Is it any easy way to install this module in my running shop ? Means auto installer !

Please reply,

Maria

No. you will have to apply changes to your shop manually, taks about 50 minuts to install

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

the code for catalog/product_info.php is only to show the points value information.

its got nothing to do with customers login.

so the points values are shown to all.

 

okay thank you :) i was a bit confused, as i seemed to forget to do my lang edits, so i only assumed they were to show members what they have, my mistake.

 

this is a very useful mod! thank you for making it available for use!!!

Link to comment
Share on other sites

The system worked before and now you have some problems.

Did you receently installed any new mods?

Are you having problem using gift vouchers?

Why emails are not being sent out?

can you post here the code for your catalog/checkout.php?

I will try to do my best to help you.(im on holiday with my kid and using internet cafe)

i hope you are having a great time with your child on holiday... sorry to lumber you with this Deep-Silver

 

here's the code for the checkout confirnation.php

 

<?php

/*

$Id: checkout_confirmation.php,v 1.139 2003/07/24 17:34:53 Strider Exp $

$Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $

$Id: checkout_confirmation.php,v 1.6.2.3 2003/05/10 20:12:14 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));

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));

}

 

// 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 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'));

}

 

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

if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];

 

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

if (tep_not_null($HTTP_POST_VARS['comments'])) {

$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

}

 

// load the selected payment module

require(DIR_WS_CLASSES . 'payment.php');

if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS

$payment_modules = new payment($payment);

//ICW ADDED FOR CREDIT CLASS SYSTEM

require(DIR_WS_CLASSES . 'order_total.php');

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

$payment_modules->update_status();

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules = new order_total;

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules->collect_posts();

//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules->pre_confirmation_check();

 

// ICW CREDIT CLASS Amended Line

 

##### Points/Rewards Module V1.50 check for error BOF #######

if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (USE_REDEEM_SYSTEM == 'true')) {

if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){

$customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending'];

}

// customer can't use other then the exact amount when enabled

if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){

$customer_shopping_points_spending = POINTS_EXACT_VALUE;

}

// register customer shopping points

$customer_shopping_points = tep_get_shopping_points();

// customer can't use invalid points amount

if ($customer_shopping_points < $customer_shopping_points_spending) {

$customer_shopping_points_spending = 0;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL'));

}

// customer can't use points over the max allowed

if ($customer_shopping_points_spending > POINTS_MAX_VALUE) {

$customer_shopping_points_spending = 0;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL'));

}

//force customers to select other payment method if the points total not enough to cover the cost.

if ( !$credit_covers && $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL'));

}

// customer can't use points over the order total

if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) {

$customer_shopping_points_spending = 0;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));

}

}

// if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) && (!$customer_shopping_points_spending) ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

}

######## Points/Rewards Module V1.50 EOF #################*/

 

 

 

 

if (is_array($payment_modules->modules)) {

$payment_modules->pre_confirmation_check();

}

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

//ICW Credit class amendment Lines below repositioned

// require(DIR_WS_CLASSES . 'order_total.php');

// $order_total_modules = new order_total;

 

// Stock Check

$any_out_of_stock = false;

if (STOCK_CHECK == 'true') {

//++++ QT Pro: Begin Changed code

$check_stock='';

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

if (isset($order->products[$i]['attributes']) && is_array($order->products[$i]['attributes'])) {

$attributes=array();

foreach ($order->products[$i]['attributes'] as $attribute) {

$attributes[$attribute['option_id']]=$attribute['value_id'];

}

$check_stock[$i] = tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'], $attributes);

} else {

$check_stock[$i] = tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);

}

if ($check_stock[$i]) {

$any_out_of_stock = true;

}

//++++ QT Pro: End Changed Code

}

// Out of Stock

if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

}

 

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

 

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

$breadcrumb->add(NAVBAR_TITLE_2);

?>

<!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">

</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"><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_confirmation.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>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<?php

if ($sendto != false) {

?>

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>

</tr>

<?php

if ($order->info['shipping_method']) {

?>

<tr>

<td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['shipping_method']; ?></td>

</tr>

<?php

}

?>

</table></td>

<?php

}

?>

<td width="<?php echo (($sendto != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

if (sizeof($order->info['tax_groups']) > 1) {

?>

<tr>

<td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

<td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>

</tr>

<?php

} else {

?>

<tr>

<td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

</tr>

<?php

}

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

echo ' <tr>' . "\n" .

' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .

' <td class="main" valign="top">' . $order->products[$i]['name'];

 

if (STOCK_CHECK == 'true') {

//++++ QT Pro: Begin Changed code

echo $check_stock[$i];

//++++ QT Pro: End Changed Code

}

 

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';

}

}

 

echo '</td>' . "\n";

 

if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";

 

echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</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 class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></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 width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>

</tr>

<tr>

<td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['payment_method']; ?></td>

</tr>

</table></td>

<td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2">

<?php

if (MODULE_ORDER_TOTAL_INSTALLED) {

$order_total_modules->process();

echo $order_total_modules->output();

}

?>

</table></td>

</tr>

</table></td>

</tr>

<?php

if (is_array($payment_modules->modules)) {

if ($confirmation = $payment_modules->confirmation()) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></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" cellspacing="0" cellpadding="2">

<tr>

<td class="main" colspan="4"><?php echo $confirmation['title']; ?></td>

</tr>

<?php

for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {

?>

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>

</tr>

<?php

}

?>

</table></td>

</tr>

</table></td>

</tr>

<?php

}

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

if (tep_not_null($order->info['comments'])) {

?>

<tr>

<td class="main"><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></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 class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></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="0">

<tr>

<td align="right" class="main">

<?php

if (isset($$payment->form_action_url)) {

$form_action_url = $$payment->form_action_url;

} else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

}

 

echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 

if (is_array($payment_modules->modules)) {

echo $payment_modules->process_button();

}

 

echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";

?>

</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%"><?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><?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="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="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>

<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>

<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>

</tr>

</table></td>

</tr>

</table></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 //-->

</body>

</html>

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

 

 

==================================================

 

please try help me sort out this mess.

 

yes the email isn't working, only he cotact form sends emails but order confirmation and admin/mail.php etc are all not working... i was installing the admin login mod and had problems so i uninstalled correctly (i have checked it numerous times). after this the email problem occured but it happening to fresh oscommerce sites on the same server so it must be a hosting issue?

 

anyway, i can't get the account history info to show the redemption eiher.. and no, the CCGV is working fine

 

many thanks again Deep-Silver

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

i hope you are having a great time with your child on holiday... sorry to lumber you with this Deep-Silver

 

here's the code for the checkout confirnation.php

 

please try help me sort out this mess.

 

yes the email isn't working, only he cotact form sends emails but order confirmation and admin/mail.php etc are all not working... i was installing the admin login mod and had problems so i uninstalled correctly (i have checked it numerous times). after this the email problem occured but it happening to fresh oscommerce sites on the same server so it must be a hosting issue?

 

anyway, i can't get the account history info to show the redemption eiher.. and no, the CCGV is working fine

 

many thanks again Deep-Silver

I asked for the code for your catalog/checkout.php

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

I asked for the  code for your catalog/checkout.php

i dont have a catalog/checkout.php

 

all i have are:

 

catalog/checkout_confirmation.php

catalog/checkout_payment.php

catalog/checkout_process.php

catalog/checkout_shipping.php

catalog/checkout_success.php

 

pleae advise on which one to forward

 

thanks

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

i dont have a catalog/checkout.php

 

all i have are:

 

catalog/checkout_confirmation.php

catalog/checkout_payment.php

catalog/checkout_process.php

catalog/checkout_shipping.php

catalog/checkout_success.php

 

pleae advise on which one to forward

 

thanks

post here your catalog/checkout_process.php

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

post here your catalog/checkout_process.php

ok, here it is:

 

<?php

/*

$Id: checkout_process.php,v 1.2.37.2 2004/01/01 14:00:29 Strider Exp $

$Id: checkout_process.php,v 1.128 2003/07/24 18:00:29 Strider Exp $

$Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $

$Id: checkout_process.php,v 1.6.2.1 2003/05/03 23:41:23 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

include('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(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

if (!tep_session_is_registered('sendto')) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', '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'));

}

}

 

include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

 

// load selected payment module

require(DIR_WS_CLASSES . 'payment.php');

// #################### Added CCGV ######################

if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS

// #################### End Added CGV ######################

$payment_modules = new payment($payment);

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

$sql_data_array = array('customers_id' => $customer_id,

'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],

'customers_company' => $order->customer['company'],

'customers_street_address' => $order->customer['street_address'],

'customers_suburb' => $order->customer['suburb'],

'customers_city' => $order->customer['city'],

'customers_postcode' => $order->customer['postcode'],

'customers_state' => $order->customer['state'],

'customers_country' => $order->customer['country']['title'],

'customers_telephone' => $order->customer['telephone'],

'customers_email_address' => $order->customer['email_address'],

'customers_address_format_id' => $order->customer['format_id'],

'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],

'delivery_company' => $order->delivery['company'],

'delivery_street_address' => $order->delivery['street_address'],

'delivery_suburb' => $order->delivery['suburb'],

'delivery_city' => $order->delivery['city'],

'delivery_postcode' => $order->delivery['postcode'],

'delivery_state' => $order->delivery['state'],

'delivery_country' => $order->delivery['country']['title'],

'delivery_address_format_id' => $order->delivery['format_id'],

'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'],

'billing_company' => $order->billing['company'],

'billing_street_address' => $order->billing['street_address'],

'billing_suburb' => $order->billing['suburb'],

'billing_city' => $order->billing['city'],

'billing_postcode' => $order->billing['postcode'],

'billing_state' => $order->billing['state'],

'billing_country' => $order->billing['country']['title'],

'billing_address_format_id' => $order->billing['format_id'],

'payment_method' => $order->info['payment_method'],

'cc_type' => $order->info['cc_type'],

'cc_owner' => $order->info['cc_owner'],

'cc_number' => $order->info['cc_number'],

'cc_expires' => $order->info['cc_expires'],

'date_purchased' => 'now()',

'orders_status' => $order->info['order_status'],

'currency' => $order->info['currency'],

'currency_value' => $order->info['currency_value']);

tep_db_perform(TABLE_ORDERS, $sql_data_array);

$insert_id = tep_db_insert_id();

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$sql_data_array = array('orders_id' => $insert_id,

'title' => $order_totals[$i]['title'],

'text' => $order_totals[$i]['text'],

'value' => $order_totals[$i]['value'],

'class' => $order_totals[$i]['code'],

'sort_order' => $order_totals[$i]['sort_order']);

tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

}

#### Points/Rewards Module V1.50 balance customer points BOF ####

// customer shoppping points account balanced

if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) {

$customer_shopping_points = tep_get_shopping_points();

tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id);

if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') {

tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);

}

}

// customer pending points added

if ((USE_POINTS_SYSTEM == 'true') && ($order->info['total'] > 0) && (get_award_discounted($order) == true)) {

$redemption_awards = get_redemption_awards($customer_shopping_points_spending);

$points_toadd = get_points_toadd($order);

if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0))

tep_add_pending_points($customer_id, $insert_id, $points_toadd);

}

#### Points/Rewards Module V1.50 balance customer points EOF ####*/

 

 

$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $order->info['order_status'],

'date_added' => 'now()',

'customer_notified' => $customer_notification,

'comments' => $order->info['comments']);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

 

// initialized for the email confirmation

$products_ordered = '';

$subtotal = 0;

$total_tax = 0;

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

// Stock Update - Joao Correia

//++++ QT Pro: Begin Changed code

$products_stock_attributes=null;

if (STOCK_LIMITED == 'true') {

$products_attributes = $order->products[$i]['attributes'];

// if (DOWNLOAD_ENABLED == 'true') {

//++++ QT Pro: End Changed Code

 

 

$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename

FROM " . TABLE_PRODUCTS . " p

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa

ON p.products_id=pa.products_id

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad

ON pa.products_attributes_id=pad.products_attributes_id

WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";

// Will work with only one option for downloadable products

// otherwise, we have to build the query dynamically with a loop

//++++ QT Pro: Begin Changed code

// $products_attributes = $order->products[$i]['attributes'];

//++++ QT Pro: End Changed Code

if (is_array($products_attributes)) {

$stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";

}

$stock_query = tep_db_query($stock_query_raw);

 

if (tep_db_num_rows($stock_query) > 0) {

$stock_values = tep_db_fetch_array($stock_query);

//++++ QT Pro: Begin Changed code

$actual_stock_bought = $order->products[$i]['qty'];

$download_selected = false;

if ((DOWNLOAD_ENABLED == 'true') && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) {

$download_selected = true;

$products_stock_attributes='$$DOWNLOAD$$';

}

// If not downloadable and attributes present, adjust attribute stock

if (!$download_selected && is_array($products_attributes)) {

$all_nonstocked = true;

$products_stock_attributes_array = array();

foreach ($products_attributes as $attribute) {

if ($attribute['track_stock'] == 1) {

$products_stock_attributes_array[] = $attribute['option_id'] . "-" . $attribute['value_id'];

$all_nonstocked = false;

}

}

if ($all_nonstocked) {

$actual_stock_bought = $order->products[$i]['qty'];

} else {

asort($products_stock_attributes_array, SORT_NUMERIC);

$products_stock_attributes = implode(",", $products_stock_attributes_array);

$attributes_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

if (tep_db_num_rows($attributes_stock_query) > 0) {

$attributes_stock_values = tep_db_fetch_array($attributes_stock_query);

$attributes_stock_left = $attributes_stock_values['products_stock_quantity'] - $order->products[$i]['qty'];

tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

$actual_stock_bought = ($attributes_stock_left < 1) ? $attributes_stock_values['products_stock_quantity'] : $order->products[$i]['qty'];

} else {

$attributes_stock_left = 0 - $order->products[$i]['qty'];

tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (products_id, products_stock_attributes, products_stock_quantity) values ('" . tep_get_prid($order->products[$i]['id']) . "', '" . $products_stock_attributes . "', '" . $attributes_stock_left . "')");

$actual_stock_bought = 0;

}

}

}

// $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

// }

// if (tep_db_num_rows($stock_query) > 0) {

// $stock_values = tep_db_fetch_array($stock_query);

// do not decrement quantities if products_attributes_filename exists

if (!$download_selected) {

$stock_left = $stock_values['products_quantity'] - $actual_stock_bought;

tep_db_query("UPDATE " . TABLE_PRODUCTS . "

SET products_quantity = products_quantity - '" . $actual_stock_bought . "'

WHERE products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

//++++ QT Pro: End Changed Code

 

 

if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {

tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

}

}

}

//++++ QT Pro: Begin Changed code

}

//++++ QT Pro: End Changed Code

// Update products_ordered (for bestsellers list)

tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

 

//++++ QT Pro: Begin Changed code

if (!isset($products_stock_attributes)) $products_stock_attributes=null;

$sql_data_array = array('orders_id' => $insert_id,

'products_id' => tep_get_prid($order->products[$i]['id']),

'products_model' => $order->products[$i]['model'],

'products_name' => $order->products[$i]['name'],

'products_price' => $order->products[$i]['price'],

'final_price' => $order->products[$i]['final_price'],

'products_tax' => $order->products[$i]['tax'],

'products_quantity' => $order->products[$i]['qty'],

'products_stock_attributes' => $products_stock_attributes);

//++++ QT Pro: End Changed Code

tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

$order_products_id = tep_db_insert_id();

// #################### Added CCGV ######################

$order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM

// #################### End Added CCGV ######################

//------insert customer choosen option to order--------

$attributes_exist = '0';

$products_ordered_attributes = '';

if (isset($order->products[$i]['attributes'])) {

$attributes_exist = '1';

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

if (DOWNLOAD_ENABLED == 'true') {

$attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad

on pa.products_attributes_id=pad.products_attributes_id

where pa.products_id = '" . $order->products[$i]['id'] . "'

and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . $languages_id . "'

and poval.language_id = '" . $languages_id . "'";

$attributes = tep_db_query($attributes_query);

} else {

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");

}

$attributes_values = tep_db_fetch_array($attributes);

 

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'products_options' => $attributes_values['products_options_name'],

'products_options_values' => $attributes_values['products_options_values_name'],

'options_values_price' => $attributes_values['options_values_price'],

'price_prefix' => $attributes_values['price_prefix']);

tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);

 

if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'orders_products_filename' => $attributes_values['products_attributes_filename'],

'download_maxdays' => $attributes_values['products_attributes_maxdays'],

'download_count' => $attributes_values['products_attributes_maxcount']);

tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);

}

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];

}

}

//------insert customer choosen option eof ----

$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);

$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];

$total_cost += $total_products_price;

 

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

}

// #################### Added CCGV ######################

$order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM

// #################### End Added CCGV ######################

// lets start with the email confirmation

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";

}

 

$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

 

 

// Include OSC-AFFILIATE

require(DIR_WS_INCLUDES . 'affiliate_checkout_process.php');

 

// load the after_process function from the payment modules

$payment_modules->after_process();

 

$cart->reset(true);

 

// unregister session variables used during checkout

tep_session_unregister('sendto');

tep_session_unregister('billto');

tep_session_unregister('shipping');

tep_session_unregister('payment');

tep_session_unregister('comments');

tep_session_unregister('customer_shopping_points_spending');// Points/Rewards Module V1.50

// #################### Added CCGV ######################

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');

$order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM

// #################### End Added CCGV ######################

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

 

?>

 

==============================================

 

thanks Deep-Silver

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

ok, here it is:

 

==============================================

 

thanks Deep-Silver

Please be carefull and backup this file before.

here we go......

Open catalog/checkout_confirmation.php

 

find the whole pieces of code you priveiuselly added for points reward

and replace it it this.

##### Points/Rewards Module V1.50 check for error BOF #######
 if (USE_REDEEM_SYSTEM == 'true') {
   if (!tep_session_is_registered('customer_shopping_points_spending'))
     tep_session_register('customer_shopping_points_spending');
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){
       $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending'];
     }
// customer can't use other then the exact amount when enabled         
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){
       $customer_shopping_points_spending = POINTS_EXACT_VALUE;
     }
// register customer shopping points         
       $customer_shopping_points = tep_get_shopping_points();
// customer can't use invalid points amount         
     if ($customer_shopping_points < $customer_shopping_points_spending) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL'));
     }
// customer can't use points over the max allowed         
     if ($customer_shopping_points_spending > POINTS_MAX_VALUE) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL'));
     }
//force customers to select other payment method if the points total not enough to cover the cost.
     if ( !$credit_covers && $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL'));
     }
// customer can't use points over the order total         
     if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));
     }
 } 
// if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
  if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) && (!$customer_shopping_points_spending) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
  }
########  Points/Rewards Module V1.50 EOF #################*/

This code is for users with Credit Class & Gift Voucher contribution.

Thats should be it, please post here the result.

Hope that it wil work out fine for you. and thanks i did had a great holidy

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Please be carefull and backup this file before.

here we go......

Open catalog/checkout_confirmation.php

 

find the whole pieces of code you priveiuselly added for points reward

and replace it it this.

##### Points/Rewards Module V1.50 check for error BOF #######
?######## ?Points/Rewards Module V1.50 EOF #################*/

This code is for users with Credit Class & Gift Voucher contribution.

Thats should be it, please post here the result.

Hope that it wil work out fine for you. and thanks i did had a great holidy

Oh man... you are totally awesome Deep-Silver.

 

Been chatting to now for a long time (on and off) on this forum, ever since V1.20 (i think) and you have always gone out of your way not only to help me, but everyone else all the time and you never lose your cool and neber get frustrated when amateurs like me need help... THANKS A ZILLION-MILLION ;-)

 

it has showed up as minusing correctly in account.php and shows up in admin/customers/orders.php when invoice/edit i clicked. it also shows up correctly in checkout_confirmation.php

 

PROBLEM ONE - made a purchase and set status to 'delivered' in admin, but when clicked Points Pending, the new transactions points don't show up as pending and i don't have the option to 'confirm' points to customer.. this error wasn't there before the new code you gave me, please advise?

 

PROBLEM TWO - Even in admin/customers/customer_points it shows customers points qualified as '0' even though the transaction has gone through and points system was enabled

 

Nice to hear about your holiday and nice to hear you had a good time!

 

LOL! you should say that stressed spelt backwards is '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

Oh man... you are totally awesome Deep-Silver.

 

Been chatting to now for a long time (on and off) on this forum, ever since V1.20 (i think) and you have always gone out of your way not only to help me, but everyone else all the time and you never lose your cool and neber get frustrated when amateurs like me need help... THANKS A ZILLION-MILLION  ;-)

 

it has showed up as minusing correctly in account.php and shows up in admin/customers/orders.php when invoice/edit i clicked. it also shows up correctly in checkout_confirmation.php

 

PROBLEM ONE - made a purchase and set status to 'delivered' in admin, but when clicked Points Pending, the new transactions points don't show up as pending and i don't have the option to 'confirm' points to customer.. this error wasn't there before the new code you gave me, please advise?

 

PROBLEM TWO - Even in admin/customers/customer_points it shows customers points qualified as '0' even though the transaction has gone through and points system was enabled

 

Nice to hear about your holiday and nice to hear you had a good time!

 

LOL! you should say that stressed spelt backwards is 'chooch'

mmmmmmmmmm :'(

i'm gona loose Weight becouse of you.

PROBLEM ONE - How many order status you have?

OsCommerce default status count are 3.

if you have added other statuses maybe that will make a problem and needs to be ajust at admin/customers/customer_points_pending.php

Do you see any other transactions with wrong status?

PROBLEM TWO = if you did not confirm the points yet it will still show 0.

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

mmmmmmmmmm :'(

i'm gona loose Weight becouse of you.

PROBLEM ONE - How many order status you have?

OsCommerce default status count are 3.

if you have added other statuses maybe that will make a problem and needs to be ajust at admin/customers/customer_points_pending.php

Do you see any other transactions with wrong status?

PROBLEM TWO = if you did not confirm the points yet it will still show 0.

order status it three.. no changes made by me

 

when a purchase is made the points pending should show up and give me a confirm option - that isn't happening! It used to before but since updating using the checkout confirmation code you gave me it doesn't show (i think)

 

even if go the order status and set it to 'deliver' the customer points pending doesn't come up with the option to 'Confirm Points'.. it did before but not now

 

and in the admin/customer points.php there is no more 'PENDING', it only has the previous 'Confirmed' ones

 

been trying to get my head around this

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

Hi DEEP SILVER,

 

First thanks a million for this wonderfull contribution.

 

I installed it on a osc ms2 with about 10-15 contributions installed

 

I have a little problem with Gift Voucher and Points system in the "account.php"

"The problem is if I use Points system in account.php it destroys the design and both Gift Voucher and Points system menu is gone"

 

If I commit out the code in red there the problem is gone but I don't know if it has some side effects.. please advice :)

 

thanks again

 

 

 

 

<table width="100%">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></td>

</tr>

<tr>

<td class="main20"><b>Gavekort info</b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></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 width="60"><?php echo tep_image(DIR_WS_IMAGES . 'mwico_upg_s.gif'); ?></td>

<td class="lineh" width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr><?php

if (tep_session_is_registered('customer_id')) {

$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'] > 0 ) {

?>

<td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') ?> <?php echo CCGV_BALANCE .'' ?> <?php echo $currencies->format($gv_result['amount']); ?></td>

</tr>

<tr>

<td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') . ' <a href="' . tep_href_link(FILENAME_GV_SEND, '', 'SSL') . '">' . CCGV_SENDVOUCHER . '</a>'; ?></td>

</tr>

<tr>

<td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') . ' <a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'SSL') . '">' . CCGV_FAQ . '</a>'; ?></td>

</tr>

</table></td>

<td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr><?php

}}

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></td>

</tr>

</table>

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

Another little promlem (not realy a problem but)

 

I have RMA contribution installed too..

When my customers return a product they stil keep the earned points

 

I can remove the earned points manualy but then I have to calculate the points and adjust it manualy and write a mail to my customers etc...

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

order status it three.. no changes made by me

 

when a purchase is made the points pending should show up and give me a confirm option - that isn't happening! It used to before but since updating using the checkout confirmation  code you gave me it doesn't show (i think)

 

even if go the order status and set it to 'deliver' the customer points pending doesn't come up with the option to 'Confirm Points'.. it did before but not now

 

and in the admin/customer points.php  there is no more 'PENDING', it only has the previous 'Confirmed' ones

 

been trying to get my head around this

SORRY DEEP-SILVER

 

i just clocked on to it.....

 

any purchases with a Gift Voucher Balance and/or Discount Coupons DO NOT allow points to be accumulated even if Points are redeemed and Points are set to accumulate for earn Points rewarded by Points redeeming

 

i think i got it in the end

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

Hi DEEP SILVER,

 

First thanks a million for this wonderfull contribution.

 

I installed it on a osc ms2 with about 10-15 contributions installed

 

I have a little problem with Gift Voucher and Points system in the "account.php"

"The problem is if I use Points system in account.php it destroys the design and both  Gift Voucher and Points system menu is gone"

 

If I commit out the code in red there the problem is gone but I don't know if it has some side effects.. please advice  :)

 

thanks again

<table width="100%">

  <tr>

  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></td>

  </tr>

  <tr>

  <td class="main20"><b>Gavekort info</b></td>

  </tr>

  <tr>

  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></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 width="60"><?php echo tep_image(DIR_WS_IMAGES . 'mwico_upg_s.gif'); ?></td>

                <td class="lineh" width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

                  <tr><?php

  if (tep_session_is_registered('customer_id')) {

    $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'] > 0 ) {

?>

                    <td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') ?> <?php echo CCGV_BALANCE .'' ?> <?php echo $currencies->format($gv_result['amount']); ?></td>

                  </tr>

                  <tr>

                    <td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') . ' <a href="' . tep_href_link(FILENAME_GV_SEND, '', 'SSL') . '">' . CCGV_SENDVOUCHER . '</a>'; ?></td>

                  </tr>

      <tr>

                    <td class="main"> <?php echo tep_image(DIR_WS_IMAGES . 'arrow.gif') . ' <a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'SSL') . '">' . CCGV_FAQ . '</a>'; ?></td>

                  </tr>

                </table></td>

                <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

              </tr><?php

  }}

?>

            </table></td>

          </tr>

        </table></td>

  </tr>

  <tr>

  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '30'); ?></td>

  </tr>

  </table>

i don't see any code for points system in your post

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Another little promlem (not realy a problem but)

 

I have RMA contribution installed too..

When my customers return a product they stil keep the earned points

 

I can remove the earned points manualy but then I have to calculate the points and adjust it manualy and write a mail to my customers etc...

When admin delete order while points status for that order is still pending. those points will also be

deleted, however if admin already approved those points, admin must delete them manually(via admin panel).

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

.... and another change I made into my files that should be interesting (I hope) to all...All the best.

 

Antonio

i have used the code and realise it is very handy to have Antonio, thnaks for providing a useful asset to Deep-Silver's original script

i am having a problem where all i get it a maximum redepmtion allowed of '2':

 

checkout_payment.php says:

 

"Your Points Balance is 2,100.00 with a Total Redemption value of ?105.00.

On this order of ?405.00, a maximum Redemption of 2.00 Points is currently allowed"

 

no matter what my points balance, all that it says is 'you are allowed to redeem 2 points' - even though i have 2,100 points. i have checked the configuration and all is correct, but what code is generating this number '2'?

 

i can redeem a larger number and the 'redeem all' box appears too but the number shows as '2'

 

can anyone please advise?

 

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

I have a question about the points rewards contrib. The checkbox states; "Or tick here to use all available points balance(only if less then order total value)"

 

Is there a way to remove the requirement that the amount of points must be less than the total order?

get the latest update

1.Small updates to the code in refer to catalog/checkout_payment.php

The checkbox to use all available points credit will only show up when the customer points account

total is less then whole payment.

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

But, I don't want them to have to use part points part cash. I want them to be able to pay for the entire order with points without having to type the number in the box. Isn't there a way to make the checkbox "Check to use all your points" without the stipulation that their point amount be less than the order total?

Link to comment
Share on other sites

i don't see any code  for points system in your post

 

It's the code for Gift voucher which have some conflects with points system,

when I use poits and rewards + gift voucher codes in account.php, it destroys the layout, and there are no layout problems when I remove it one of them.

Also if I remove only the red codes "Gift vouchers codes" the layout becodes good again...

 

Is it safe to remove that red codes?

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

i have used the code and realise it is very handy to have Antonio, thnaks for providing a useful asset to Deep-Silver's original script

i am having a problem where all i get it a maximum redepmtion allowed of '2':

 

checkout_payment.php says:

 

"Your Points Balance is 2,100.00 with a Total Redemption value of ?105.00. 

On this order of ?405.00, a maximum Redemption of 2.00 Points is currently allowed"

 

no matter what my points balance, all that it says is 'you are allowed to redeem 2 points' - even though i have 2,100 points. i have checked the configuration and all is correct, but what code is generating this number '2'?

 

i can redeem a larger number and the 'redeem all' box appears too but the number shows as '2'

 

can anyone please advise?

 

chooch

Good on you chooch as this time the problem is not you or your code,

the addon by Antonio Garcia for this part is fully buged, the problem you refering to can be solved by removing the number_format but other problem is still there.

The code written by Antonio Garcia dose NOT respact the exact amout only the maximum points allowed there for when the exact amount is set to on the code will show customer the wrong max points allowed.

For the time been the best thing for you to do is NOT to use Antonio Garcia's code untill he work this out. as a metter of fact you must remove this code as it gives your customers wrong guidenes.

As for Antonio Garcia , he took alot of time and efford putting that piece of code together but :'( writing the code is not a big deal as mainting it and checking it again and again and again before posting to public

Remember - - - "STRESSED" spelled backwards "DESSERTS"

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