Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

PLEASE ANYONE!!!

 

I have found an issue with CCGV well I think I did but probably not.

 

I have v5.16 with all updates and everything work well all but the BIG issue being SSL I have finally narrowed it down to this how I intsalled it in a bone stock test store and when you open any ssl page the dreded padlock with a red / does anyone have a fix for this. I really dont want to spend countless hours hunting down a line of code that someone has already got the answer to.

 

Please,

Thank you,

Eric


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

Hi Everybody,

 

Sorry for post again the same thing. But I couldn't see the satisfying answears for the problems. Now I have a doubt about that problems are occur only for me.

 

So please read the problems below carefuly and check your CCGV installation. Then please post the status. thanks. :D

 

----------

Anuruddha

 

====Old Post===

 

Serious Bug in Credit Class & Gift Voucher

 

Hi Everybody,

 

I am using Credit Class & Gift Voucher contribution (http://www.oscommerce.com/community/contributions,282/). It is a great and powerful contribution. I am using the latest version(CCGV version 5.16) with "CCGV Easier to Understand Payment Addon v1.2". I also updated the CCGV to "bunch of fixes v1.1 (table/roundoff/etc.) -24 Feb 2006" aviram bugs fix.

 

But I got a serious issue (bug) in this contribution. So I list how this bug created. I think this bug in every install of this great contribution.

 

-------------------------------------------------------------------

Assume I have enable 2Checkout and Cheque payment methods in Admin.

 

Bugs happening activities

----------------------

 

1)When customer in the "checkout_payment.php" page for make payment and has total amount is less than "Gift Voucher" balance and if customer first select 2Checkout(or cheque) as payment method and proceed to "checkout_confirmation.php" and some reason if he decide to go back to "checkout_payment.php" and select Gift Voucher as payment method and proceed to "checkout_confirmation.php" given a problem that that text displayed Playment Method as 2Checkout and also ""Gift Vouchers (-) :$xx.xx" is also displayed. When we check the generated html code we can find the 2Checkout payment module is active and "<input type="hidden" name="x_amount" value="0.00">" and other 2Checkout related hidden fields. So if the user click "Confirm Order" button he will conduct to the 2Checkout page with 0 total amount instead of minus the amount of this Gift Voucher balance.

 

***If the user only select Gift Voucher as his payment method in "checkout_payment.php" page and proceed to "checkout_confirmation.php" page and clicking "Confirm Order" button will reduce the amount of this Gift Voucher balance in correct way.

 

***If the total amount is greater than "Gift Voucher" balance will work correctly and if user select gift voucher and 2Checkout as payment method and proeed to Checkout confirmation page and clicking "Confirm Order" button he will conduct to the 2Checkout page with correct amount.( total amount - gift voucher balance= remaining amount pass for 2CO)

 

---------------------------------------------------------------------------

 

Assume I have only enable 2Checkout payment method in Admin.

 

Bugs happening activities

----------------------

 

1)When customer in the "checkout_payment.php" page for make payment and has total amount is less than "Gift Voucher" balance and if customer select Gift Voucher as payment method proceed to "checkout_confirmation.php" will given a problem that that text displayed Playment Method as 2Checkout and also ""Gift Vouchers (-) :$xx.xx" is also displayed. When we check the generated html code we can find the 2Checkout payment module is active and "<input type="hidden" name="x_amount" value="0.00">" and other 2Checkout related hidden fields. So if the user click "Confirm Order" button he will conduct to the 2Checkout page with 0 total amount instead of minus the amount of this Gift Voucher balance.

 

***If the total amount is greater than "Gift Voucher" balance will work correctly and if user select gift voucher and 2Checkout as payment method and proeed to Checkout confirmation page and clicking "Confirm Order" button he will conduct to the 2Checkout page with correct amount.( total amount - gift voucher balance= remaining amount pass for 2CO)

 

-------------------------------------------------------

 

I don't know what is the problem. I check the all the PHP code related to Gift Voucher contribution but unfortunately I could't resolve the problem. Then I install the old versions of the CCGV. But same problem is there.

 

Unfortunately my site is not in the live system. Still I am developing the site in local environment.

 

So please help me to solve this problem.

 

Thanks for everyone to make this great contribution. thanks.

 

====Old Post===

Share this post


Link to post
Share on other sites
I finally found the fix for the issue with the voucher less than the value of the total order...........I'll add information to the contribution area

 

http://www.oscommerce.com/community/contributions,282

 

BTW

 

