Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

I just installed ccgv-510c and made all the required changes as stated in the docs. From the admin, I get the following error in:

 

coupon_admin:

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

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_p

roducts, restrict_to_categories, date_created,date_modified from coupons where coupon_active='Y' and coupon_type != 'G' limit -20, 20

 

Gift Voucher Queue:

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

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select c.customers_firstname, c.customers_lastname, gv.unique_id, gv.date_created, gv.amount, gv.order_id from customers c, coupon_gv_queue gv where (gv.customer_id = c.customers_id and gv.release_flag = 'N') limit -20, 20

 

Gift Voucher sent:

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

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from coupons c, coupon_email_track et where c.coupon_id = et.coupon_id limit -20, 20

 

What to do next?

 

I run PHP 4.3.8 with MySQL 4.1.3b-beta-nt on Windows 2003 server.

 

Thanks,

Share this post


Link to post
Share on other sites
Hello, I installed the version 5.10c. I'm not possible the sent away coupons are to be redeemed. At least it is booked nothing. Property my Sort order already as adjusted as here indicated in the forum. On the whole side is no one for the topic of coupons indicates. But an error message does not come also...

 

Please help me!

Can anybody help me? The error can't be very big

Share this post


Link to post
Share on other sites

:dvellio: see the difference in the names of the table and what the error msg says? you forgot to include the require add_ccgvdc_application_top in app_top

applic'dvellio_dvecatalog.table_coupon_gv_customer' doesn't exist

When I go to the database I can see the table and everything looks OK to me.

Database dvellio_dvecatalog - Table coupon_gv_customer

 

:franklyn: so nice to see someone that reads

 

:Macisle: I haven't played with either of those contribs but if they stick with normal osc methodologies they should work ok.

 

:ptrinephi: have you played around with your split_page_results class?


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

:ptrinephi: actually I think it might be a problem with the mysql version you are using. I just tried the sql queries you presented in the 4.1.2 and it played ok .. I just found a note "The initial release of MySQL 4.1.3 for Windows accidentally was not compiled with support for the Spatial Extensions " that you might want to consider. but since you are running b it might not be that ....

 

carfever: sorry I could not understand what you are saying.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

strider do you have a working version that calculates everything correctly?

 

Mine seems to be off a little bit here and there...

Share this post


Link to post
Share on other sites

as a matter of fact I did play with split_page_result. I commented out this line

 

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

in function splitPageResults and the error went away. However, if I have 100s of items, the list page will get pretty big.

 

Running that SQL query from mysqladmin returns the same error so it's got to be the mysql version. Maybe it's the beta thing.

Share this post


Link to post
Share on other sites

Hi all.

I've installed this contribution along with the PayPal Shopping Cart IPN contrib.

 

In testing I've done the following:

1) Setup payment allowing either cash/money order or Paypal.

2) Setup a test discount code giving $10 off any order over $30.

3) Setup an order with a total of $310. When I come to checkout I can

enter the discount code, and it shows me a subtotal of $310, then the $-10

deducted for the discount and a total of $300.

 

4a) If I use cash/money order to pay this correctly shows the total payable as $300, but

 

4b) If I use paypal (with the shopping cart contrib), the $300 shown on the order confirmation is not carried forward to the paypal total - it still shows the original $310.

 

Has anyone else had this problem?

 

 

Thanks,

Simon

Share this post


Link to post
Share on other sites

sch: I think they have the fix in the paypal posts or what I read last night they did

 

 

ptrinephi: I ran it through a couple of different versions of mysql and it played ok but it does sound like a mysql issue. you might try upgrading the mysql.

 

mijman2: I have about 50 installs that work correctly. You might look at your sort order.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

OK, had a quick look at this and it looks like its a problem with the paypal contribution - setting the paypal IPN config to 'aggregate' instead of 'itemised' seems to work fine.

 

Simon

Share this post


Link to post
Share on other sites

