Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Credit Class/Gift voucher/Discount Coupon v5


Ian

Recommended Posts

I have the Credit Class & Gift Voucher contribution installed along with the Aust Bank Transfer.

 

When customers purchase normal products the Aust Bank Transfer is available as an option no problems.

 

I have created a gift voucher as a product but when a customer tries to purchase it the Aust Bank Transfer payment option is not displayed in the checkout.

 

If I add a normal product to the cart along with the gift voucher then the full proccess through shipping-> payments is done and Aust Bank Transfer option is displayed as an option.

 

Anyone have any ideas on why the Aust Bank Transfer option is not displaying for gift vouchers??

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 499
  • Created
  • Last Reply

Top Posters In This Topic

Can someone upload an image of what the checkout page is supposed to look for, for people checking out with Gift Vouchers?

 

I have $50 gift vouchers in my basket.

But during checkout, I have a box for the code (which i dont have because GV are sent automatically without a code) and a redeem button which when pressed does nothing but move onto the next page.

 

can someone explain how this should work please, and how to redeem gift vouchers.

 

thnx

Link to comment
Share on other sites

  • 2 months later...

I've installed the CCGV contribution successfully. All works fine except when payment is made and you click the button to "return to merchant", I get this error:

 

Fatal error: Cannot redeclare class order_total in /hsphere/local/home/catscrea/catscreationsandcrafts.com/catalog/includes/classes/order_total.php on line 14

 

 

How do I fix it so my customers will get back to my store?

Link to comment
Share on other sites

HI,

 

I installed theCredit Class & Gift Voucher 5.15a. Everything seems to be working correctly. When i get to the checkout_payment page, Nothing is displayed. I get a blank page. I tried to use the checkout_payment,.php from the previous versions and it seems to work. I want the features that is embedded with the new 5.15a and that why i want to get the new checkout_payment.php to work. What is causing the display of a blank page. Did anyone experience this problem. If yes what is the solution.

 

 

Here is what i found in the view source of the blank page. The last line seems to point to an error.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Welcome in your Pacifica Galleries shop</title>

<base href="http://neutron.liquidweb.com/~pacifica/">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

var selected;

var submitter = null;

function submitFunction() {

submitter = 1;

}

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

}

 

 

<br />

<b>Fatal error</b>: Call to undefined function: mod_process() in <b>/home/pacifica/public_html/checkout_payment.php</b> on line <b>159</b><br />

Link to comment
Share on other sites

Hi,

 

I read you've managed to get the CCGV contrib working????? I've installed the 515a1 release (uploaded today) but still i'm having a wrong amount passed to paypal when the cart amount is less than voucher balance (only in this particular case), paypal gets a 'zero' amount in that case....Did you manage to get it working with paypal as well ? (i use paypal.php not paypalIPN.php!!). I hope you have the final solution for me to get it working fully....

 

Thnx

Sokos.

 

Hello,

 

I've installed CCGV and it worked perfectly. Well now I want the customer to be able to enter the coupon code while still in the shopping cart. When the customer redeems his coupon, it will be applied in the shopping cart where it shows the subtotal and what not. I've been modifing files that refrence to checkout_payment.php and switching it to shopping_cart.php (FILENAME_SHOPPING_CART). I added the ccgv code from the checkout_payment.php to the shopping cart, I also added the JS that was necesary. Unfortantly I still can't get this thing to work properly. Has anyone been able to do this?

 

Thanks

Sean

Link to comment
Share on other sites

I am getting an error :

 

1146 - Table 'mgstest.TABLE_COUPON_GV_CUSTOMER' doesn't exist

 

select amount from TABLE_COUPON_GV_CUSTOMER where customer_id = '2'

 

[TEP STOP]

 

why?

 

I have upload the mysql file that was given to me with the contrib.

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

  • 3 weeks later...

Hi Guys,

 

Please help, i have below 2 problems after i install CCVG5.15a2(follow instruction, just copy into new, clean fresh copies of oscommerce-2.2ms2-051113),

 

1.) in admin:"Payment Modules" page

 

Warning: main(/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

 

Warning: main(/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

 

Warning: main(): Failed opening '/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

 

 

2.) in catalog: "Delivery Information" page

 

once i click on continue button, the link page is blank and nothing show up.

 

why? what should i do? Please help

 

Thanks

Link to comment
Share on other sites

Hi Guys,

 

Please help, i have below 2 problems after i install CCVG5.15a2(follow instruction, just copy into new, clean fresh copies of oscommerce-2.2ms2-051113),

 

1.) in admin:"Payment Modules" page

 

