Jump to content
Vger

[CONTRIBUTION] CCGV (trad)

Recommended Posts

Quick Help?

 

I'm a web designer - and I set up OSCommerce v2.2 RC2 for a client, we're using PayPal Payments Standard. I'm not that knowledgeable with PHP, so to install CCGV(trad) into the existing store, we hired a programmer.

 

Things seem to be working okay, we can create codes that seem to be working okay, we can send vouchers from the admin area, and we can create products with GIFT at the beginning of the model number.

 

I just tried to buy a certificate from the store, and it doesn't appear that the voucher is being created, as the voucher queue is empty.

 

Can you point me in the right direction? Please?

Share this post


Link to post
Share on other sites

Hello,

 

I just installed the latest version of CCGV(trad) (November 16th 2008) and face two problems right now (using osC 2.2 RC2a):

 

In checkout_confirmation.php I don't get the order totals displayed. I think this must have something to do with the repositioned lines but I can't find the problem.

 

When I try to submit the order - ignoring that there are no order totals displayed and no matter whether I want to redeem a voucher or not - I get thrown back to checkout_payment.php with the message that I didn't choose a payment method. That is because in these lines

 

// Line edited for CCGV
 if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
 }

 

the two conditions (!is_object($$payment)) && (!$credit_covers) are always opposite to each other, even though I think the code is logically correct I don't understand why the two conditions have the values they have.

 

If someone needs more information to help me solve my problem, then please tell me what you need to know.

 

Thanks in advance.

Kalle

 

EDIT: Fixed some typos.

Edited by VeganKalle

Share this post


Link to post
Share on other sites

Something more regarding the non-display of the order totals.

If I activate order_total_modules->process(); in the codeblock below then I get totals displayed. But is this correct?

 

if (MODULE_ORDER_TOTAL_INSTALLED) {
   //$order_total_modules->process();
   echo $order_total_modules->output();

 }

 

Kalle

Share this post


Link to post
Share on other sites

FYI if anyone encounters this error (present in .19 and .20 version)

"supplied argument is not a valid MySQL result resource in ....../includes/functions/database.php on line 107"

 

in admin/coupon_admin.php

 

move (about line 229):

$cc_query = tep_db_query($cc_query_raw);

 

To BELOW (around line 227)

$cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";

 

 

Please do not PM me about this. This is an as is fix I came up with and I am not providing support for it. However I hope this little fix helps someone! ;)

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Hi Everyone,

 

I have been looking throughout this thread for anyone who has recieved a parse error from the payment.php file but i don't see it up here. So, here's the parse error i am recieving...

 

Parse error: parse error, unexpected T_STRING in /home/content/b/r/a/brangerm/html/store/includes/classes/payment.php on line 91

 

this is from lines 82-96...

 

// Start - CREDIT CLASS Gift Voucher Contribution

// function javascript_validation() {

function javascript_validation($coversAll) {

//added the $coversAll to be able to pass whether or not the voucher will cover the whole

//price or not. If it does, then let checkout proceed when just it is passed.

$js = '';

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

if ($coversAll) {

$addThis='if (document.checkout_payment.cot_gv.checked) {

payment_value='cot_gv';

} else ';

} else {

$addThis='';

}

// End - CREDIT CLASS Gift Voucher Contribution

 

and the 91st line is the payment_value='cot_gv';

 

 

I installed this by adding the files to the cart before the install and then running the OSC install which then installs the contrib. I am pretty sure i took care of everything when i was installing cuz everything was hunky doory before but after adjusting some styles, i now have this error.

 

Does anyone know what i did to cause this and if there is a quick fix out there? Thanks in advance!!!

Share this post


Link to post
Share on other sites

SOOOOOOOoooooooooooo....... i commented out the thing, and uncommented the original ish... and it works but i am wondering how important this bit of code was and what the overall effetc will be when i start using this cart in the real world. Thanks for the hizelp yizo.