5.15 is not a final fix, I found the install into the database when adding and removing the module to still be in french!!!!!

 

I found this out by accident!

 

I'm glad this fix is done, let me know how you guys make out, I've tested it six ways to sunday on a heavily modified site.........70+ contribs and seems to all be in order. let me know how you make out

Chris

I just noticed that the fix fails when I go to admin/modules and change the order..

 

I guess it is cost effective to use the coupons last but when i change the order total and return to checkout payment - the checkbox vanishes.

 

I may have to revert back to the original checkout payment file because the change of order total would make more money for the store

 

Anyone else noticed the problem with the fix posted on 20/12/2005 by kittmaster?


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

Share this post


Link to post
Share on other sites

Hi there,

 

I just installed this contribution and I'm getting the following error when trying to go to my admin-section:

 

Parse error: syntax error, unexpected T_REQUIRE in /home/kitchenn/public_html/admin/includes/languages/english.php on line 349

 

I checked the above line and i placed it exactly the way it is in the installation file.

 

Does somebody know what might be the problem?

 

Thanks a lot


HIM - Dark Light - Out on 26/09/05

Share this post


Link to post
Share on other sites

Any ideas?

 

The code that causes the error is:

 

require(DIR_WS_LANGUAGES . 'add_ccgvdc_english.php');

 

and is in admin/includes/languages/english.php

 

I don't know very much about php but the weird thing is that the code starts with "require" and all other lines in that file start with "define" so I'm not sure if it is something to do with that.

 

Any help would be greatly appreciated

Edited by kitchenniche

HIM - Dark Light - Out on 26/09/05

Share this post


Link to post
Share on other sites
Any ideas?

 

The code that causes the error is:

 

require(DIR_WS_LANGUAGES . 'add_ccgvdc_english.php');

 

and is in admin/includes/languages/english.php

 

I don't know very much about php but the weird thing is that the code starts with "require" and all other lines in that file start with "define" so I'm not sure if it is something to do with that.

 

Any help would be greatly appreciated

 

well, require() is basically the same as include() except that if the file is not found, the script is stopped as require() states that the file is absolutely necessary and include() states that you would really like that file included but could do without it.


Treasurer MFC

Share this post


Link to post
Share on other sites

When someone buys a Gift Voucher and I release it to them, if they then buy an item that is worth less than the gift voucher, the person will bypass the paypal payment page! It will move directly from checkout_confirmation.php to checkout_success.php without any payment in between the two. This happens with CCGv5.16 and I'm using Paypal IPN v3.15 I don't understand why this bypass is made only when the gift voucher is greater than the item bought. This happens without the redeem gift voucher box checked.

 

Anyone encounter this?

Share this post


Link to post
Share on other sites
When someone buys a Gift Voucher and I release it to them, if they then buy an item that is worth less than the gift voucher, the person will bypass the paypal payment page! It will move directly from checkout_confirmation.php to checkout_success.php without any payment in between the two. This happens with CCGv5.16 and I'm using Paypal IPN v3.15 I don't understand why this bypass is made only when the gift voucher is greater than the item bought. This happens without the redeem gift voucher box checked.

 

Anyone encounter this?

No, I have CCGV 5.15. If you email me, I will send you my payment.php page


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
No, I have CCGV 5.15. If you email me, I will send you my payment.php page

I have to log off for some time, so here is my checkout_paymeny.php file. As I said previously, it is CCGV 5.15 I am waiting for molafish to post the new version before I do any more. This one (5,15a2) was hard enough to install and have it it working correctly

 

<?php

/*

$Id: checkout_payment.php,v 1.2.7 2004/01/01 12:03:27 Strider Exp $

$Id: checkout_payment.php,v 1.113 2003/07/24 23:03:27 Strider Exp $

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

$Id: checkout_payment.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

 

Installed

Back Buttons to the Checkout Process

CCGV

*/

 

require('includes/application_top.php');

 

// #################### Begin Added CGV JONYO ######################

if (tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv'); //added to reset whether a gift voucher is used or not on this order

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

 

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

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

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); // CCGV Contribution

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

 

 

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

}

}

}

// #################### Begin Added CGV JONYO ######################

// #################### THIS MOD IS OPTIONAL! ######################

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

 

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

// #################### THIS MOD WAS OPTIONAL! ######################

 

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

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

require(DIR_WS_CLASSES . 'order_total.php');//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules = new order_total;//ICW ADDED FOR CREDIT CLASS SYSTEM

$order_total_modules->clear_posts(); // ADDED FOR CREDIT CLASS SYSTEM by Rigadin in v5.13

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

 

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

 