Warning: main(/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

 

Warning: main(/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

 

Warning: main(): Failed opening '/home/theshop/domains/theshop.com.my/public_html/ctg/includes/languages/english/modules/payment/paypal_ipn.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/theshop/domains/theshop.com.my/public_html/ctg/admin/modules.php on line 128

2.) in catalog: "Delivery Information" page

 

once i click on continue button, the link page is blank and nothing show up.

 

why? what should i do? Please help

 

Thanks

 

I had found way to fix 1st problem refer http://www.oscommerce.com/community/contributions,282 :lol: , but 2nd problem still cant fix it anyone can share the idea to help me fix it pls.. Pls help.. :( Thanks

Edited by brucelim
Link to comment
Share on other sites

Now combined into one contribution.

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

The changes to the previous versions are as follows.

Core Credit Class Code.

The whole database structure has been changed. This was needed to help with the single redeem box,

and to provide better reporting possibilities.

Changes to the order_total ouput to allow for a single redeem box.

Gift Voucher System

Thanks to gdfwilliams, I've done away with separate box to show the amount in a customers Gift Voucher Account.

This is now shown in the shopping cart box.

The code now uses the get_content_type function to skip shipping selection if the Gift Voucher is the only item

in the cart.

The decision to queue purchases of Gift Vouchers is now set in admin rather than having to edit a DEFINE in

add_application_top.php

A new tax option has been added to treat Gift Vouchers like credit notes. If you don't know what that

means it probably doesn't concern you.

Redemption by email is now much simpler. There is no need to login, as the redeemed value is stored

in a session variable until the user checksout.

It is now possible to set a variable (in includes/add_application_top.php) to send a Gift Voucher

to new customers when they create an account.

define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');

It is also now possible to set the length of the redeem codes generated by the system.

define('SECURITY_CODE_LENGTH', '10');

again this is located in catalog/includes/add_application_top.php

If Voucher purchases are queued then the customer is informed by email when the amount is released

by admin.

Discount Coupon System

Lots of tidying up in the admin area, including the addittion of a proper voucher usage report.

A new Free Shipping Voucher (again thanks to gdfwilliams for the idea).

As for the Gift Voucher a new tax calculation treating the Coupon as a Credit Note.

The whole tax calculation logic has in fact been rewritten.

Again like the GV system, you can now set a Disount Coupon to be sent to a new customer on signup.

define('NEW_SIGNUP_DISCOUNT_COUPON', '3');

the value (e.g. '3') is the coupon id as created in admin.

The discount coupon is now shown in the shopping cart box when redeemed, this also has a 'more info' link

that gives full details of what the Coupon is worth including any category/product restrictions.

I'm currently working on a much more intuitive way of defining category/product restiction for the Discount

Coupon system. I will release this as an upgrade file asap.

can anyone tell me what files I do have to download ? I have downloaded 2 different versions and none of them worked . thanks

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

I have been searching for a fix for this issue in all of the forums. I have a heavily mdified version of OSC but I have not changed the contribution. In short, everything seems to be working fine, except that the percentage discount is effecting the shipping as well. I only want the discount to effect the sub total, not the shipping. I have been digging through the code, but do not see where to change this.

 

I have a client all over my back, so any assistance would be appreciated!

Link to comment
Share on other sites

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

 

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

Anuruddha

Link to comment
Share on other sites

  • 1 month later...

Hello!

 

I would like to use this contribution, but I am not using a clean install. I have a couple of other mods installed. Is there another instruction file available that will explain what lines I need to change/add? If it's somewhere obvious, sorry. I looked and didn't see anything.

 

 

Thanks in advance!!!

Link to comment
Share on other sites

  • 3 months later...

Hi Guys,

 

Thanks for making such a good contribution, but I'm having some trouble. I'm running osCommerce 2.2-MS2 (very modified) and CCGV5.16.

 

What's happening is that when an order is less (or equal) to the gift voucher value it is asking for a payment method (on orders that have free shipping). The fixes posted for this problem for previous versions don't fix or break the store.

 

Can anyone please let me know some possible causes for this?

 

Thanks,

 

Dave

Link to comment
Share on other sites

The latest intructions are missing:

 

add the following to catalog/includes/languages/<language type>/checkout_payment.php

 

define('HEADING_PRODUCTS', 'Products');

define('TEXT_EDIT', 'Edit');

 

Also, to watch out for, the short php open tag "<?" instead of "<?php" will break oscommerce on some servers that have "short_open_tag = Off" set in php.ini

Link to comment
Share on other sites

  • 3 months later...

Greetings,

 

Search didn't get me an answer so I'd like to see if anyone can give me a solution for this.

 

Email notification, in part:

 

"To redeem this Gift Voucher, please click on the link below. Please print this page or write down the redemption code for your records.

 

"To redeem this Gift Voucher please click http://www.xxxxxxxx.org/gv_redeem.php?gv_no=a0decd3b71"

 

But there is no code to write down.

 

am I missing something in this define:

 

from - includes/languages/english/gv_send.php

 

define('EMAIL_GV_ENTER', ' and enter the code ');

 

or somewhere else?

 

Thanks for any help

 

Ron

Link to comment
Share on other sites

  • 2 weeks later...

Greetings,

 

This is my first ever experience usig OS and i have oSMS2.

 

I have few question regarding Gift Voucher Certificate:

1. How to purchase Gift Voucher? I have tried lots of thigs bu couldn't find how customer can purchase Gift Voucher?

 

Please help.

 

Earliest reply would be appreciated.

 

 

Thanks in advance. :)