Share this post


Link to post
Share on other sites

I am having this same exact problem. I will try the commenting out as well but would like to know of a more solid solution. Anyone have suggestions? This error was received using the contributions' original files.

 

 

Hi Everyone,

 

I have been looking throughout this thread for anyone who has recieved a parse error from the payment.php file but i don't see it up here. So, here's the parse error i am recieving...

 

Parse error: parse error, unexpected T_STRING in /home/content/b/r/a/brangerm/html/store/includes/classes/payment.php on line 91

 

this is from lines 82-96...

 

// Start - CREDIT CLASS Gift Voucher Contribution

// function javascript_validation() {

function javascript_validation($coversAll) {

//added the $coversAll to be able to pass whether or not the voucher will cover the whole

//price or not. If it does, then let checkout proceed when just it is passed.

$js = '';

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

if ($coversAll) {

$addThis='if (document.checkout_payment.cot_gv.checked) {

payment_value='cot_gv';

} else ';

} else {

$addThis='';

}

// End - CREDIT CLASS Gift Voucher Contribution

 

and the 91st line is the payment_value='cot_gv';

 

 

I installed this by adding the files to the cart before the install and then running the OSC install which then installs the contrib. I am pretty sure i took care of everything when i was installing cuz everything was hunky doory before but after adjusting some styles, i now have this error.

 

Does anyone know what i did to cause this and if there is a quick fix out there? Thanks in advance!!!


What would you do if you knew you could not fail?

Share this post


Link to post
Share on other sites

Other than having to start over editing shopping_cart.php FOUR times to get it right with all my other mods, this was actually one of the easier installs I've ever done. Great instructions.

 

Since gift vouchers are technically a company liability and are technically not subject to expiration (for the ones purchased by customers, not the ones sent for free from the company), I would like to see another sub head in the admin section to list the gift vouchers that are out ~~there~~ - waiting.

something like

- - name or email of customer who owns the voucher (might not be the buyer if it was sent to someone)

- - amount (or balance, I think original amount is not of any interest for this list)

- - date purchased or sent to someone (so we know how old one is, and could follow up)

 

The Gift Vouchers Sent sub head isn't quite right as it doesn't include voucher amounts still owned by the original purchaser and it doesn't track the unused balance of any outstanding vouchers.

 

As usual I'm willing to take a stab at it if someone would list out the files and tables that are involved, provided this wheel isn't already turning somewhere and I missed the train.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites

I have another problem, on the checkout_payment, the tables span way too far off to the right and a little to the left. I have searched everything in this file and i cannot find anything that is sending it into this error.

 

http://www.archmolds.com/store/checkout_payment.php to see the anomaly. If you look at any of the other pages in the checkout process, the tables are all held in check, its just this page that is causing the issue. i am pretty certain it has to do with the CCGV contrib. Like it's calling in a php file that i super long. The thing is, i can tame the inner tables, its just the outer container table that is expanding. If anyone could help, that would be great.

Share this post


Link to post
Share on other sites

Hello Everyone,

 

Ive got CCGV (trad) installed into my localhost oscommerce-shop (2.2-MS2).

 

After I bought a gift-voucher, I am now trying to use my gift-voucher balance to purchase an item.

 

But when I confirm my purchase in checkout_confirmation, it returns me to the checkout_payment page with a big red sign in the top of the screen wich says "please select a payment method for your order".

 

I a'm struggeling with this problem for quit some time now and really need to get this solved a.s.a.p.

 

Tnx in advance for your support.

 

Erik.

Share this post


Link to post
Share on other sites
I am launching a reworking of CCGV (Credit Class & Gift Vouchers) today, which harks back to an older version with various bug fixes and security patches applied. It also includes additional features:

 

1. The ability to Delete gift vouchers in the Gift Voucher Queue from within osCommerce admin - for when customers don't follow up with payment.