Hi everyone-

 

I'm about to take my first plunge into adding an osCommerce contrib, and I'm looking for some reassurance. I have the documentation for release 5.10, and I think it all makes sense, but I wanted to know if there were any additions or warnings from the community that I might do well to heed. Let me know if there's anything in particular I should check for or do that's not in the docs, and cross your fingers for me.

 

Banzai!

 

Dante

Share this post


Link to post
Share on other sites

strider...

 

Sort order is correct... There is one file specific to ccgv that a lot of people have made small edits too but not posted a new version of CCGV... I was hoping you might be able to either release a bug free version or post snippets of code...

 

Thanks

Steve

Share this post


Link to post
Share on other sites

steve.... tell me your sort order and how you are running it .. I have over 50 sites that use this without any problems ... not a penny off...


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

I got it to work with one exception.... when i get to the payment method I tick the redeem checkbox but the next page comes up says at top Invalid Coupon Code.. I have checked made sure I enabled the Voucher in admin Queue but i still get this error? :unsure:

 

I have read through many pages here but have not found a solution...anyone have any ideas? Thanks so much!

Share this post


Link to post
Share on other sites

Hello I have just freshly installed Gift Voucher and Coupon add-on to my OSCommerce.

 

I am trying to utilize the coupon feature of the add-on. Installation and everything works great except for 1 problem.

 

The percentage discount for my coupon, calculates based off of the shipping instead of the product price.

 

For example:

 

1 pair of eyewear is $100

shipping is: $12

 

I set my coupon discount to 15% and it calculates $1.80 discount (which is 15% off of $12)

 

That happened with the settings at:

 

- Display Total: true

- Sort Order: any sort order it seems

- Include Shipping: true

- Include Tax: true & false

- Re-calculate Tax: None

- Tax Class: --none--

 

And it looks something like this:

 

Sub-Total: $100.00

Discount Coupons: -$1.80

Federal Express (Shipping and Handling Total): $12.00

Total: $110.20

 

Now if I turn off "Include Shipping" (aka. set it to false), because I don't want it to deduct the discount from shipping. Then the next time I test out the coupon, I get this:

 

Sub-Total: $100.00

Federal Express (Shipping and Handling Total): $12.00

Total: $112.00

 

 

This seems to me that the coupon is calculating the discount from the shipping instead of the product price.

 

Someone please give me some help as to where/what I can do to fix this.

 

Thank you.

 

EDIT: I tried running a search for anyone else who's had this problem, but after the first 10 pages of results, I just couldn't go on reading. :P So I ended up posting here. Thanks!

Edited by AmethystHaze

Share this post


Link to post
Share on other sites

I am too getting the same error that someone else was getting a couple pages ago, but I didn't see any reply back to him, so I am also posting to try and hopefully find a result...

 

When I goto purchase a gift voucher, It's added to the cart just fine, but when it comes to the checkout payment type, whatever type I click gives me the following error....

 

Fatal error: Cannot redeclare class order_total in x:\x\include\classes\order_total.php on line 13

 

Can someone tell me how to fix this!?

 

Everything else seems to be working okay!

Share this post


Link to post
Share on other sites

Hmm ok, after going through the code and doing some variations, anyhow it's very weird... but I fixed it just writing my own formula with the existing variables and now it works.

 

Thanks though.

Share this post


Link to post
Share on other sites

First off Great Job on this contribution. It took me 12 hours to get it working on a highly modified shop but it feels sooo good when everything works as the sun comes up...

 

My Question is regarding the actual certificate image. It is allways nice when you have somehting you can download and print off after recieving a voucher. Is there anyway for images or links to be sent to the reciepient where they can print off something ?

 

Just curious if anyone has played around with this.

 

Hugz :P

Share this post


Link to post
Share on other sites
First off Great Job on this contribution. It took me 12 hours to get it working on a highly modified shop but it feels sooo good when everything works as the sun comes up...

 