$total_weight = $cart->show_weight();

$total_count = $cart->count_contents();

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

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

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

 

// 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 // #################### Added CGV ###################### ?>

var submitter = null;

function submitFunction() {

submitter = 1;

}

<?php // #################### End Added CGV ###################### ?>

function selectRowEffect(object, buttonSelect) {

 

// #################### Begin Added CGV JONYO ######################

if (!document.checkout_payment.payment[0].disabled){

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

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;

}

// #################### Begin Added CGV JONYO ######################

}

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

}

 

function rowOverEffect(object) {

if (object.className == 'moduleRow') object.className = 'moduleRowOver';

}

 

function rowOutEffect(object) {

if (object.className == 'moduleRowOver') object.className = 'moduleRow';

}

 

<?php // #################### Begin Added CGV JONYO ###################### ?>

 

<?php

if (MODULE_ORDER_TOTAL_INSTALLED)

$temp=$order_total_modules->process();

$temp=$temp[count($temp)-1];

$temp=$temp['value'];

 

$testing= $GLOBALS['ot_gv']->mod_process();

$testing=$GLOBALS['ot_gv']->my_output[0];

 

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

 

echo "// temp1 = " . $temp['value'] . "\n";

echo "// temp2 = " . $temp . "\n";

echo "// gvresult = " . $gv_result['amount'] . "\n";

 

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

 

?>

 

function clearRadeos(){

document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;

for (counter = 0; counter < document.checkout_payment.payment.length; counter++)

{

// If a radio button has been selected it will return true

// (If not it will return false)

if (document.checkout_payment.cot_gv.checked){

document.checkout_payment.payment[counter].checked = false;

document.checkout_payment.payment[counter].disabled=true;

//document.checkout_payment.cot_gv.checked=false;

} else {

document.checkout_payment.payment[counter].disabled=false;

//document.checkout_payment.cot_gv.checked=true;

}

}

}<? } else { $coversAll=false;?>

function clearRadeos(){

document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;

}<? } ?>

<?php // #################### End Added CGV JONYO ###################### ?>

 

//--></script>

 

<?php // #################### Begin Added CGV JONYO ###################### ?>

<?php // echo $payment_modules->javascript_validation(); ?>

<?php echo $payment_modules->javascript_validation($coversAll); ?>

<?php // #################### End Added CGV JONYO ###################### ?>

 

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

}

?>

 

<?php // #################### Begin Added CGV JONYO ###################### ?>

<?php // #################### THIS MOD IS OPTIONAL! ###################### ?>

<tr>

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

<tr>

<td class="main"><b><?php echo HEADING_PRODUCTS; ?></b><? echo ' <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></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

//}

 

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

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

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

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

 

if (STOCK_CHECK == 'true') {

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

}

 

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 width="30%"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";

}

?>

<tr>

<td COLSPAN="3" valign="top" align="right">

<table border="0" cellspacing="0" cellpadding="3">

<?php

if (MODULE_ORDER_TOTAL_INSTALLED) {

//$temp=$order_total_modules->process();

echo $order_total_modules->output();

}

?>

</table>

</td>

</tr>

</table>

</td>

</tr>

</table></td>

</tr>

<!-- </table></td>

</tr-->

<?php // #################### End Added CGV JONYO ###################### ?>

<?php // #################### THIS MOD WAS OPTIONAL! ###################### ?>

 

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

</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++;

}

 

// #################### Begin Added CGV JONYO ######################

/*

if (tep_session_is_registered('customer_id')) {

if ($testing['value']>0){

echo ' <tr><td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td colspan=2><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr class="moduleRow" onmouseover="rowOverEffect(this)" onclick="clearRadeos()" onmouseout="rowOutEffect(this)" >' . "\n" .

' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td class="main"><b>';

echo $testing['text'].' ';//var_dump ( $testing);

echo $order_total_modules->sub_credit_selection();

}

}

*/

 

if (tep_session_is_registered('customer_id')) {

// if ($testing['value']>0){

if ($gv_result['amount']>0){

echo ' <tr><td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td colspan=2>' . "\n" .

' <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr class="moduleRow" onmouseover="rowOverEffect(this)" onclick="clearRadeos()" onmouseout="rowOutEffect(this)" >' . "\n" .

' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td class="main">' . $testing['text'];

 

echo $order_total_modules->sub_credit_selection();

}

}

 

 

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

 

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<?php // #################### Added CGV ######################

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

// #################### End Added CGV ###################### ?>

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

 

