Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Credit Class/Gift Vouchers/Discount Coupons 5.10


4756 replies to this topic

#4741 farbor

  • Community Member
  • 28 posts
  • Real Name:Lele

Posted 09 December 2010, 23:31

Found the solution for this problem as well....
The issue is in ot_coupon.php:

All the lines:

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL'));

after each check.

It seems this

'error' => stripslashes(urldecode($HTTP_GET_VARS['$error'])));

cannot remove the "&" symbol and for this reason will not find any variable called error in the URL.

Those cause the checkout_payment.php to print an empty line

SOLUTION

I have replace all those line

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL'));

with

$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REEDEEM_COUPON), 'SSL');
$redirect_link = str_replace('&', '&', $redirect_link);
tep_redirect($redirect_link);

Here the code changed:

function collect_posts() {
// All tep_redirect URL parameters modified for this function in v5.13 by Rigadin
global $HTTP_POST_VARS, $customer_id, $currencies, $cc_id;
if ($HTTP_POST_VARS['gv_redeem_code']) {

// get some info from the coupon table
$coupon_query=tep_db_query("select coupon_id, coupon_amount, coupon_type, coupon_minimum_order,uses_per_coupon, uses_per_user, restrict_to_products,restrict_to_categories from " . TABLE_COUPONS . " where coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."' and coupon_active='Y'");
$coupon_result=tep_db_fetch_array($coupon_query);

if ($coupon_result['coupon_type'] != 'G') {

if (tep_db_num_rows($coupon_query)==0) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REEDEEM_COUPON), 'SSL');
$redirect_link = str_replace('&', '&', $redirect_link);
tep_redirect($redirect_link);
}

$date_query=tep_db_query("select coupon_start_date from " . TABLE_COUPONS . " where coupon_start_date <= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'");

if (tep_db_num_rows($date_query)==0) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_STARTDATE_COUPON), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_STARTDATE_COUPON), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
}

$date_query=tep_db_query("select coupon_expire_date from " . TABLE_COUPONS . " where coupon_expire_date >= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'");

if (tep_db_num_rows($date_query)==0) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_FINISDATE_COUPON), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_FINISDATE_COUPON), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
}

$coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'");
$coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "'");

if (tep_db_num_rows($coupon_count)>=$coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_COUPON . $coupon_result['uses_per_coupon'] . TIMES ), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_COUPON . $coupon_result['uses_per_coupon'] . TIMES ), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
}

if (tep_db_num_rows($coupon_count_customer)>=$coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_user'] . TIMES ), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_coupon'] . TIMES ), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
}

//**si** 09-11-05
/*
if ($coupon_result['coupon_type']=='S') {
$coupon_amount = $order->info['shipping_cost'];
} else {
$coupon_amount = $currencies->format($coupon_result['coupon_amount']) . ' ';
}
if ($coupon_result['coupon_type']=='P') $coupon_amount = $coupon_result['coupon_amount'] . '% ';
if ($coupon_result['coupon_minimum_order']>0) $coupon_amount .= 'on orders greater than ' . $coupon_result['coupon_minimum_order'];
if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id'); //Fred - this was commented out before
$cc_id = $coupon_result['coupon_id']; //Fred ADDED, set the global and session variable
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_REDEEMED_AMOUNT), 'SSL')); // Added in v5.13a by Rigadin
*/
global $order,$ot_coupon,$currency;
// BEGIN >>> CCVG 5.15 - Custom Modification - fix Coupon code redemption error
// Moved code up a few lines
if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');
$cc_id = $coupon_result['coupon_id'];
// END <<< CCVG 5.15 - Custom Modification - fix Coupon code redemption error

$coupon_amount= tep_round($ot_coupon->pre_confirmation_check($order->info['subtotal']), $currencies->currencies[$currency]['decimal_places']); // $cc_id
/* you will need to uncomment this if your tax order total module is AFTER shipping eg you have all of your tax, including tax from shipping module, in your tax total.
if ($coupon_result['coupon_type']=='S') {
//if not zero rated add vat to shipping
$coupon_amount = tep_add_tax($coupon_amount, '17.5');
}
*/
$coupon_amount_out = $currencies->format($coupon_amount) . ' ';
if ($coupon_result['coupon_minimum_order']>0) $coupon_amount_out .= 'on orders greater than ' . $currencies->format($coupon_result['coupon_minimum_order']);

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');
$cc_id = $coupon_result['coupon_id'];

