Community Add-Ons
Credit Class & Gift Voucher
for osCommerce Online Merchant v2.2
The base credit class and the Gift Voucher module in one package.
Just found a bug when you are restricting coupons to certain categories using a percentage. The bug causes the redemtion to deduct the coupon amount from the shipping costs.
To fix, open up /includes/modules/order_total/ot_coupon.php
locate line 230
and change
$pr_c = $this->product_price(tep_get_prid($order->products[$i]['id']));
to:
$pr_c = $this->product_price($order->products[$i]['id']);
and thats it
there are two definitions for ERROR_REDEEMED_AMOUNT_ZERO that comes up when a valid coupon number is added, but the restrictions(i.e. uses, expiration date, etc.) prevent it from being used.
the two are defined in:
catalog/includes/languages/english/add_ccgvdc_english.php
catalog/includes/languages/english/modules/order_total/ot_coupon.php
And called for in catalog/includes/modules/order_total/ot_coupon.php
---------------------------------------------------------------------------------------------------------------------------
1. *** catalog/includes/languages/english/add_ccgvdc_english.php ***
REMOVE OR COMMENT:
define('ERROR_REDEEMED_AMOUNT_ZERO', '<br>***HOWEVER:No reduction available, please see the coupon restrictions***');
2. *** catalog/includes/languages/english/modules/order_total/ot_coupon.php ***
CHANGE:
define('ERROR_REDEEMED_AMOUNT_ZERO', 'a valid coupon number. HOWEVER: No reduction will be applied, please see the coupon restrictions that was sent within your offer email**');
TO:
define('ERROR_REDEEMED_AMOUNT_ZERO', '*** This is a valid coupon code. HOWEVER: No price reduction can be applied, please see the coupon restrictions that were sent with your email offer. **');
3. *** in catalog/includes/modules/order_total/ot_coupon.php ***
CHANGE:
if ( strlen($cc_id)>0 && $coupon_amount==0 ) {
$err_msg = ERROR_REDEEMED_AMOUNT.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'));
TO:
//lildog ccgv coupon restrictions error fix
if ( strlen($cc_id)>0 && $coupon_amount==0 ) {
// $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'));
This fix adds a new text so at checkout_payment.php when a GV is redeemed/applied to an order with the redeem box, it says "The gift voucher has been successfully added to your gift certificate account for "... instead of "The coupon has been successfully applied for "... It also clarifies a little bit what to do after a voucher has been applied to their account. See enclosed Screenshot.
in catalog/includes languages/YOUR LANGUAGE(s) HERE/add ccgvdc_english.php:**REPEAT WITH ALL LANGUAGES YOU USE***
FIND:
define('ERROR_REDEEMED_AMOUNT', 'The coupon has been successfully applied for ');
ADD AFTER:
define('ERROR_REDEEMED_AMOUNT_GV', 'The gift voucher has been successfully added to your gift certificate account for ');
define('ERROR_REDEEMED_AMOUNT_GV_2', 'You may now use this as payment below by checking the 'used from Gift Vouchers box'.');
in catalog/includes/modules/order_total/ot_gv.php
FIND:
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_REDEEMED_AMOUNT. $currencies->format($gv_amount)), 'SSL'));
CHANGE TO:
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_REDEEMED_AMOUNT_GV. $currencies->format($gv_amount).'. '.ERROR_REDEEMED_AMOUNT_GV_2), 'SSL'));
Small fix to an issue when credit balance covers all and you have shipping included, but you still get an error where the system wants you to choose payment method even if it's not supposed to.
First change following in checkout_confirmation.php and checkout_process.php:
if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS
to:
if ($credit_covers) $payment='credit_covers'; //ICW added for CREDIT CLASS
And to includes/classes/payment.php:
if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) {
to:
if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED) && !$module == 'credit_covers') {
That's it! Now if credit covers whole order, it won't try to load any payment module. Didn't want to use $payment as an empty string to keep better track of changes.
Included a text file with this information.
there is a erro in
CCGV5.19
in
catalogincludesclassespayment.php line 89
if ($coversAll) {
$addThis='if (document.checkout_payment.cot_gv.checked) {
payment_value=cot_gv; alert ('hey yo');
} else ';
} else {
$addThis='';
}
it will case not get payment value
change to
if ($coversAll) {
$addThis='if (document.checkout_payment.cot_gv.checked) {
payment_value='cot_gv';
} else ';
} else {
$addThis='';
}
in admin/gv_mail.php
$insert_id = tep_db_insert_id($insert_query);
in create_account.php
$insert_id = tep_db_insert_id($insert_query);
this may cause can not get ID for insert in to next table
and the admin/gv_sent.php can not get anything
change to
$insert_id = tep_db_insert_id();
all is ok
no file include
around on gv_mail.php 84
$insert_id = tep_db_insert_id($insert_query);
this can not get $insert id and have the next db operation may be erro
around on create_accout.php
251
$insert_id = tep_db_insert_id($insert_query);
the same erro
change to
$insert_id = tep_db_insert_id();
all good
full files with bug fix on ccgv5.19
There is a bug in the coupon report in the coupon admin section. This is where you can select a coupon and then click "Report". The bug is that the admin section says there have been X redemption and then you click into report and it says there are Y redemptions.
To fix, edit /admin/coupon_admin.php
around line 226 where:
$cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
$cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
$cc_query = tep_db_query($cc_query_raw);
change to:
$cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
$cc_query = tep_db_query($cc_query_raw);
$cc_query_numrows = tep_db_num_rows($cc_query);
$cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
the splitPageResults function wasen't receiving anything for $cc_query_numrows.
The TYPE keyword in MySQL has been deprecated. This file replaces all instances of the TYPE keyword with the proper ENGINE keyword. Enjoy. This file is from the 5.19 CCGV package.
This contains no files, this is just a note to say that i have added some install notes to the version 5.19 in english, if anybody wants to take the reigns on this and start to translate/improve my install notes then feel free, :)
English install notes included. hope these are helpful. this should help install this on a heavily modded site, while at the same time giving you a small lesson in where to look to change link texts etc.. :)
The CCGV5.18 now with danish language
A few fixeds for ccgv that include ability to add dollar signs before the amount when sending GVs in catalog and admin. Button alignments table cleanups and colored bar at the bottom og the send gv page.
I posted these fixes and no one responded, they worked for me. apparently no one cares that an amount of 0.00 is returned when a customer sends a gv to someone and enters the amount as $10.00 and not 10.00......
full version + patches
This is just a roll up of 5.18 plus all of the patches since 7 Nov 2006. Downloaded, but didn't apply checkout_payment.php FIX from xXDesertRoseXx on 24 Dec 2006 (files are in this zip if needed).
Hope this saves you some time.
We still need someone to write up some manual instructions. Included are instructions for 5.16.
This fixes an issue introduced by CCGV 5.18.
If you redeem a gift voucher that could cover an order, but you do not use the voucher to pay, then it skips your payment module's pre_confirmation_check(). However, it still uses your payment module, which might error out because of the earlier skipped step.
The fix is to check whether you are using the voucher to pay. If not, then do not set $credit_covers = true.
As ridiculous as it may seam, this is simply a replacement for the CCGV Release Button.
It amazingly replaces the release button that says "Redeem" with one that says "Release" in the "Gift Voucher Release Queue" page of the Admin.
The previous Redeem Button may lead to some confusion when you really need to Release the Gift Voucher.
To apply this fix simply copy the included "button_release.gif" over the one installed at:
OsC_catalog/admin/includes/languages/english/images/buttons/
If you are getting this error.
unexpected $end in C:xxxxxxxxcatalogcheckout_payment.php on line 577
try changing lines 190 - 193
}<? } else { $coversAll=false;?>
function clearRadeos(){
document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;
}<? } ?>
to this
}<?php } else { $coversAll=false;?>
function clearRadeos(){
document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;
}<?php } ?>
I just added the 'php' just after the opening tag and it fixed up the error message I was getting.
CCGV 5.18 Checkout 'ot_coupon.php' Display Fix
This fixes a problem where in checkout (www.yoursite.com/catalog/checkout_payment.php)
the 'Payment Method - Gift Vouchers & Coupons' box formating displays the "Enter Code..."
instructions appear below the "Redeem Code" line and where the "Enter Redeem Code" is in
the wrong font formating.
This file included the replacement 'ot_coupon.php' and the instructions found below.
Edit the file:
catalog/includes/modules/order_total/ot_coupon.php
At line 60 find:
function credit_selection() {
global $customer_id, $currencies, $language;
$selection_string = tep_draw_form('checkout_payment_gift', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post');
$selection_string .= '<div><br />';
$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code', 'redeem code') ;
$selection_string .= tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'onclick="return submitFunction()"');
$selection_string .= '</div><br /></form>';
return $selection_string;
}
Replace this with:
function credit_selection() {
global $customer_id, $currencies, $language;
// START Checkout Display Fix by BTBlomberg
$selection_string = '<tr><td></td><td class="main">';
$selection_string .= tep_draw_form('checkout_payment_gift', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post');
$selection_string .= '<div><br /> ';
$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()"');
$selection_string .= '</div><br /></form></td></tr>';
// END Checkout Display Fix by BTBlomberg
return $selection_string;
}
This will put the instructions above the Redeem Code line and fix the Font issue with
the text before the entry box "Enter Redeem Code". More may be able to be done to clean
it more but this will get it working better than it was.
By BTBlomberg 12/10/2006
The GV total order is wrong !
In version 5.17, 5.18 at least in line 57 to 60
$order->info['total'] = $order->info['total'] - $od_amount;
$order->info['total'] = tep_round($order->info['total'],2);
$od_amount = tep_round($od_amount,2);
$order->info['total'] = $order->info['total'] - $od_amount;
GV amount ($amount) is calculated 2 times !
May be one more ?
So comment one of these lines
// $order->info['total'] = $order->info['total'] - $od_amount;
And you xill get a correct GV amount.
The link given in the last upadate by mauriziomagnino below is for CCGV(trad). It is based more on an earlier (bug free) version of CCGV.
However, if you download the following from this version you will have a fully functional CCGV with a few things that aren't covered in CCGV(trad) such as 'auto-release' of vouchers/queue (disabled in CCGV(trad) for security reasons) if you don't want to release them manually, the Treeview and the Coupon roll up1,2 3 which allows much easier/convenient control of coupons administration and also the handy coupons redeemed info pop-up for product_info.php
----------------------------------------------
Rigadin 22 Apr 2005-Full Contribution
Rigadin 18 May 2005-Fix
Gyakutsuki 24 May 2005-Fix
Jennifer Sullivan 26 May 2005-Fix
Taryn 29 May 2005-Fix
Beer Monster 8 Aug 2005-Treeview Add-on
molafish 22 Feb 2006-Good Add-on
The above list of downloads work fine as long you don't get carried away with contribution add-ons from people who have posted little adjustments and then not helped fixing them or putting them right.
----------------------------------------------
If you have this version of CCGV installed then this is STILL the thread for you:
http://forums.oscommerce.com/index.php?showtopic=158518
There is a blank file attached - nothing to download here.
support :
http://forums.oscommerce.com/index.php?showtopic=158518&st=4220
For use “Credit Class & Gift Voucher”
Install contrib, install with phpmyadmin the SQL file.
Go to ADMIN / configure.php page
Select DOWNLOAD OPTION
Set “Enable download“ to TRUE
Go to ADMIN / module.php option
Select “Order Total”
Install : “Gift Vouchers (-) ”
Install : “Discount Coupons ”
Go to ADMIN / module.php option
Select “Payment ”
Install “Credit Class Error”
For Use “Credit Class & Gift Voucher”
Go to ADMIN / Vouchers/Coupons option
Attention please, for create the Credit Class in catalog, use
ADMIN / Catalog / "Categories/Products"
full version + patch
cor correct payment to browser with javascript disabled
fix the file : CATALOG/checkout_confirmation.php
to lin 60
// ################# Added CGV Contribution ##################"
// CCGV Contribution
$order_total_modules = new order_total;
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
add :
// >>> FOR ERROR gv_redeem_code NULL
if (isset($_POST['gv_redeem_code']) && ($_POST['gv_redeem_code'] == null)) {tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));}
// <<< end for error
When you send a voucher to an email address from the shopping cart (and possibly from admin), its likely the recipient won't ever be able to redeem the vouchers.
When sending the voucher email, a SQL error may be displayed: (i was not seeing the error however until I put a break in gv_send.php)
[quote]Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/USERNAME/public_html/catalog/includes/functions/database.php on line 112[/quote]
The fix for this seems to be:
BACKUP NOW!
/catalog/gv_send.php
find -->
$insert_id = tep_db_insert_id($gv_query);
replace with-->
$insert_id = tep_db_insert_id();
the extra $gv_query inside the brackets was causing a 0 to be returned instead of the 'just created' coupon record id. This in turn stopped a user redeeming the voucher as the coupon_id link between the coupon and coupon_email_track tables were broken, coupons containing the real coupon_id and coupon_email_track containing 0 for coupon_id.
Hope that helps.
Also there is a bunch of rubbish in the more recent /catalog/gv_redeem.php files - it is a set of fixes (that dont seem to work even when applied correctly) that have been inadvertently pasted in and gone unnoticed by everyone, I cant say wether they actually cause any problems or not..
to remove the mistake, delete from:
/*
GV_REDEEM_EXPLOIT_FIX (GVREF)
down to and including the line:
define('TEXT_NEEDS_TO_LOGIN', 'We are sorry but we are unable to process etc etc............
BACKUP FIRST!
No file attached..
derived on free contrib for zen-cart, the image EURO for gift
version 5.16 + all patch
not included German tax.
+ Credit Stats
file TAR GZ2
full version !
THIS DOWNLOAD IS A BLANK FILE.
There has been some confusion on which package to download with the version 2 instructions. It is still CCGV5.16 by BlueNoteMKVI. Download the Version2 instructions dated 30th June 2006 and then download CCGV5.16 and you will have all that you need to install the excellent Credit Class & Gift Voucher contribution. Have fun.
Hi,
I don't know how you can NOT to add the full package... The last complete pack is dated "8 Feb 2006" and have 15 new updates, and no update have the complete pack...
It is not any effort to upload yours mods + full package, because it is in your PC... and If someone want to use this contrib withe the last updates, it will take hours in updating it...
Can somebody upload the complete package with all the updates? Thanks. Greetings.
Hello just thought I would post a bug fix for a small problem which occur if a customer decide to change is mind and NOT use is gift voucher balance after all.
Basically once the box is ticked, even if you go back to checkout_payment and leave the box unticked, the balance is still used.
Even if you log off and back in, its still registered with the session !
Anyway here is the line that need to be added to get rid of this bug:
In checkout_payment.php
After:
if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); //CCG
Add:
if(tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv'); //CCGV
And we might as well clean this up in logoff.php also
After
tep_session_unregister('gv_id');
Add
tep_session_unregister('cot_gv');
Note that this problem does not apply to Discount codes, only the gift vouchers.
Only dummy file attached, all instruction required are in here
The previous set of instructions have been, combed through, edited and finally re-released here. Hope they are helpful. They contain instructions on how to manually install this excellent contribution. And have far fewer errors than the previous version.
All kudos must go to the original author(bopper) who obviously spent days of effort in creating these instructions. Errors or no errors, it has been very helpful to me and i hope you find these updated instructions just as helpful.
DEATHGOD
broke out the manual installation into steps...
sql, new files, files to edit and the edits...
no promises but close to golden
Corrected version for admin/includes/languages/german/coupon_admin.php
No fullpackage
Englisch:
Sorry, I included the wrong File in the .zip Package...
Here the new Package with the right ot_coupon.php
You do not need to download the Version below, this is the complete Package!
German:
Sorry, ich hatte die falsche Datei ins .zip-Package gepackt...
Hier das neue Package mit der richtigen ot_coupon.php
Ihr braucht das andere Package nicht herunterzuladen, dies ist das komplette Package!
To install this you need only one File with the included one.
German Support Thread: http://forums.oscommerce.de/index.php?showtopic=40684
What this Fix does:
English:
The original Code just doesn't work for German Tax System, total and tax (VAT) arent re-calculated correctly.
So I decided to rewrite most of the Code to work for German Tax System (perhaps this also works for other countrys, you have to try it out)
I think the Code is now also much more clean and easier to understand (only needed lees than half the Lines of Code!).
Note that this Code is ONLY A FIX FOR THE COUPON-PART! The Gift-Vouche Part isn't fixed yet!
German:
Der original Code funktionierte nicht für das deutsche Steuersystem, Summe und MwSt.wurden falsch berechnet.
Also habe ich beschlossen den größten Teil des Codes neu zu schreiben damit er für das deutsche Steuersystem funktioniert (eventuell funktioniert der Cde auch für andere Länder, müsst ihr ausprobieren)
Ich denke der Code ist jetzt wesentlich sauberer und leichter zu verstehen (nichtmal mehr halb soviel Code!).
Beachtet das dieser Code NUR EIN FIX FÜR DEN COUPON-TEIL ist! Der Gutschein-Teil (Gift-Voucher) ist noch nicht gefixt!
v1.1 of my fixes instructions
This is for CCGV5.16, and is NOT the entire package, just a text file with revised instructions. (this instruction file replaces the original one)
NEW: add missing define in language file
NEW: align redeem button to input text field
0) add define for IMAGE_REDEEM_VOUCHER
1) fix the misalignment of the gift voucher/coupon code redeem table. including alignment of input field to redeem button image.
2) eliminate the checking of credit card info when the redeem button is pressed. i.e. redeem without entering credit card info, which is anyway erased after redeeming the coupon code.
3) move the gift voucher/coupon code table above the credit card table
4) fix round off errors in subtracting coupon value
5) checkout_confirmation.php does not pass coupon code to checkout_process.php
-avi
My first contribution... hope someone finds this useful.
This is for CCGV5.16, and is NOT the entire package, just a text file with instructions.
1) fix the misalignment of the gift voucher/coupon code redeem table.
2) eliminate the checking of credit card info when the redeem button is pressed. i.e. redeem without entering credit card info, which is anyway erased after redeeming the coupon code.
3) move the gift voucher/coupon code table above the credit card table
4) fix round off errors in subtracting coupon value
5) checkout_confirmation.php does not pass coupon code to checkout_process.php
-avi
This release only adds one new feature to the coupon admin page:
added to the coupon_admin page (without having to click on report):
- number of redemptions
- date of last redemption
- redeemed coupons view filter
This rollup is comprehensive, in that it includes all the changes from the coupon admin bug rollup packages 1 and 2 that I posted earlier.
I've included a screenshot for your viewing pleasure.
This is a "diff" of modified files from "oscommerce-2.2ms2 update 051113" and CCGV5.16.
I successfully used it in a very personalized OSC:
zcat CCGV5.16.patch.gz | patch -F 3 -p1
You Assure that the format of the files been involved is unix
error in v5.16 cause the email sent by this file to contain duplicate text.
Fix:
lines 81-83
$gv_email .= EMAIL_GV_LINK . ' ' . "<a HREF='" .
tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1,'NONSSL',false) . "'>" . tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1,'NONSSL',false) . "</a>n" .
$gv_email .= "nn";
Change to:
$gv_email .= EMAIL_GV_LINK . ' ' . "<a HREF='" .
tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1,'NONSSL',false) . "'>" . tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1,'NONSSL',false) . "</a>n" ;
$gv_email .= "nn";
replace '.' with ';' at end of line 82
Some file-errors:
"admin/filenames.php"
should be:
"admin/includes/filenames.php"
"admin/languages/"your_language.php"
should be:
admin/includes/languages/"your_language.php"
I've updated the Install-instructions for a better english . . .
sorry for that
I've made an addon for this contrib to view the credit stats of the customer.
Please tell me your opinions.
Aki
-Based on 5.15a2
-Incorporates all fixes to date, including:
--Coupon admin fix (thanks to molafish)
--Change English order total module back to English (thanks to HallMarc)
--Included the full PayPal IPN contribution to avoid errors about missing files (thanks to brucelim)
--Removed debug code (thanks to hillro)
--Coupon admin fix #2 (thanks to molafish). I moved the extra function into add_ccgvdc_application_top.php, this way you do not need to modify includes/functions/general.php.
--Updated rollup #2 to fix decimal places (thanks to insomniac2)
-In addition to packaging all of this up into one file, I fixed several things that were bugging me:
--Several places in the files were different from the original osCommerce files by only a few whitespace characters. I have updated the contribution files to match the osCommerce files. This will help you if you use a file comparison program to install this package.
--Integrated several security fixes from osCommerce 2.2 Milestone 2 Update 051113
--Removed extraneous defines.
---All of the database tables and files are defined in add_ccgvdc_application_top.php, so there is no need to update database_tables.php or filenames.php. Only one line needs to be changed in application_top.php.
---All of the necessary language defines are in add_ccgvdc_$language.php or separate files in the $language directory. Only one line should be added to $language.php.
This is a complete package. I have installed it on a new installation I'm working on for a client and so far have had no problems. I will update this package with fixes should I run into any.
Please direct all support requests to the forums.
Thanks to all who came before me to update this package!
I still had a problem with the numbers showing no decimal places ... so I simply adjusted the number_format fields fixed by molafish who by the way did a great job figuring that problem out.
No other changes have been made other than the number_format to show 2 decimals
Again .. thanx molafish.
This corrects several bugs in the coupon admin page within CCGV.
This rollup is comprehensive, in that it includes all the changes from the coupon admin bug rollup 1 that I posted earlier.
These are the bug fix highlights exclusive to rollup 2:
- fixed Date Created field from being reset to the modified date upon editing coupons.
- fixed coupon_admin from reporting coupon already exists after receiving an error when editing a coupon.
- cleaned up display of coupon amounts and coupon minimum order. Only display post decimal data if coupon amount has a decimal value (i.e. 10% instead of 10.00%).
- added Coupon Minimum Order to coupon_admin summary box.
- fixed formatting text entries in coupon_admin summary box.
- added the green and red radio buttons that categories.php uses for active/inactive status. This replaces the old coupon_admin.php method of 'deleting' coupons to mark inactive. Now you can delete coupons altogether through the admin page.
- fixed next page link from always resetting display back to 'Active Coupons' sort.
- fixed delete and confirm delete buttons from always resetting page display to 'Active Coupons' sort, page 1.
I've included a screenshot for your viewing pleasure.
There is what appears to be some bad debug code left over which does not do anything except cause errors. This patch removes the code from checkout_payment.php
<<Fix some Paypal Mod error (is work fine to me) Not a Full Package, u still need to dowload CCGV5.15a2 1st>>
refer to forums http://forums.oscommerce.com/index.php?showtopic=43364&pid=783972&st=440&#entry783972
Guys if u face below problem in admin:"Payment Modules" page
Warning: main(/home/yourdomain/domains/yourdomain.com/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/yourdomain/domains/yourdomain.com/public_html/catalog/admin/modules.php on line 128
Warning: main(/home/yourdomain/domains/yourdomain.com/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/yourdomain/domains/yourdomain.com/public_html/catalog/admin/modules.php on line 128
Warning: main(): Failed opening '/home/yourdomain/domains/yourdomain.com/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/yourdomain/domains/yourdomain.com/public_html/catalog/admin/modules.php on line 128
but i still face problems in checkout_process.php
in catalog: "Delivery Information" page
once i click on continue button, the link page is blank page.y?anyone got this idea to fix it?
Good Luck n thanks
A slight oversight here. This whole mod is set for English installation yet that one file installed in French. This is the English version just replace your file in cataloginludesmodulesorder_totalot_gv.php
This corrects several bugs in the admin interface of the Coupon Administration.
I thought I would release it before the big contribution because it's just one file replacement and adding 1 section to a language file.
Here's the highlights:
- Fixed coupon_admin from overwriting dates and customer uses fields to defaults when editing or displaying an error.
- Removed non-working length check of coupon_name field in coupon_admin, fixed other possibly non-working checks. (instead of fixing the check, I made the name optional. It was desirable for me to have the option to display just the coupon code to the customer).
- Fixed problem where free shipping coupons deduct an additional amount (if the amount was specified on the coupon_admin page) above the shipping cost. During coupon creation now, the amount will be zeroed out if free shipping is checked.
- Fixed missing or hard coded language text used on coupon_admin page for errors and buttons.
- Changed Coupon Name help text to reflect the unrequired nature of that field. (Your contrib probably still displays nothing if the name field is blank for a language - I have changed all instances of that to display the coupon code instead in my unpublished contrib. Until I put up the full contrib, just continue to enter the coupon name field to avoid this).
This is simply the previous part 1 and part 2 files that were in rar format put together into one zip file for people without the ability to unzip a rar file.
This file contains catalog files . All the install instructions as well as SQL fileare in part 2.
Also remove the .zip from the file name as this file is actualy a rar (would not upload as an rar)
Updates in clude the following:
Includes easy to install Easier to Understand Payment Addon v1.2 (and Joseph Primanti's (primadude) Fixes)
Now coupons work on first time entered!!
This file contains install instructions as well as SQL file. All the catalog files are in part 1.
Also remove the .zip from the file name as this file is actualy a rar (would not upload as an rar)
Updates in clude the following:
Includes easy to install Easier to Understand Payment Addon v1.2 (and Joseph Primanti's (primadude) Fixes)
Now coupons work on first time entered!!
Do not use the CCGV 5.15a file below as it has an error.
This file contains all the catalog files. Download part 2 for install instructions as well as SQL file.
Also remove the .zip from the file name as this file is actualy a rar (would not upload as an rar)
Updates in clude the following:
catalogincludeslanguagesenglishmodulesorder_totalot_coupon.php (thanks to bonhommie) "ERROR_REDEEMED_AMOUNT_ZERO" Fix
catalogincludesclassespayment.php (thanks to clustersolutions) "Cart Total Less Than Voucher Amount" Fix
Spanish image for credit class fix (thanks to jaleel)
Clickable link in sent gift voucher/coupons
catalogincludesmodulespaymentpaypal_ipn.php Voucher balance deduction fix
No more 1146 errors.
No more manual editing the files on simple install.
This is the install instructions for part 1 and also contains the SQL file.
This is an update to the 5.15 - basicly I fixed the dreaded 1146 error problem.....
Also includes bonhommie's Fix for 'ERROR_REDEEMED_AMOUNT_ZERO' error for COUPONS 5.15
If you find a error and you fix it - please take the time to upload the corrected file. No sence in everyone wasting a lot of time doing the same thing.
Change filenale from zip to rar
the original image for spanish is in english, my friend made it in spanish for me.
just replace the one come with 5.15 with this one
This is just an update for anyone who installs the contrib and plans to use the COUPON functionality. Some of the commands for the COUPON and the GIFT VOUCHER are in the same files.. some are not.
if you encounter the problem above where you get an error EVEN THOUGH the coupon is applied (and you will if you install version 5.15), you need to include the define line
[code]
define('ERROR_REDEEMED_AMOUNT_ZERO', 'a valid coupon number. HOWEVER: No reduction will be applied, please see the coupon restrictions that was sent within your offer email***');
[/code]
in the osc/includes/languages/english/modules/order_total/ot_coupon.php file and not in the
osc/includes/languages/add_ccgvdc_english.php file.
NOTE: that in the version 5.15, the define line is ALREADY INCLUDED in the osc/includes/languages/add_ccgvdc_english.php file and this error is still encountered (because this file works for the GV alone).
All you do is copy the above code and paste in the ot_coupon.php file and you're on your way! or use the attached file.
if you're using the GV alone, you don't need this step because the code is already in the file.
thank you guys for all your contributions.
maybe somebody who plans to put out an update on the 5.15 can include this oversight in the package.
Bukie
This should apply to 5.14, and 5.15 assuming the code I mention is identical which it should be since 5.15 is a repack.
Basically your commenting out one of the functions that JONYO within the "easier to understand update contribution" adds, it causes an error when
someone wants to purchase products from your site, has an active voucher, but chooses NOT to use it at the time of purchase because they are saving
it for something else in the future (assuming you have repeat customers). This error occurs whether the checkbox is selected or not selected when the total order
value is LESS than the Voucher balance which creates this problem. (If the total order is greater, then the problem is not apparent)
Even if you don't use the voucher and want to pay for an item via paypal or CC or MO, the bug would not pass the data to the proper payment module, yet an order is
still placed in the database for something that hasn't been paid for.
Also 5.15 is not a final fix because the installation routine is STILL in french. Use caution, I only found this out by mistake of looking and comparing against the original installation of 5.14.
Incorporates version 5.14 and fixes up-to-date. And also a fix to the files:
catalog:includes:modules:order_total:ot_coupon.php
catalog:includes:modules:order_total:ot_gv.php
to stop the payment input checking from being circumvented.
All credit to those below.
Cheers,
Emmett ( yesUdo )
This contains a text document with allsorts of SQL that can be used to clear down the CCGV system, delete a specific coupon/voucher and help find allsorts of useful info.
use these at your own risk and before you do
!!!!ALWAYS MAKE A BACKUP OF YOUR DATA!!!!
HTH
Si.
An amalgamation of many pieces of information which resulted in this file which makes the most excellent Authorize.Net AIM solution work with the most excellent CCGV v5.14 solution.
There were two authors that helped me get this solution together. They are Austin Renfroe and Kevin Bray.
Thank you!!
Here we go again. This should nail it this time. I had missed a very small but vital piece of code in the readme.html.
This has now been tested by others and works fully.
Ignore v1.1 and v1.0 listed in this contribution area, just use this one.
Aaron
There were some missing bits in the readme file from my previous contribution of the same title ( a couple of entries below)
This is a complete file. Ignore the one below.
Aaron
Includes a text file with instructions for fixing the MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR and buttons that are closer to oscommerce-style buttons.
How many times do you have to explain to customers how to use their gift vouchers?
Thankfully, not so much after I installed this beauty.
This is an addon to this contribution based on v5.14
It is designed to make the payment screen when using gift vouchers easier for the customer to understand and use.
Support thread has been started here for this addon
http://forums.oscommerce.com/index.php?showtopic=180746
There is a easy to read readme.html with a sample picture of what you get after the install.
Aaron
This is a correction to the redeem message at checkout_payment.php which informs the customer when a voucher has been applied. It now also shows a warning if the voucher does not meet the criteria.
eg
order £5 minimum order value £20
message will show:-
The coupon has been successfully applied for
***HOWEVER:No reducion available, please see the coupon restrictions***
order £5 minimum order value £0 5% discount
message will show :-
The coupon has been successfully applied for £0.25
HTH
Si.
If you are trying to install CCGV as I was, you are probably trying to decide which of these contributions you should start with. Based on advise from the support forum, I went back to Rigadin’s Full Package 5.13 22Apr2005 as my starting point.
This is NOT a contribution and will not get a working install of CCGV, but contains notes that explain which files changed in most of the contributions since v5.13 and whether to use them or not.
As I mention in the notes, to get an actual working version on my store, I had to hack and hardcode a number of things that are only applicable to my store and my implementation of CCGV. I will try and post some notes on the changes that I made after the listed contributions, but wanted to make these notes available first.
Adds a box on the account.php page which shows the Gift Voucher Balance and an FAQ link
Rearranges the 'credits available' box in checkout_payment.php, which before I thought was un user-friendly and just confusing. There are two screenshots included so you can check you like it before you install!
Unfortionatly the patch will only work on a fresh, unaltered install of osCommerce 2.2 ms2. It has to do with the patch checking binary differences to determine the version of the files themselves. The binary differences are incorrect for the files that you have changed so the patch thinks its the wrong version. I am researching a workaround for this. Sorry, I tried.
Few minor bug fixes.
Sorry, this is a duplicate upload. I displayed the wrong version in the first one.
I do not take credit for creating this contribution. I just extremely simplified its installation.
I haven't had time to completely test this so "YOU" will be the tester. I strongly suggest you backup your database and the entire /catalog/ directory before the installation. If I get positive feedback about this new install process, then I might start doing it for other contributions.
This was made to work with osCommerce 2.2 ms2 and should work with any modifications that you might have made to your store as long as the file names and directory structure is unchanged. Added files will not effect the installation. You will get errors if you are missing english.php, german.php
