Jump to content
Vger

[CONTRIBUTION] CCGV (trad)

Recommended Posts

UPDATE

 

In osCommerce the type 'virtual_product' is deemed to have weight if it has attributes - so a Gift Voucher with attributes is charged shipping. This fix corrects that. For those with previous installs of CCGV(trad) make this change to checkout_shipping.php on line 52 of an otherwise unmodified file:

if ( (DOWNLOAD_ENABLED == 'true') && ($cart->weight == 0) ) { // Edited for CCGV

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites

52 line says

 

if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV

 

.. it is already modified .. what should it look like now? just replace this line?

Edited by gregy

Share this post


Link to post
Share on other sites

Yes, just replace that line with the new one.

 

The original just said:

if ($order->content_type == 'virtual') {

 

this was amended for CCGV to:

if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV

 

and now it's been edited again to get around the problem with the osCommerce 'virtual' class of products and product attributes.

 

Vger

Share this post


Link to post
Share on other sites

This works ... now to other questions :) (only one)

 

It kept offering amount of gift voucher in check out .. if checked or left unchecked .. it calculates .. what if customer would like to save this amount for later .. for other purchase?

Share this post


Link to post
Share on other sites

CCGV(trad) does not apply the Gift Voucher balance in the customers' account to a purchase if the tick box is left unticked - so it looks as if you have something else going on - possibly to do with the installation of CCGV(trad).

 

You don't have any files from other versions of CCGV installed do you?

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites

i'll check that out again. I don't have any previous versions .. i started this contribution as with latest version, before fix for shipping

 

This could be only in checkout_... files?

Share this post


Link to post
Share on other sites

sorry .. i guess it was "cache" thing :S

 

it works well ...

Share this post


Link to post
Share on other sites

I had big problem to install the old Credit Class & Gift Voucher from http://www.oscommerce.com/community/contributions,282 It?s full of bugs.

 

So I was glad when I found this one CCGV(trad) Looks like here is someone who tanks care of this contribution. So I am going to delete the old one a try this one. Hopefully I will make it this time.

 

Thanks for this contribution.

Share this post


Link to post
Share on other sites

Thank you for a great contribution, it worked straight away and did all it said it would!

 

I have a question:

 

With discount coupons, is there some way to specify a minimum *number of products* (2 or more in my case) to get the discount.

 

Or

 

Is there some way to change "Coupon Minimum Order" to cover the *number of products* instead of the dollar value.

 

Regards

 

Nick

Share this post


Link to post
Share on other sites

It should be possible to do, but it is something you would have to code for yourself. I can only provide support here for people having problems with the install of the basic CCGV(trad) and not on modifying it beyond its normal bounds.

 

Vger

Share this post


Link to post
Share on other sites
It should be possible to do, but it is something you would have to code for yourself.

 

No worries, thanks again on the contribution.

 

Cheers

 

Nick

Share this post


Link to post
Share on other sites
strange, never seen this error before: When I click send it generates this error (but fyi, the email is sent).

 

and can't figure out why the SQL error shows up in the email after the gift voucher code.

 

i will try to delve in to the code to find out why that happens but off the top of my head i can't figure it out - i may have some time tomorrow to look at the contribution code in depth and try to work it out... if anyone else has any suggestons please post them :-)

 

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

 

The fix for this seems to be:

 

/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 in gv_send.php. This in turn stopped a user redeeming the voucher as the coupon_id link between the coupon and coupon_email_track tables were subsequently broken.

Edited by xmanflash

Share this post


Link to post
Share on other sites

Hi Vger,

 

Thanks for making this version of CCGV. I installed it on my wife's site and everything seems to be working OK except for one thing. We use PayPal IPN. My wife setup a "free shipping" coupon code. If I buy something for $20 and the shipping is $5 (normally), the totals page on PayPal is weird if we use the free shipping code. The end result total that is reported to PayPal is correct -- showing a $20 -- but the shipping still shows as $5 and now the item itself is listed as being $15. In the end, it's not a critical issue, but it looks to the customer like we're suddenly charging them shipping if they don't notice that the item cost has been reduced.

 

Forgive me in advance if this has already been answered. I *TRIED* to use the forum/thread search feature so that I wouldn't have to sift through 57 pages (wow!) of responses and didn't find anything.

 

Thanks!

Share this post


Link to post
Share on other sites

Hi1 Need to ask about tax on discount coupons. When inserting it I choose tax class 25% and put in the price 200. When bying it the shopping cart will display the correct price 200 but on the checkout confirmation page it is priced 160 (without tax). How could this be? I am tired right no but I really can't understand why.

 

Include tax and Credit including Tax are set to true in admin. Also, total tax are below vouchers in order total.

Share this post


Link to post
Share on other sites

If you are using the osCommerce Pay Pal IPN then make sure you have installed the modification to 'pass tax to total', and that your Pay Pal IPN module is set to 'Aggregate' mode.

 

Vger

Hi Vger,

 

Thanks for making this version of CCGV. I installed it on my wife's site and everything seems to be working OK except for one thing. We use PayPal IPN. My wife setup a "free shipping" coupon code. If I buy something for $20 and the shipping is $5 (normally), the totals page on PayPal is weird if we use the free shipping code. The end result total that is reported to PayPal is correct -- showing a $20 -- but the shipping still shows as $5 and now the item itself is listed as being $15. In the end, it's not a critical issue, but it looks to the customer like we're suddenly charging them shipping if they don't notice that the item cost has been reduced.

 

Forgive me in advance if this has already been answered. I *TRIED* to use the forum/thread search feature so that I wouldn't have to sift through 57 pages (wow!) of responses and didn't find anything.

 

Thanks!

Share this post


Link to post
Share on other sites

Do you also have 'Include tax in total' set to true in osC admin, under Configuration --> My Store?

 

Vger

Hi1 Need to ask about tax on discount coupons. When inserting it I choose tax class 25% and put in the price 200. When bying it the shopping cart will display the correct price 200 but on the checkout confirmation page it is priced 160 (without tax). How could this be? I am tired right no but I really can't understand why.

 

Include tax and Credit including Tax are set to true in admin. Also, total tax are below vouchers in order total.

Share this post


Link to post
Share on other sites
Do you also have 'Include tax in total' set to true in osC admin, under Configuration --> My Store?

 

Vger

 

Hi Rhea! Yes, Display Prices with Tax is set to true.

Share this post


Link to post
Share on other sites

What file do i have wrong if the tick box is not showing to use a voucher?

 

i can't seem to find a problem in either checkout_payment or checkout_confirmation

 

Chris

Share this post


Link to post
Share on other sites

Did you give the Gift Voucher a model number beginning with GIFT?

 

Vger

Share this post


Link to post
Share on other sites
If you are using the osCommerce Pay Pal IPN then make sure you have installed the modification to 'pass tax to total', and that your Pay Pal IPN module is set to 'Aggregate' mode.

 

Vger

 

OK... I'm honestly trying here to find this on my own, but not having luck. PayPal IPN is already set to "Aggregate". The tax is getting passed to PayPal correctly (although not being itemized because of Aggregate, I guess). The problem is that the "free" shipping coupon amount is being deducted from the subtotal and the original shipping amount is still going to PayPal. The total is correct, but the itemization looks odd to the customer.

 

On our site:

 

Item: $20

Tax: $1

Ship: $5

Free Ship Code: -$5

Total: $21

 

On PayPal

 

Item: $16

Ship: $5

Total: $21

 

I did a search in the OSC PayPal IPN thread for "pass tax to total", but that didn't seem to reveal this fix that you're suggesting. That thread is 100+ pages long and I can't read through that whole thing. Is it possible I've installed PayPal IPN recently enough (June 2006, I think) that this tax fix is already in the baseline code? Does anyone have a link directly to the fix so that I could compare my PHP with the fixed file? I looked at the CVS repository for a bug fix entry regarding tax, but didn't seem to see what you're talking about.

 

Thanks in advance.

Edited by -argo-

Share this post


Link to post
Share on other sites

If you have the osCommerce Pay Pal IPN v1.3 then look through the Help Files folder for information on integrating with CCGV(trad). If you don't have that version then download it.

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites
Did you give the Gift Voucher a model number beginning with GIFT?

 

Vger

 

Hi Vger,

 

I'm not sure if you meant me but yes, model number starts with GIFT_

 

Could there be any other reasons that gift voucher shows without tax in veckout cinformation when trying to buy them?

It works when using a voucher, I am referring to buying one.

Share this post


Link to post
Share on other sites
Did you give the Gift Voucher a model number beginning with GIFT?

 

Vger

Not sure if you ment me?

 

The voucher was sent from admin, but yes the vouchers i have in the products do have a model number begining with GIFT, what file brings up the redeem checkbox?

Share this post


Link to post
Share on other sites

Hi Vger and fellas...

 

I got the contribution installed and everthing seems to be working... except...

 

For some reason coupons and vouchers aren't being subtracted from the total order. The database sees the coupon as having been used, and the gift voucher has been spent, but no money was subtracted from the orders we tested with. This seems to happen regardless of the method of payment. I've been through the install twice and I am not sure where to look. Any help would be appreciated. Thanks!

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

×