<?php // **************** Add Back buttons to the checkout process 1.2 http://www.oscommerce.com/community/contributions,3805 BOF ******************** ?>

<td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<?php // ################ Add Back buttons to the checkout process http://www.oscommerce.com/community/contributions,3805 EOF ################### ?>

 

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


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

I'm having a problem with this contribution.

using 5.16.

 

WHen they apply the discount it works fine, but when they go to continue to checkout_confirmation.php it brings them back to the checkout_payment.php page with the same info and they're stuck. Let me know if anyone has any info or insight on this problem. I've found similar issues in the forum but nothing exactly like this problem.

 

Thanks,

ben

Share this post


Link to post
Share on other sites

Hi !

I use the ccgv in my webmakers edition.

 

All works fine, but I think there is something wrong in tax calculation.

 

Here is my Result:

 

Result:

 

Total Goods: 100.00EUR

Coupon :code: 10.00EUR

Shipping (): 5.00EUR

incl.Tax 16 %: 14.48EUR (14,48 EUR are from 100+5 EUR ! - not 100-10+5 EUR !!)

Order Total: 95.00EUR

 

Should tax calculation not :

 

100 - 10 (Couon) + 5 (Shipping) = 95 => includes Tax 13.10 EUR

 

I tried all settings, but I can`t get it work to calculate tax from Order Total (after Coupon has been taken off).

 

This ist my Sequnce:

Nachnahmegeb?hr 5

Gutscheine 2

Gutscheine 3

Mindermengenzuschlag

Versandkosten 4

Zwischensumme 1

MwSt. 6

Summe 8

Members Discount 99

 

And this is config of Coupon:

 

Display Total

Do you want to display the Discount Coupon value?

 

x true

false

 

Sort Order

Sort order of display.

2

 

Include Shipping

Include Shipping in calculation

 

true

x false

 

Include Tax

Include Tax in calculation.

 

true

x false

 

Re-calculate Tax

Re-Calculate Tax

 

None

Standard

x Credit Note

 

Tax Class

Use the following tax class when treating Discount Coupon as Credit

 

none

 

Hope, you understand my problem with tax calculation ?


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites

I have pretty much just exhausted all of my options in the forums and contrib section to get this contrib to work. Basically, Everything is working perfectly cosmetically, and deducts fine but there is an issue in the backend that is not working. it's just not sending the deducted amount to my authorizenet gateway and the gv_redeem_code isn't being passed to checkout_confirmation.php. I just need that little bit of extra help to get this working.

 

Thanks

Ben

Share this post


Link to post
Share on other sites

Try looking in the Contribution Support Forum for Authorize Net AIM 2.2

 

Vger

Share this post


Link to post
Share on other sites

Vger -

Thanks! That did it:

 

If anyone is having problems with the authorize net AIM module working with the latest CCGV module, here's the Fix:

 

In checkout_process.php change this code around line 55-65:

 

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

 

To this:

 

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

// load the before_process function from the payment modules
$payment_modules->before_process();

 

Note: Because of my custom ccgv mod, some people might not have the above code i provided. So, here's the fix with the standard code:

In checkout_process.php change this code around line 55-65:

 

// load the before_process function from the payment modules
$payment_modules->before_process();

$order_totals = $order_total_modules->process();

 

To this:

 

$order_totals = $order_total_modules->process();

// load the before_process function from the payment modules
$payment_modules->before_process();

Share this post


Link to post
Share on other sites
Just a note to users of the latest version.

There are so many bugs that its hard to start with.

sometime people change the code to fit their need but hard to tell if it work fine with other users.

I pay alot of respact to Ian C Wilson for all his hard work , looking at the original code i can tell that the contribution got cracked druing upgrades. so many tiny piecses of code that not in use .somebody have to clean up the mass and to start over with a cleaner code.(maybe I will do it but only after the official relese of osCommerce Version 2.2MS3 in July or August).

The big issue is at the Product-Category restrictions apply.

Stores owners using this module should know that when you set a Product/Category restrictions the check is only for the first item in cart so if the customer have few items in cart and only one of those items is a valid products,

he/she will still be able to use the coupon to pay for the order.

DEEP-SILVER

the orignal code was great and the concept by the right honourable mr wilson was fantastic... thanks to his vision the CCGV is where it is today....

 

... however, the contribution is well messed up now so for those who want to use this mod from 5.10 + patches (a version that actually worked very well) can find the details here:

 

CCGV TRAD FORUM

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

Share this post


Link to post
Share on other sites
the orignal code was great and the concept by the right honourable mr wilson was fantastic... thanks to his vision the CCGV is where it is today....

 

... however, the contribution is well messed up now so for those who want to use this mod from 5.10 + patches (a version that actually worked very well) can find the details here:

 

CCGV TRAD FORUM

 

Interesting.

 

Thanks for the tip Chooch.

Share this post


Link to post
Share on other sites
Interesting.

 

Thanks for the tip Chooch.

no problem, hope it helps others too.


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

Share this post


Link to post
Share on other sites
I have installed the WPP with CCGV - works good so far. (I even found the solution for passing the correct order total after CCGV discounts to the paypal).

 

Thobry, or anyone else who knows, what is the solution for this one? I am having the same problem, the amount sent to paypal does not include the discount.

 

PROBLEM: When using PAYPAL express checkout and the customer is directed back to the store to complete the checkout process - the CCGV REDEEM COUPON area has dissapeared. (Bad!) The only thing on the payment page is the order coment field and the continue button.

 

When NOT using PayPal express check out, the CCGV Redeem coupon area is there and it works. (Good!)

 

I suspect i need to edit my checkout_payment.php file and reorder one of the two mods in order to get the CCGV field to show up durring express checkout.

 

How about this problem, did you get it fixed. I could use some help with this one as well.

 

Thanks

Share this post


Link to post
Share on other sites

I think I've made a mistake with the install somewhere. Look at the image below. The coupon is showing but it isnt being subtracted from the total.

 

problem.jpg

 

uum, any ideas?


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

Just checked and its not being deducted at all. The figure sent to the payment gateway isnt discounted.


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

Sorry, I've worked it out. I didnt for 1 minute think the sort order would effect the calculation. lol


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

I have trouble with CCGV 2.16 and SE0 2.1d...

1. CGGV and SEO turned on...

Everything works perfect, except the redeem button...

 

2. CGGV turned on, SEO turned off..

CGGV works perfectly too, but I want them both to work ;-)

 

 

I also read about Chemo's last SEO version because there should be an option called 'Output W3C valid URLs (parameter string)?'. If I disable this option both contributions should work, but I have not found this option in neither one of Chemo's last contribs.

Has anyone solved this problem?

I appreciate any help I can get on that issue...

Share this post


Link to post
Share on other sites
I have trouble with CCGV 2.16 and SE0 2.1d...

1. CGGV and SEO turned on...

Everything works perfect, except the redeem button...

 

2. CGGV turned on, SEO turned off..

CGGV works perfectly too, but I want them both to work ;-)

I also read about Chemo's last SEO version because there should be an option called 'Output W3C valid URLs (parameter string)?'. If I disable this option both contributions should work, but I have not found this option in neither one of Chemo's last contribs.

Has anyone solved this problem?

I appreciate any help I can get on that issue...

I use SEO and CCGV... never had any issues with them...

 

I wish I could help


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

Share this post


Link to post
Share on other sites
I use SEO and CCGV... never had any issues with them...

 

I wish I could help

 

Yeah I solved the problem. thanks to JewBacca.. He gave me Chemo's version last version, so that SEO and CCGV work together just fine.

My next problem is:

If I restrict a product in admin for the coupon discount, and try to redeem the coupon in checkout_payment, it works perfectly. But if I add the restricted product and a not retsricted product, the coupon does not redeem the discount from the not-restricted product. As long I have the restricted product in my order, the coupon does not work. It should substract, lets say 20%o, of the not-restricted product(s).

can you help me out on that problem? Or does anyone else even has this problem?

I appreciate any help I can get.

Share this post


Link to post
Share on other sites
Yeah I solved the problem. thanks to JewBacca.. He gave me Chemo's version last version, so that SEO and CCGV work together just fine.

My next problem is:

If I restrict a product in admin for the coupon discount, and try to redeem the coupon in checkout_payment, it works perfectly. But if I add the restricted product and a not retsricted product, the coupon does not redeem the discount from the not-restricted product. As long I have the restricted product in my order, the coupon does not work. It should substract, lets say 20%o, of the not-restricted product(s).

can you help me out on that problem? Or does anyone else even has this problem?

I appreciate any help I can get.

 

I had the problem of product/category restrictions back on page 171 of this thread. No solution was forthcoming, so I just left it with no restrictions. I am hoping that the next great revamp of CCGV will fix this because I do not want to offer a discount on purchased gift vouchers. Mine is not a live shop, but if it was, I could not sell vouchers in this situation.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×