My Question is regarding the actual certificate image. It is allways nice when you have somehting you can download and print off after recieving a voucher. Is there anyway for images or links to be sent to the reciepient where they can print off something ?

 

Just curious if anyone has played around with this.

 

Hugz :P

Are you able to have people purchase certificates as products and then it electronically sends a voucher? That is what i am trying to do. ;)

Share this post


Link to post
Share on other sites

This is what i would like to do as well but I have allways sold physical products and have not experience whatever with setting a download after purchase.

 

My other concern with this is that I do accept check/moneyorder so the vouchers are held in Queue prior to releasing them to make sure payment is actually made before coupon is spent.

 

I have been going through the forums looking now for info on virtual products...

Share this post


Link to post
Share on other sites

I have been testing some more and While working with Discount Coupons on coupon_admin.php i have noticed that I can not add a % to the discount but only a $ amount.

 

The intrustions on this page say

The value of the discount for the coupon, either fixed or add a % on the end for a percentage discount

 

But when I enter the % after the number I still get a $ discount when I redeem upon checkout..

 

Anyone know how to fix this up? I am using ver510c

 

Thanks..

 

:D

Share this post


Link to post
Share on other sites

Could somebody post a description of the expected behavior (or screenshots) for

the contribution in all its glory nowadays?

 

I have installed the latest release of the contribution on a heavily modified version of MS2.

 

The only problem I had was the need to change a line of gv_redeem.php from

> tep_redirect(FILENAME_DEFAULT);

to

< tep_redirect(tep_href_link(FILENAME_DEFAULT));

 

Otherwise I got messages indicating a recursive redirection when I tried to redeem gift

certificates. Now, no more problems that I am aware of, but I am concernced that things may

be missing.

 

For example, I havent found anywhere to acertain what the "current balance" is in the

gift account, and I dont see anything in the "install documentation" or GV FAQ that tells me

how to figure it out. There is no info about it printed in either the shopping cart, at checkout, or

in my "account information" page. And I cant find that information on the admin pages either.

 

Also, I couldnt get things to work until I enabled downloads and downloads by redirect.

 

At this point I have successfully issued myself gift vouchers and redeemed them so I think

most of the functionality is there, but it took more trial and error than I like, and I dont like the fact that I cant monitor the balance of the gift vouchers as a customer or an admin. I dont

really know whether it is working right or wrong at this point

 

If somebody clarifies, I would be happy to modify either the FAQ or the install.html file

as my contribution to the effort.

 

Thanks

 

Phil

Share this post


Link to post
Share on other sites

Hi I am trying to get this to work with the Internetsecure gateway, the discount amount does not get passed to the Internetsecure page. Below is the code that they use to get the tax and shipping info, how do I get it to add the discount as well?

 

$prodlist_size = sizeof($order->products);

$shipping_cost = number_format($order->info['shipping_cost']* $default_rate,2,'.',',');

$tax_total = number_format($order->info['tax'] * $default_rate,2,'.',',');

 

 

Thank you for any help

Share this post


Link to post
Share on other sites

Please! Need help!

 

I installed the ccgv 5.10b, and all semed to go fine until I attempted to add an item to the cart, which then gives me the following error in the Shopping Cart infobox:

 

Fatal error: Call to undefined function: get_products() in /***/***/***/***/catalog/includes/boxes/shopping_cart.php on line 31

 

When I click to view my shopping cart contents, I get the following error:

 

Fatal error: Call to undefined function: get_products() in /***/***/***/***/catalog/shopping_cart.php on line 77

 

I do have a number of other contributions installed, and all had tested as working properly before I attempted the ccgv install, and as far as I can tell, still do.

 

After double checking my install, and looking over the code of the two error message files, I believe they are fine and that my error is in some other file... I'm no PHP genius though, and could be totally wrong! Can anybody help here?

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

×