if ( strlen($cc_id)>0 && $coupon_amount==0 ) {
// ccgv coupon restrictions error fix
// $err_msg = ERROR_REDEEMED_AMOUNT.ERROR_REDEEMED_AMOUNT_ZERO;
$err_msg = ERROR_REDEEMED_AMOUNT_ZERO;
} else {
$err_msg = ERROR_REDEEMED_AMOUNT.$coupon_amount_out;
}
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode($err_msg), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode($err_msg), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
//**si** 09-11-05 end

// $_SESSION['cc_id'] = $coupon_result['coupon_id']; //Fred commented out, do not use $_SESSION[] due to backward comp. Reference the global var instead.
} // ENDIF valid coupon code
} // ENDIF code entered
// v5.13a If no code entered and coupon redeem button pressed, give an alarm
if ($HTTP_POST_VARS['submit_redeem_coupon_x']) {
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL'));
$redirect_link = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL');
$redirect_link = str_replace('&amp;', '&', $redirect_link);
tep_redirect($redirect_link);
}
}


I saw someone else had this problem so I thought it was worthwhile to share the solution.
Thanks everyone.
Cheers
JK


View Postfarbor, on 08 December 2010, 23:43, said:

And I think I have found the solution as well....it seems there was a global variable missing....

Within the function before_process()

function before_process() {
global $customer_id, $order, $order_total_modules, $order_totals, $sendto, $billto, $languages_id, $payment, $currencies, $cart, $cart_PayPal_Standard_ID;
global $$payment;

$order_total_modules was missing...I can't believe none noticed that.
Now the process complete succesfully and everything works perfectly.

I have only a small little problem when the voucher is inserted and it failed any of the check, instead of getting the error message I get an empty pink line....

I think I have narrowed down the problem but I still did not manage to solve it:

Checkout_payment.php call the following functions:

<?php
// Start - CREDIT CLASS Gift Voucher Contribution
echo $order_total_modules->credit_selection();
// End - CREDIT CLASS Gift Voucher Contribution ?>
<?php

order_total.php will call the same function in ot_coupon:

while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
if ($selection_string =='') $selection_string = $GLOBALS[$class]->credit_selection();
if ( ($use_credit_string !='' ) || ($selection_string != '') ) {
$output_string .= '<tr colspan="4"><td colspan="4" width="100%">' . tep_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
$output_string = ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >' . "\n" .
' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' .
' <td class="main"><b>' . $GLOBALS[$class]->header . '</b></td>' . $use_credit_string;
$output_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
$output_string .= ' </tr>' . "\n";
$output_string .= $selection_string;

ot_coupon does all the checks to verify that the coupoon is correct and set the error if any of the check it fails:


function collect_posts() {
// All tep_redirect URL parameters modified for this function in v5.13 by Rigadin
global $HTTP_POST_VARS, $customer_id, $currencies, $cc_id;
if ($HTTP_POST_VARS['gv_redeem_code']) {

// get some info from the coupon table
$coupon_query=tep_db_query("select coupon_id, coupon_amount, coupon_type, coupon_minimum_order,uses_per_coupon, uses_per_user, restrict_to_products,restrict_to_categories from " . TABLE_COUPONS . " where coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."' and coupon_active='Y'");
$coupon_result=tep_db_fetch_array($coupon_query);

if ($coupon_result['coupon_type'] != 'G') {

if (tep_db_num_rows($coupon_query)==0) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL'));
}

$date_query=tep_db_query("select coupon_start_date from " . TABLE_COUPONS . " where coupon_start_date <= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'");

if (tep_db_num_rows($date_query)==0) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_STARTDATE_COUPON), 'SSL'));
}

$date_query=tep_db_query("select coupon_expire_date from " . TABLE_COUPONS . " where coupon_expire_date >= now() and coupon_code='".$HTTP_POST_VARS['gv_redeem_code']."'");

if (tep_db_num_rows($date_query)==0) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_FINISDATE_COUPON), 'SSL'));
}

$coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'");
$coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "'");

if (tep_db_num_rows($coupon_count)>=$coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_COUPON . $coupon_result['uses_per_coupon'] . TIMES ), 'SSL'));
}

if (tep_db_num_rows($coupon_count_customer)>=$coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_user'] . TIMES ), 'SSL'));
}

//**si** 09-11-05
/*
if ($coupon_result['coupon_type']=='S') {
$coupon_amount = $order->info['shipping_cost'];
} else {
$coupon_amount = $currencies->format($coupon_result['coupon_amount']) . ' ';
}
if ($coupon_result['coupon_type']=='P') $coupon_amount = $coupon_result['coupon_amount'] . '% ';
if ($coupon_result['coupon_minimum_order']>0) $coupon_amount .= 'on orders greater than ' . $coupon_result['coupon_minimum_order'];
if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id'); //Fred - this was commented out before
$cc_id = $coupon_result['coupon_id']; //Fred ADDED, set the global and session variable
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_REDEEMED_AMOUNT), 'SSL')); // Added in v5.13a by Rigadin
*/
global $order,$ot_coupon,$currency;
// BEGIN >>> CCVG 5.15 - Custom Modification - fix Coupon code redemption error
// Moved code up a few lines
if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');
$cc_id = $coupon_result['coupon_id'];
// END <<< CCVG 5.15 - Custom Modification - fix Coupon code redemption error

$coupon_amount= tep_round($ot_coupon->pre_confirmation_check($order->info['subtotal']), $currencies->currencies[$currency]['decimal_places']); // $cc_id
/* you will need to uncomment this if your tax order total module is AFTER shipping eg you have all of your tax, including tax from shipping module, in your tax total.
if ($coupon_result['coupon_type']=='S') {
//if not zero rated add vat to shipping
$coupon_amount = tep_add_tax($coupon_amount, '17.5');
}
*/
$coupon_amount_out = $currencies->format($coupon_amount) . ' ';
if ($coupon_result['coupon_minimum_order']>0) $coupon_amount_out .= 'on orders greater than ' . $currencies->format($coupon_result['coupon_minimum_order']);

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');
$cc_id = $coupon_result['coupon_id'];

if ( strlen($cc_id)>0 && $coupon_amount==0 ) {
// ccgv coupon restrictions error fix
// $err_msg = ERROR_REDEEMED_AMOUNT.ERROR_REDEEMED_AMOUNT_ZERO;
$err_msg = ERROR_REDEEMED_AMOUNT_ZERO;
} else {
$err_msg = ERROR_REDEEMED_AMOUNT.$coupon_amount_out;
}
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode($err_msg), 'SSL'));
//**si** 09-11-05 end

// $_SESSION['cc_id'] = $coupon_result['coupon_id']; //Fred commented out, do not use $_SESSION[] due to backward comp. Reference the global var instead.
} // ENDIF valid coupon code
} // ENDIF code entered
// v5.13a If no code entered and coupon redeem button pressed, give an alarm
if ($HTTP_POST_VARS['submit_redeem_coupon_x']) tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL'));
}

I suspect that in the code above the problem arises. I think the payment_error->&error variable is not populated correctly
As you can see all the if redirect back to checkout_payment.php that will print the error on the screen:

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

</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>

You can see from there that to retrieve the error it calls the function get_error() once more from ot_coupon.php:

function get_error() {
global $HTTP_GET_VARS;

$error = array('title' => MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR,
'error' => stripslashes(urldecode($HTTP_GET_VARS['$error'])));

return $error;
}

Here $error is populated with a title and and error.

$error['title'] is printed correctly on the screen $error ['error'] is not.

If instead of using stripslashes(urldecode($HTTP_GET_VARS['$error']))); I manually add some text then even the $error['error'] is printed on the screen. So my suspect is that the error either occurred when:

1) error is encoded : 'payment_error='.$this->code.'&error=' . urlencode(ERROR_REDEEMED_AMOUNT), 'SSL'));

or