2. Queue Gift Vouchers is no longer optional - all vouchers are queued.

3. The ability for customers to view their Gift Voucher Balance within their Account page and to send Gift Vouchers from that page.

 

Please don't posts support requests for other versions of CCGV to this thread - they won't be answered!

 

The contribution is available here:

 

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

 

Rhea (Vger)

 

 

Hi Rhea

I am so a NEWBIE.

 

I have been told by a couple of members that you might be able to help me in my plight.

 

Perhaps if you can take a look at my site, www.ktllogistics.co.uk you will see what I have done so far..which is pretty much done through the admin tool on my pc. When it comes to doing all the other stuff I hit a brick wall because I cant get to the locations on my server that start with /catalog/etcetera.

 

This morning I was told to download filezilla, which I have done and installed it BUT I still cant see/find the folders that I need to work with for my site.

 

I have read the forum posts but have been unable to find the exact assistance that I need. Can you point me in the redirection?

 

I would be happy to give you my cpanel username and password if that would help?

 

I did try to message you but that didnt work..sorry

Share this post


Link to post
Share on other sites

does anyone know how to alter the gift voucher emails and all emails sent threw CCCV (Trad) can Images be included?

I searched threw 50 of the 108 threads and gave up looking ..

thank You

Share this post


Link to post
Share on other sites

Has anybody had this problem before?

 

I have a problem with a coupon discount of 10% with a coupon code. The discount applies to the order and subtracts it from the amount ok and it looks good on the invoice, but the charges that are showing up at Authorize.net (using the AIM module) are for the full amount. No discount shows up.

 

Does anybody know how to fix this?

 

Thanks.

 

-mrb

Share this post


Link to post
Share on other sites

Anybody?

 

Has anybody had this problem before?

 

I have a problem with a coupon discount of 10% with a coupon code. The discount applies to the order and subtracts it from the amount ok and it looks good on the invoice, but the charges that are showing up at Authorize.net (using the AIM module) are for the full amount. No discount shows up.

 

Does anybody know how to fix this?

 

Thanks.

 

-mrb

Share this post


Link to post
Share on other sites

Hi Rhea,

 

I am removing the CCGV contrib, I am using a different means for providing disounts, and I get the following error:

 

Warning: order_total::include(includes/modules/order_total/ot_coupon.php) [order-total.include]: failed to open stream: No such file or directory in /public_html/osc/includes/classes/order_total.php on line 26

 

Warning: order_total::include() [function.include]: Failed opening 'includes/modules/order_total/ot_coupon.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/public_html/osc/pear/') in /public_html/osc/includes/classes/order_total.php on line 26

 

Fatal error: Class 'ot_coupon' not found in /public_html/osc/includes/classes/order_total.php on line 29

 

I removed all the files, SQL tables and modified all the necessary install files back to their original format. Please tell me why it's still trying to access these files?

 

I get this error on the checkout_confirmation.php page. Everything else appears to work properly.

 

Please tell me which file is trying to access this info.

 

Many thanks,

Tom

Edited by stickypod

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites
Hi Rhea,

 

I am removing the CCGV contrib, I am using a different means for providing disounts, and I get the following error:

 

Warning: order_total::include(includes/modules/order_total/ot_coupon.php) [order-total.include]: failed to open stream: No such file or directory in /public_html/osc/includes/classes/order_total.php on line 26

 

Warning: order_total::include() [function.include]: Failed opening 'includes/modules/order_total/ot_coupon.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/public_html/osc/pear/') in /public_html/osc/includes/classes/order_total.php on line 26

 

Fatal error: Class 'ot_coupon' not found in /public_html/osc/includes/classes/order_total.php on line 29

 

I removed all the files, SQL tables and modified all the necessary install files back to their original format. Please tell me why it's still trying to access these files?

 

I get this error on the checkout_confirmation.php page. Everything else appears to work properly.

 

Please tell me which file is trying to access this info.

 