Link to comment
Share on other sites

i created a category "Gift Vouchers" and then created the product with a value. customer buys it like any other item. may be other ways of doing it, i don't know - this works for me though

 

my category listing:

 

http://www.integralyogaprograms.org/index.php?cPath=1

 

 

If I go this way.. How can I redeem the coupon? Please explain your procedure of doing it. more details..Plz

Link to comment
Share on other sites

  • 1 month later...

A customer tried to make a purchase for the same amount as the voucher balance and was asked for more payment.

 

amount of purchase $101.85

voucher balance $101.85

 

When paypal was selected to make up the payment difference, the balance owed was $1.42.

 

Is there a fix for this so that when the voucher balance and purchase amount are exactly the same it will work properly?

Link to comment
Share on other sites

A customer tried to make a purchase for the same amount as the voucher balance and was asked for more payment.

 

amount of purchase $101.85

voucher balance $101.85

 

When paypal was selected to make up the payment difference, the balance owed was $1.42.

 

Is there a fix for this so that when the voucher balance and purchase amount are exactly the same it will work properly?

Link to comment
Share on other sites

  • 3 weeks later...
If I go this way.. How can I redeem the coupon? Please explain your procedure of doing it. more details..Plz

 

Were you able to get an answer on this?

 

I am looking for the same instructions.

 

Thanks

_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

Can anyone help me to explain why I have two shopping carts appearing...?

I have installed this gift coupon contribution, its excellent, except, it has added 2X shopping carts to my website.

 

Can anyone explain?

 

Below is my code...

 

<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

// new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));
// ############ Added CCGV Contribution ##########
// CREDIT CLASS script moved by Rigadin in v5.13 for compatibility with STS
 $cart_contents_string ="
<script language=\"javascript\">
function couponpopupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>";

//  $cart_contents_string = '';
// ############ End Added CCGV Contribution ##########

// $cart_contents_string = '';
 if ($cart->count_contents() > 0) {
// ############ Added CCGV Contribution ##########
$cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
$cart_contents_string .= '<table border="0" width="100%" cellspacing="0" cellpadding="0">'; // Modified in v5.13 by Rigadin for STS compatibility
// ############ End Added CCGV Contribution ##########  
//$cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  $cart_contents_string .= '<tr><td>Shopping Cart   ';

  if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
	$cart_contents_string .= '<span class="newItemInCart">';
  } else {
	$cart_contents_string .= '<span class="infoBoxContents">';
  }

  $cart_contents_string .= '<span class="green">' . $products[$i]['quantity'] . ' x items</span></span></td><td> |   <a href="shopping_cart.php?'.tep_session_name().'='.tep_session_id().'">Checkout »</a></td>';

  if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
	$cart_contents_string .= '<span class="newItemInCart">';
  } else {
	$cart_contents_string .= '<span class="infoBoxContents">';
  }

  $cart_contents_string .= '</span></a></td></tr>';

  if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
	tep_session_unregister('new_products_id_in_cart');
  }
}
$cart_contents_string .= '</table>';
 } else {
$cart_contents_string .= 'Shopping Cart   |   <span class="green">' . BOX_SHOPPING_CART_EMPTY . '</span>';
 }

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $cart_contents_string);

// if ($cart->count_contents() > 0) {
  // $info_box_contents[] = array('text' => tep_draw_separator());
  // $info_box_contents[] = array('align' => 'right',
						   // 'text' => $currencies->format($cart->show_total()));
// }
// ############ Added CCGV Contribution ##########
 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 ) {
  $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
  $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>');
  $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext"><a href="'. tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></td></tr></table>');
}
 }
 if (tep_session_is_registered('gv_id')) {
$gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
$coupon = tep_db_fetch_array($gv_query);
$info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
$info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>');

 }
 /*if (tep_session_is_registered('cc_id') && $cc_id) {
$info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
$info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . CART_COUPON . '</td><td class="smalltext" align="right" valign="bottom">' . '<a href="java script:couponpopupWindow(\'' . tep_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>');

 }*/
 /* Serialio.com Edit Begin */
if (tep_session_is_registered('cc_id') && $cc_id) {
$coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'");
$coupon = tep_db_fetch_array($coupon_query);
$coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_id . "' and language_id = '" . $languages_id . "'");
$coupon_desc = tep_db_fetch_array($coupon_desc_query);
$text_coupon_help = sprintf("%s",$coupon_desc['coupon_name']);
  $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
  $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="infoBoxContents">' . CART_COUPON . $text_coupon_help . '<br>' . '</td></tr></table>');
  }  
  /* Serialio.com Edit End */

// ############ End Added CCGV Contribution ##########
 new infoBox($info_box_contents);
?>

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