2) error is decoded: 'error' => stripslashes(urldecode($HTTP_GET_VARS['$error'])));

I so in the forum someone had the same problem. Did anyone manage to resolve it?
Can someone help?

Any feedback is really appreciated.
Cheers
JK


#4742 farbor

  • Community Member
  • 28 posts
  • Real Name:Lele

Posted 12 December 2010, 15:00

Guys,

Quick question regarding something that I have noticed testing the app.
If you select free shipping it simply ignores the coupon amount, making impossible to have free shipping + a discount on the product.
Is that normal?
Anyone noticed this?

Thanks in advance for your help.
Cheers
JK

#4743 drillsar

  • Community Member
  • 222 posts
  • Real Name:thomas mccaffery

Posted 02 January 2011, 21:50

Fatal error: Call to undefined method shoppingCart::show_total()

I'm getting this error

in /includes/boxes/shopping_cart.php on line 81

#4744 uniform

  • Community Member
  • 7 posts
  • Real Name:gemma olds

Posted 10 January 2011, 15:50

Hi,

Does anyone know anything about this addon and 3d secure?
I have been using this addon perfectly for years and have only just noticed that even though using the newish paypal 3dsecure it still all works fine and actually processes the correct total but on the actual 3d secure page it shows the original total before discount, this obviously stops customers finishing the transaction as they dont know it actually works.

Not really sure where to even start with this.
Any help would be great.

thanks

#4745 mykeh

  • Community Member
  • 13 posts
  • Real Name:Mike Hayward

Posted 27 January 2011, 20:28

Hi Guys

I have 5.12 installed on RC2a and read through the install instructions and did the necessary - I think

When I click on either Valid Product List or Valid Categories List I get Accesd denied to the file valid productslist.php or validcatergories list.php

Both files live under the Admin Directory

I have aCpanel protection on the Admin Directory and turned it off the same problem occurs either way

This si obvously a rights issues - please can anyone give me a steer on CHMOD settings these two files hould have or anything else I should look at?

Many thanks

#4746 mbuist

  • Community Member
  • 9 posts
  • Real Name:Martin

Posted 04 February 2011, 20:01

doe anyone have asolution for this error

Fatal error: Call to undefined method order_total::clear_posts()

#4747 chinaboy

  • Community Member
  • 15 posts
  • Real Name:Lyron Molyneaux

Posted 06 February 2011, 02:55

Hi,

Can someone tell me what I am missing? I installed the Credit Class/Gift Vouchers/Discount Coupons 5.21 on my store and all seems to work well except the credit to the customers account. In the report section of the admin, I can see that the customer has credit, but nowhere in the customers account does it display that they have a gift voucher balance. Where should the customers balance be located and how can they access it. The customer can purchase the gift voucher from my store and after paying via paypal, they return to the store and it states that they have purchased a voucher and they can send to another person if they want too. But that is all I see. No balance or any reference to the gift voucher is listed anywhere.

Please help me figure out where I went wrong. Am I missing a file or something?

Thanks

#4748 impulsecreations

  • Community Member
  • 8 posts
  • Real Name:Dan Wallace

Posted 20 March 2011, 14:39

I have a coupon set up to only apply to items in one top level category. However, that category has many subcategories and there are products in those subcategories that are not in the parent category and I don't want the coupon to apply to those products but it is.

How can I change the code to apply the coupon to only the category specified for the coupon but not any subcategories of that category?

Dan
Impulse Creations
The Best Online Comic Book Store

#4749 sbetto

  • Community Member
  • 23 posts
  • Real Name:Sarah B
  • Gender:Female
  • Location:Newcastle, Australia

Posted 01 April 2011, 05:24

View Postchinaboy, on 06 February 2011, 02:55, said:

Hi,

Can someone tell me what I am missing? I installed the Credit Class/Gift Vouchers/Discount Coupons 5.21 on my store and all seems to work well except the credit to the customers account. In the report section of the admin, I can see that the customer has credit, but nowhere in the customers account does it display that they have a gift voucher balance. Where should the customers balance be located and how can they access it. The customer can purchase the gift voucher from my store and after paying via paypal, they return to the store and it states that they have purchased a voucher and they can send to another person if they want too. But that is all I see. No balance or any reference to the gift voucher is listed anywhere.

