Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

i cant seem to find an answer to this...

 

what if someone fails to use their voucher balance and wants me to refund their credit card for the voucher amount.

 

how can i delete the voucher balance from their account?

Link to comment
Share on other sites

I?m afraid that?s more of a procedural thing, most businesses would not refund the item but this is your lucky day, I have just spent all yesterday ensuring I can balance all CCGV transactions so here is a solution if you know how to run SQL against the DB:-

 

Procedures.

First you need to find the customers account,

Then you delete the account balance but replaceing ?. In the code below .

Finally you manually make the cc credit.

 

----- how to find gift cert balances unused/not sent to a friend -----

SELECT cgvc.customer_id customers_id, CONCAT(c.customers_firstname, ' ', c.customers_lastname) customers_name,

c.customers_email_address, cgvc.amount

FROM coupon_gv_customer cgvc

INNER JOIN customers c ON c.customers_id = cgvc.customer_id

WHERE cgvc.amount <> 0

 

---- how to delete the account balance ----

DELETE FROM coupon_gv_customer WHERE customer_id = ?.

 

 

 

 

 

 

 

PS for others here are the rest. I think the second SQL could be written to run alot faster by making the source table coupons, but I have not had time to rewtrite it yet.

 

----- how to find new gift cert values spent -----

SELECT ot.orders_id, o.customers_id, o.customers_name,

o.date_purchased , o.orders_status, ot.value

FROM orders_total ot

INNER JOIN orders o ON o.orders_id = ot.orders_id

WHERE ot.class = 'ot_gv'

 

----- how to find new gift cert values bought -----

SELECT op.orders_id, o.customers_id, o.customers_name,

o.date_purchased, op.products_model, op.products_name,

SUM(op.final_price * op.products_quantity) Value

FROM orders_products op

INNER JOIN orders o ON o.orders_id = op.orders_id

WHERE op.products_model LIKE 'GIFT%'

AND o.date_purchased BETWEEN '2005-01-01' AND '2006-01-01'

GROUP BY op.orders_id, o.customers_id, o.customers_name,

o.date_purchased, op.products_model, op.products_name

 

----- how to find new gift cert values bought not released -----

SELECT cgvq.order_id, o.customers_id, o.customers_name,

o.date_purchased, cgvq.amount

FROM coupon_gv_queue cgvq

INNER JOIN orders o ON o.orders_id = cgvq.order_id

WHERE cgvq.release_flag = 'N'

 

----- how to find new gift cert values bought, released, sent to a friend and not yet used -----

SELECT gv.coupon_code, cet.customer_id_sent customers_id,

CONCAT(cet.sent_firstname, ' ', cet.sent_lastname) customers_name,

cet.emailed_to, cet.date_sent, gv.coupon_amount

FROM coupons gv

INNER JOIN coupon_email_track cet ON cet.coupon_id = gv.coupon_id

WHERE gv.coupon_active = 'Y'

AND gv.coupon_type = 'G'

 

----- how to find gift cert balances unused/not sent to a friend -----

SELECT cgvc.customer_id customers_id, CONCAT(c.customers_firstname, ' ', c.customers_lastname) customers_name,

c.customers_email_address, cgvc.amount

FROM coupon_gv_customer cgvc

INNER JOIN customers c ON c.customers_id = cgvc.customer_id

WHERE cgvc.amount <> 0

Link to comment
Share on other sites

:o :o ********** FORGOT TO ADD ********** :o :o

 

Take a copy of the coupon_gv_customer data first just in case you make a mistake :thumbsup:

hey thanks...

 

but how about you give a complete code that can be copied and pasted, maybe even have a voucher_balance.php page in admin/coupon_admin.php?

 

also, a full SQL to execute?

 

thanks

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

Link to comment
Share on other sites

hey thanks...

 

but how about you give a complete code that can be copied and pasted, maybe even have a voucher_balance.php page in admin/coupon_admin.php?

 

also, a full SQL to execute?

 

thanks

 

To make a backup, just use your DB admin tool. If its phpmyadmin click on the table, then click on the 6th tab "Export" and click on the go button.

 

As for a page I would love to create one but I have no need for one at the moment, as the above is the full SQL you need to run. If you cannot get it to work then just make sure you copy from the end of each comment to the next into the SQL box in your admin tool. Each one gets the part you need.

eg

----- how to find new gift cert values spent -----