Many thanks,

Tom

Finally! I figured it out. Some coding related to CCGV was not commented in the instructions and I finally found it. Be sure to look for "credit_covers" if you too are removing this contrib.


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites

Thanks. I might be removing mine soon, too. Since it doesn't work anyway and there's ZERO support for it.

 

What are you going to use for discounts?

Edited by mrbones

Share this post


Link to post
Share on other sites
Has anybody had this problem before?

 

I have a problem with a coupon discount of 10% with a coupon code. The discount applies to the order and subtracts it from the amount ok and it looks good on the invoice, but the charges that are showing up at Authorize.net (using the AIM module) are for the full amount. No discount shows up.

 

Does anybody know how to fix this?

 

Thanks.

 

-mrb

 

Did you ever find a fix for this? If you did fix your problem it is a good idea to post your findings here so others can hopefully take note.

 

If you are still looking for a fix you need post back with details of which Authorizenet contribution you are using (AIM or standard) and what modifications you have made to the store in general.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

We are having this problem too....anybody got a fix? using the authorize.net AIM mod....

thanks

bopp

 

Did you ever find a fix for this? If you did fix your problem it is a good idea to post your findings here so others can hopefully take note.

 

If you are still looking for a fix you need post back with details of which Authorizenet contribution you are using (AIM or standard) and what modifications you have made to the store in general.

Edited by bopper

Share this post


Link to post
Share on other sites

Hi Jason

Did you ever figure out why this is happening? We are having the same problem....using the authorize.net AIM mod

thanks

bopp

 

I just moved the OT modules around so that on the checkout_confirmation page the total shows including the coupon discount. However, It�s still transmitting at the pre coupon total. I�ve tried to look through the manual and install again but I didn�t find and missed steps. :sweating:

Share this post


Link to post
Share on other sites

vger's fix worked....authorize.net now gets the order amount the coupon discount correctly...we don't use paypal ipn so no problem there (use paypal.php,v 1.1.1.1 2004/09/22 which seems to work okay after the fix...also COD works)...CCGV trad is a good mod....

 

I'm trying this fix from vger...will report back to see if it works....

http://forums.oscommerce.com/index.php?sho...p;#entry1014609

Share this post


Link to post
Share on other sites

Hello Vger, et al,

 

I am hoping someone can help me with CCGV (trad). I have uncovered a few bugs in the admin. I have not found anything about these from searching the forums, so I'm not sure if it's just me or what the deal is. My server is Apache running MySQL 5 and PHP 5. CCGV (trad) is version 5.21, dtd 21 May 2007.

 

 

Here goes:

 

These errors all occur in coupon_admin.php

 

 

Problem 1: When creating a new coupon, the name and description are saved (as they should be). However, when editing the same coupon, the admin tool fails to retrieve the coupon name and description ID. The name also does not appear in the top level admin view. I have verified that these data points are saved in SQL. They are not being retrieved properly during viewing or editing the coupon (EDIT function).

 

Problem 2: Edit a saved coupon description or name and it does not save the changes. Similar to problem number 1, except changes in coupon name or description are not written to the SQL database (I verified by examining SQL db in PHP MyAdmin).

 

Problem 3: Creating new coupon allows past dates and allows expiry date to be before the start date.

 

Problem 4: Using Preview and Edit functions can cause CCGV to incorrectly report dup coupon name. To replicate do this:

 

1. Edit a coupon [url /coupon_admin.php?action=voucheredit&cid=1

2. Click Preview button [url /coupon_admin.php?action=update&oldaction=voucheredit&cid=1

3. Click Back button [url /coupon_admin.php?action=update_confirm&oldaction=voucheredit&cid=1

4. Click Preview button [url /coupon_admin.php?action=update&oldaction=new&cid=1

 

Result: See duplicate coupon error code

 

Any help is much appreciated! Thank you. :)

 

Regards,

David

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×