Please help me figure out where I went wrong. Am I missing a file or something?

Thanks

Did you find out the answer to this? Its got me stumped too.

#4750 rramlani

  • Community Member
  • 6 posts
  • Real Name:rashmi

Posted 04 April 2011, 10:37

Hi all,
We have been using CCGV and Freeamount for quite some time now and offer free shipping on orders over $99. The client now wants to make sure that free shipping is not offered to orders that drop below $99 after discount coupon is applied. So e.g. If the order total was $110 and free shipping was selected at the checkout_shipping page, then a discount coupon was applied on the checkout_payment stage whereby the order total drops to $90, then at the checkout confirmation it should redirect the customer back to checkout_shipping.
Does anybody have any ideas? I have a little idea of how to proceed but sure would appreciate some help with this project.
Thanks

#4751 torgrima

  • Community Member
  • 12 posts
  • Real Name:Torgrim

Posted 07 April 2011, 08:56

Hi

Has any one testet "CCGV_2_22_2011.zip" with osCommerce Online Merchant v2.3?

Thanks
Torgrim

#4752 fulluvscents

  • Community Member
  • 214 posts
  • Real Name:Jetta
  • Gender:Female

Posted 20 April 2011, 01:18

View Posttorgrima, on 07 April 2011, 08:56, said:

Hi

Has any one testet "CCGV_2_22_2011.zip" with osCommerce Online Merchant v2.3?

Thanks
Torgrim


#4753 lupole

  • Community Member
  • 81 posts
  • Real Name:Larry Lupole

Posted 07 May 2011, 22:07

View Posttorgrima, on 07 April 2011, 08:56, said:

Hi

Has any one testet "CCGV_2_22_2011.zip" with osCommerce Online Merchant v2.3?

Thanks
Torgrim

Yes, I have this working with the exception of the shopping cart box. Which is now located in includes/modules/boxes/bm_shopping_cart.php with this version of osc.

#4754 eberswine

  • Community Member
  • 35 posts
  • Real Name:josh

Posted 08 July 2011, 13:13

Is there anyway to generate a series of coupons?

Wanting to give away 350 subscriptions as a promo at an event.

Don't want people to be able to use the coupon and pass it along to a friend.

I'd like to make a coupon code numbered series like CoupOfWM1, CoupOfWM2.....CoupOfWM350.

Anyway to do that without making them one by one?

Thanks!!

#4755 Lovelock

  • Community Member
  • 90 posts
  • Real Name:ds

Posted 19 October 2011, 03:07

Installed this today, but the coupons dont take any money off?

Ive just realised that it has some how 'removed' all my payment modules, i now have these back but its still not taking any money off?

Also the payment modules will only allow me to have one, so it says i have none installed, but i click on paypal express, and it says its installed and has all setting etc, so i uninstall and reinstall then its back.

I then do web payments paypal standard, and express disappears...

Any ideas?

#4756 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 09 January 2012, 21:10

Hi all, i continue with the same problem described here:
http://forums.oscomm...ost__p__1509926

checkout_payment.php
<?php
// Start - CREDIT CLASS Gift Voucher Contribution
echo $order_total_modules->credit_selection();
// End - CREDIT CLASS Gift Voucher Contribution
?>

In /includes/modules/order_total/ot_gv.php
		$image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';


In /includes/modules/order_total/ot_couponphp

 
  $selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code', 'redeem code') ;
  $selection_string .= ' ';
  $selection_string .= tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'onclick="return submitFunction()"');



I insert the code GIFT20 on the box, but clicking button_redeem.gif nothing happens!!!! Cannot redeem!
I dont know how to fix it.

Edited by bhbilbao, 09 January 2012, 21:13.


#4757 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 09 January 2012, 21:28

See the problem:
<?php
// Start - CREDIT CLASS Gift Voucher Contribution
	    echo $order_total_modules->credit_selection();
// End - CREDIT CLASS Gift Voucher Contribution
?>

That code must be inserted after
  echo $order_total_modules->sub_credit_selection();

pasting before doesnt work.