SELECT ot.orders_id, o.customers_id, o.customers_name,

o.date_purchased , o.orders_status, ot.value

FROM orders_total ot

INNER JOIN orders o ON o.orders_id = ot.orders_id

WHERE ot.class = 'ot_gv'

 

----- how to find new gift cert values bought -----

SELECT op.orders_id, o.customers_id, o.customers_name,

o.date_purchased, op.products_model, op.products_name,

SUM(op.final_price * op.products_quantity) Value

FROM orders_products op

INNER JOIN orders o ON o.orders_id = op.orders_id

WHERE op.products_model LIKE 'GIFT%'

AND o.date_purchased BETWEEN '2005-01-01' AND '2006-01-01'

GROUP BY op.orders_id, o.customers_id, o.customers_name,

o.date_purchased, op.products_model, op.products_name

 

HTH

 

Simon.

Edited by scranmer
Link to comment
Share on other sites

I have installed the credit class gift voucher contribution and paypal ipn.

 

When I enter my discount code the discount does not get passed to PayPal.

 

Please can someone help. This is a huge problem and I have just gone live and have people complaining.

 

I'd be very appreciative.

Link to comment
Share on other sites

I have installed the credit class gift voucher contribution and paypal ipn.

 

When I enter my discount code the discount does not get passed to PayPal.

 

Please can someone help. This is a huge problem and I have just gone live and have people complaining.

 

I'd be very appreciative.

first thing to check is the normal checkout but with Paypal (not IPN)

 

if the CCGV doesn't go through properly then you know it is going to take time to solve... (and we will try to help!)

 

... however if it goes through properly on the 'normal' paypal then you know the CCGV and Paypal IS installed correctly so it is EITHER your Paypal IPN mod that isn't installed properly or the checkout_process.php and/or checkout_confirmation.php files

 

run the paypal check above and let us know what happened. if the Paypal IPN doesn't work but normal Paypal does then copy and paste the FULL checkout_payment.php here

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

Link to comment
Share on other sites

Hi there guys. I have just installed the Credit Class/Gift Vouchers/Discount Coupons (Version 5.10) on a test site to make sure it didnt go all wrong. but i seem to be getting a major error. I did everything i was told to do in the instructions. But after copying over then hand editing the files that need it. i get this error

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/sdeath/public_html/test/includes/functions/general.php:17) in /home/sdeath/public_html/test/includes/add_ccgvdc_application_top.php on line 36

 

any help would be appreciated as i would like to get this working with my website. but i dont want to use it untill i work out what is wrong.

 

thanx in advance

 

There's a mistake in the instructions. Removing the duped function from general.php should fix it.

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

I have a problem with CCGV and COD

 

When my custommers uses thier GV balance and wanna use the Cash On Delivery "which I change 45 DKK" the 45 DKK doesn't shows up and I lose 45 DKK everytime...

 

Please help

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Link to comment
Share on other sites

Would appreciate some help with the following questions. Thanks!

 

1, I need to know how to easily remove all coupons/gift vouchers in "Gift Vouchers sent" in my development store before going live. I suppose they are the only ones that need to be deleted?

 

2, I also wonder if there is a way to see which coupons/gift vouchers that is actually used by customers, not just redeemed.

Link to comment
Share on other sites

Fredrik,

 

1. Not actualy needed to do this but the following show work since you want to remove all the data, including discount voucher info, then open up your DB application (like phpMyAdmin) and BACKUP YOUR DATA then execute the following SQL

 

TRUNCATE TABLE coupons;

TRUNCATE TABLE coupons_description;

TRUNCATE TABLE coupon_email_track;

TRUNCATE TABLE coupon_gv_customer;

TRUNCATE TABLE coupon_gv_queue;

TRUNCATE TABLE coupon_redeem_track;

 

 

2. to find out this info, again executing the SQL, run each of the SQL statements I posted earlier in this thred.

 

HTH

 

Simon.

Edited by scranmer
Link to comment
Share on other sites

Fredrik,

 

1. Not actualy needed to do this but the following show work since you want to remove all the data, including discount voucher info, then open up your DB application (like phpMyAdmin) and BACKUP YOUR DATA then execute the following SQL

 

TRUNCATE TABLE coupons;

TRUNCATE TABLE coupons_description;

TRUNCATE TABLE coupon_email_track;

TRUNCATE TABLE coupon_gv_customer;

TRUNCATE TABLE coupon_gv_queue;

TRUNCATE TABLE coupon_redeem_track;

 

Thanks. So the above just deletes info about made coupons and vouchers? Theres nothing important that goes away with it?

 

2. to find out this info, again executing the SQL, run each of the SQL statements I posted earlier in this thred.

 

Would be great if that is possible to see in admin in next version og CCGV.

Link to comment
Share on other sites

Thanks. So the above just deletes info about made coupons and vouchers? Theres nothing important that goes away with it?

Would be great if that is possible to see in admin in next version og CCGV.

 

Yep just deletes all the voucher and discount related infomration.

 

I have had a few requests to make them into screens and I may get round to it one day but for now if anyone else needs a hand doing it I can talk them through it.

 

Simon.

Link to comment
Share on other sites

Yep just deletes all the voucher and discount related infomration.

 

I have had a few requests to make them into screens and I may get round to it one day but for now if anyone else needs a hand doing it I can talk them through it.

 

Simon.

i haven't tested out the info you put here but will do it tonight and get back to you

 

thanks

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

Link to comment
Share on other sites

Yep just deletes all the voucher and discount related infomration.

 

I have had a few requests to make them into screens and I may get round to it one day but for now if anyone else needs a hand doing it I can talk them through it.

 

Simon.

copied all details on previouspage in to SQl via phpmyadmin but nothing the admin/coupons pages is different!

 

can't work this one out!

 

HELP!!

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

Link to comment
Share on other sites

Different how? Hopefully different as in less data on the page. All you need to do is start phpmyadmin, connect to the correct DataBase, then copy and paste the following

 

TRUNCATE TABLE coupons;

TRUNCATE TABLE coupons_description;

TRUNCATE TABLE coupon_email_track;

TRUNCATE TABLE coupon_gv_customer;

TRUNCATE TABLE coupon_gv_queue;

TRUNCATE TABLE coupon_redeem_track;

This should just remove the CCGV data and if you want to check, copy and paste the following before you run the TRUNCATE to see what balances were there and after the TRUNCATE to see what is there now.

 

SELECT cgvc.customer_id customers_id, CONCAT(c.customers_firstname, ' ', c.customers_lastname) customers_name,

c.customers_email_address, cgvc.amount

FROM coupon_gv_customer cgvc

INNER JOIN customers c ON c.customers_id = cgvc.customer_id

WHERE cgvc.amount <> 0

HTH

 

Si.

Link to comment
Share on other sites

I have started to redo this contribution from the ground up and have it completed for English only (other languages to follow). If anyone is trying to install it and wants to BETA test for me please PM me with an email address and I will send you a copy of what we have done. Instalation took about 45 minutes on a heavily modified store. There are still a few changes/additions that might be made as it is based on 5.13 and 5.13a but it does work and that is the important part.

 

Peter

Link to comment
Share on other sites

xearoth,

 

In one word yes.

 

In the admin it says "The coupon gives free shipping on an order. Note. This overrides the coupon_amount figure but respects the minimum order value" here is a screen view of creating a coupon...

 

HTH

 

Si.

 

gv_admin.GIF.

Edited by scranmer
Link to comment
Share on other sites

everything went good but I got this error, does anybody know how to fix it please?

 

Cannot redeclare create_coupon_code() (previously declared in includes\functions\general.php:18) in includes\add_ccgvdc_application_top.php on line 50

Link to comment
Share on other sites

everything went good but I got this error, does anybody know how to fix it please?

 

Cannot redeclare create_coupon_code() (previously declared in includes\functions\general.php:18) in includes\add_ccgvdc_application_top.php on line 50

 

yes read above, some else had the same sort of error and I think you have to remove the code from general (I think)

 

Si.

 

everything went good but I got this error, does anybody know how to fix it please?

 

Cannot redeclare create_coupon_code() (previously declared in includes\functions\general.php:18) in includes\add_ccgvdc_application_top.php on line 50

 

yes read above, some else had the same sort of error and I think you have to remove the code from general (I think)

 

HTH

 

Si.

Link to comment
Share on other sites

Hello,

 

i have a little problem with 5.14

 

I have istalled this great cont. and it run.

But wenn i make a discount coupon for a product or directory it was not calculat.

By the shopping cart the coupon are standing on "Coupon: blabla"

But on the checkout_confirmation is it no called.

 

a discount coupon for all products/directorys are going.

 

can you help?

Thanks

 

Marcus

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