Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Hi Jacob, thanks for that, the problem is that with Discount Vouchers the discount doesn't get applied at all to the total.

But if I refresh the confirmation pg, it then does.. weird.

I tried messing with sort orders and putting ob_start() and ob_end_flush() in the confirmation page to try & get the whole page buffered before output. Didn't work, I'm still lost... cheers, Bill

 

Solution for this problem:

 

My system specs were: Windows 2000 server, IIS 5, PHP 4.3.1 running in CGI mode

 

The problem was that although the discount appeared on the checkout_confirmation.php page when you confirmed the order it did not carry through to the processing of the order.

 

After trying all manner of things I ended up installing the latest build of PHP which was 4.3.11 and after the reboot it all started working.

 

One problem I had after the reboot was that my Order Total Modules in the administration page was missing and blank. I had been hacking around with the order total modules and left a couple of copies of the files in the includes\modules\order_total folder. After removing these files I got the order total modules back.

 

Check out my site at www.coolthings.com.au

 

B)

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

I got this error after made "Show up discount in index.php".

 

Please help...

 

Thanks

 

Parse error: parse error, unexpected T_STRING in /home2/{hiden}/public_html/shop/index.php on line 57

 

Line 57:

$messaggio = 'sprintf(%s, $coupon_desc['coupon_description'])'; // this is the message of your discount coupon

Edited by Kalivy
Link to comment
Share on other sites

Hi,

 

I have installed the gift voucher contribution and cannot get the gift voucher to work when a customer purchases one to send to a friend.

 

I login, purchase a 100 gift certificate and it is put into my gift voucher account. If I try to buy another product after that my voucher account still shows $100. According to the instructions I have all the defaults set and the voucher queue set to true. I release it and still doesn't work. I have tried it set both to true and false.

 

If I send this gift voucher to another person they get the email with the validation code in it and the link but when they click on that link and try to use the gift voucher the error message says "invalid gift voucher code".

 

I have no idea how to make this work or what to do. Can you help please?

Link to comment
Share on other sites

Show up discount in index.php corrige 22/4/05

by Evol

www.evoldope.com

[email protected]

 

 

 

Step 1

 

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

Put this code into body of index.php

 

Rembember to change

$coupon_code = "PUT HERE YOUR DISCOUNT CODE";

//put into PUT HERE YOUR DISCOUNT CODE the code you assigned to your coupon in admin

 

 

 

<?php

if (NEW_SIGNUP_DISCOUNT_COUPON != '') {

  $coupon_code = "benvenuto";

    $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . "'");

    $coupon = tep_db_fetch_array($coupon_query);

    $coupon_id = $coupon['coupon_id']; 

$coupon_amount = $coupon['coupon_amount'];

    $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int)$languages_id . "'");

    $coupon_desc = tep_db_fetch_array($coupon_desc_query);

 

 

 

    $ammontare = '<font color="#cc0000"><b>'.ceil($coupon_amount).'%</b></font>'; //this is the amount of the discount you deserve

    $messaggio = 'sprintf("%s", $coupon_desc['coupon_description']); // this is the message of your discount coupon

 

 

 

  }

 

?>

 

 

 

 

 

step 2

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

 

apply this code wherever you find convenient in index.php to show up discount coupon messages

 

<?php echo $ammontare; ?>

<?php echo $messaggio; ?>

 

 

 

it's just a simply mod, but usefull to let your customers know what discount you deserve

Enjoy

 

No effect....

 

Please help. Thanks

Link to comment
Share on other sites

I Have a problem I don't find why...

I installed this contrib ccgv 5.13 and all seems to work ok but, when customers enters an invalid voucher code or an already used one, or date expired, the page shows :

TEXT_CONDITIONS_DESCRPTION

[] TEXT_CONDITIONS_CONFIRM

 

and not the explanations why the voucher code don't works...

 

PLEASE PLEASE PLEASE, any idea ? I put my shop online tomorrow ! ^^

Link to comment
Share on other sites

I also upgraded to 4.3.11 and it didn't solve the problem. Then my partner found this thread.

http://www.oscommerce.com/forums/index.php?showtopic=140305

 

It now works. :)

 

 

Solution for this problem:

 

My system specs were: Windows 2000 server, IIS 5, PHP 4.3.1 running in CGI mode

 

The problem was that although the discount appeared on the checkout_confirmation.php page when you confirmed the order it did not carry through to the processing of the order.

 

After trying all manner of things I ended up installing the latest build of PHP which was 4.3.11 and after the reboot it all started working.

 

One problem I had after the reboot was that my Order Total Modules in the administration page was missing and blank. I had been hacking around with the order total modules and left a couple of copies of the files in the includes\modules\order_total folder. After removing these files I got the order total modules back.

 

Check out my site at www.coolthings.com.au

 

B)

Link to comment
Share on other sites

Is there a way to activate a coupon code via a URL so that when the customer clicks on the link (in an email or banner ad) the coupon will be in the cart? I find that customers are reluctant to create an account to see if the deal is for real.

 

Thanks ? Ari

Link to comment
Share on other sites

Hey all,

 

Is there a list of the files that have been edited since 5.11 complete package? What would be the best way in upgrading this to 5.13? Thanks

 

Danny

Link to comment
Share on other sites

Hey all,

 

Is there a list of the files that have been edited since 5.11 complete package? What would be the best way in upgrading this to 5.13? Thanks

 

Danny

 

The best way is to use a tool to compare and merge the files, like Beyond Compare 2 from Scooter Software. It saves hours!

 

- Rigadin

Link to comment
Share on other sites

Is there a way to activate a coupon code via a URL so that when the customer clicks on the link (in an email or banner ad) the coupon will be in the cart? I find that customers are reluctant to create an account to see if the deal is for real.

 

Thanks ? Ari

 

I think it was like that before 21 dec 2004, but a security problem came out and now customers must login/create an account first. There is probably another workaround possible but I don't know about it.

 

- rigadin

Link to comment
Share on other sites

I think it was like that before 21 dec 2004, but a security problem came out and now customers must login/create an account first. There is probably another workaround possible but I don't know about it.

 

- rigadin

 

I did not upgrade since - do you know where I should look for this method?

 

Ari

Link to comment
Share on other sites

I did not upgrade since - do you know where I should look for this method?

 

Ari

 

The security issue was that if there is a coupon that is suppost to be for only one use for one customer, they would be able to keep redeeming that coupon untill someone loged in. So if someone got a coupon, they could keep redeeming it on different computers or something, then once they have redeemed it all they want they log in or register all of the instances, and all of the instances are redeemed instead of just one. The workaround was to require the person to log in before it is redeemed.

 

Like Rigidin said there might be another way to do this, but any way I can think of would make it not user friendly.

 

Say you make it so that once one person clicks on the coupon, it is set to be redeemed. This method would make it so that if the customer clicks on the coupon, but does not log in or buy anything that day, they will not be able to redeem the coupon a day later when they are ready to buy something.

 

Can anyone think of a better way to handle this? Hmm something that just came to mind, maybe have it act like the old way, but when they log in (or maybe at the confirmation stage of check out), re-verify the coupon. Don't know if this would work or not. Heh I am constantly contradicting myself...

Link to comment
Share on other sites

Inventory Not Updating.

 

I am not sure if this should go in the PayPal IPN thread but I believe this problem started with I began using the CCGV mod. I am also using the Jan 2005 PayPal IPN Update for the CCGV.

 

It seems if a user takes several minutes to complete the transaction using PayPal IPN my inventory is not being updated. It has been very hard to track down because it is only happening on some users. As best I can tell the inventory does not get updated if the user takes upwards of 4 minutes to make the payment. I also notice when this occurs I am not getting the email notifications either. So if I receive an order w/o the email notification I know I have to go manually update my inventory.

 

Any ideas? I am really at a loss with this and do not knwo where to start.

 

Also, my store is heavily modified. I am using CCGV, Seach Engine Friendly URL, EZier New Fields.

 

thanks,

-G

Edited by GMGGG
Link to comment
Share on other sites

Sorry, This is NOT a CCGV problem . I was able to figure out what was happening. I have PayPal account optional set at PayPal and if the user does not have a paypal account and does not click "Return to Merchant" the inventory is never updated.

 

Auto return only works for users with PayPal accounts.

 

-G

 

Inventory Not Updating.

 

I am not sure if this should go in the PayPal IPN thread but I believe this problem started with I began using the CCGV mod.  I am also using the Jan 2005 PayPal IPN Update for the CCGV.

 

It seems if a user takes several minutes to complete the transaction using PayPal IPN my inventory is not being updated.  It has been very hard to track down because it is only happening on some users.  As best I can tell the inventory does not get updated if the user takes upwards of 4 minutes to make the payment.  I also notice when this occurs I am not getting the email notifications either.  So if I receive an order w/o the email notification I know I have to go manually update my inventory.

 

Any ideas?  I am really at a loss with this and do not knwo where to start.

 

Also, my store is heavily modified.  I am using CCGV, Seach Engine Friendly URL, EZier New Fields.

 

thanks,

-G

Link to comment
Share on other sites

I am not sure why this hasn't been caught yet, but in includes\modules\order_total\ot_coupon.php line 428 has a very minor bug, but this is something that can cause a problem if a shop is using prefixes or changed table names.

 

$cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'");

 

This should be:

 

$cat_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'");

Link to comment
Share on other sites

Hey,

 

I am having a problem. I just installed the voucher system into my existing store that has been drastically changed. I added all the files and edited the files needed to my knowledge. Everything worked until I went to the checkout and Igot this error:

 

Fatal error: Call to undefined function: credit_selection() in /home/admin/public_html/cart/checkout_payment.php on line 431

 

The line of code this is referring to is:

<?php

echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM

?>

 

Where is this function defined??

 

Thanks in advance

Link to comment
Share on other sites

Hello,

 

i have installed ccgv 5.13 and have a little problem.

in the checkout_confirmation.php is an error. why will the money that will be taken off from the discount coupon (-4,71 euro) in the tax considered.

 

wrong.....

 

Zwischensumme: 58.05EUR

GLS (Versand nach DE : 1.45 kg): 4.90EUR

Gutscheine:5d878f: -4.71EUR <----- money from Discount Coupon that will be considered in tax

Summe: 58.24EUR

16%: 8.69EUR <-------

 

correctly

 

Zwischensumme: 58.05EUR

GLS (Versand nach DE : 1.45 kg): 4.90EUR

Gutscheine:5d878f: -4.71EUR

Summe: 58.24EUR

16%: 8.03EUR <-------

what must i do to correct this..???

 

thanks and sorry for my bad english

 

Harry

 

 

Hi,

 

I am having the same trouble. I think that everyone should check that the correct total amount is being calculated if you are including tax in your sale price

 

Sub-Total: $13.95

Table Rate (Australia Post): $5.00

Discount Coupons:mate: -$1.40 <------ this discount should be 10% which it looks like it is

Total: $17.43 <------ $13.95 + $5.00 - $1.40 = should equal $17.55

 

I know this is only $0.12 off but for bigger orders this could be alot more.

 

I think I know what it is doing.

All of my prices include 10% GST (Australian tax), I have a feeling that the program may be only applying the 10% discount code to my tax exclusive price. I need it to calculate it to my tax inclusive price.

 

Is this happening with anyone elses contribute? I have v5.13

 

Thanks

 

Jazz

Link to comment
Share on other sites

Hi

 

I have a problem can anyone help? :huh: In coupon_admin.php when I enter the start date and expire date from the drop down and go to continue/preview they are both listed as a default date of 01/01/1970 instead of the dates I selected, how can I rectify this? I replaced some of the code for the startdate and finishdate but it hasn't changed anything can anyone point me in the right direction or possibly offer some code that can sort this out? I don't know where it's getting the date from as the date in the database is 0000/00/00 00.00.00!?

 

I used:

 

Credit & Gift Vouchers

 

4 Feb 2005 - The final

7 Feb 2005 - Corrections

10 Feb 2005 - gv_redeem bug

19 Feb 2005 - GV_redeem anti SQL injection

21 Feb 2005 - add addslashes will fix the bug

 

Thanks in advance for any help :blush:

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

Hi,

 

I am having the same trouble.  I think that everyone should check that the correct total amount is being calculated if you are including tax in your sale price

 

Sub-Total: $13.95

Table Rate (Australia Post): $5.00

Discount Coupons:mate: -$1.40 <------ this discount should be 10% which it looks like it is

Total: $17.43 <------ $13.95 + $5.00 - $1.40 = should equal  $17.55

 

I know this is only $0.12 off but for bigger orders this could be alot more.

 

I think I know what it is doing.

All of my prices include 10% GST (Australian tax), I have a feeling that the program may be only applying the 10% discount code to my tax exclusive price.  I need it to calculate it to my tax inclusive price.

 

Is this happening with anyone elses contribute?  I have v5.13

 

Thanks

 

Jazz

 

 

OK. this sux. I read the instructions again as I thought i would start at the basics. I went to administation - modules - order totals (in thebackground menu) to fix up the tax code and I have some weird errors. this is what they are saying

 

 

Order Total Modules

 

Warning: main(/home/inkjet/public_html/cart/includes/languages/english/modules/order_total/ot_couponold.php): failed to open stream: No such file or directory in /home/inkjet/public_html/cart/admin/modules.php on line 128

 

Warning: main(/home/inkjet/public_html/cart/includes/languages/english/modules/order_total/ot_couponold.php): failed to open stream: No such file or directory in /home/inkjet/public_html/cart/admin/modules.php on line 128

 

Warning: main(): Failed opening '/home/inkjet/public_html/cart/includes/languages/english/modules/order_total/ot_couponold.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/inkjet/public_html/cart/admin/modules.php on line 128

 

Fatal error: Cannot redeclare class ot_coupon in /home/inkjet/public_html/cart/includes/modules/order_total/ot_couponold.php on line 15

 

 

 

why would it be asking me for ot_couponold?

 

modules.php line 128 and a few after is is

 

include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/' . $module_type . '/' . $file);

include($module_directory . $file);

 

 

Would really appreciate someones help

Link to comment
Share on other sites

Hey,

 

I am having a problem. I just installed the voucher system into my existing store that has been drastically changed. I added all the files and edited the files needed to my knowledge. Everything worked until I went to the checkout and Igot this error:

 

Fatal error: Call to undefined function: credit_selection() in /home/admin/public_html/cart/checkout_payment.php on line 431

 

The line of code this is referring to is:

<?php

echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM

?>

 

Where is this function defined??

 

Thanks in advance

Link to comment
Share on other sites

Hey,

 

I am having a problem. I just installed the voucher system into my existing store that has been drastically changed. I added all the files and edited the files needed to my knowledge. Everything worked until I went to the checkout and Igot this error:

 

Fatal error: Call to undefined function: credit_selection() in /home/admin/public_html/cart/checkout_payment.php on line 431

 

The line of code this is referring to is:

<?php

echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM

?>

 

Where is this function defined??

 

Thanks in advance

Should be in catalog/includes/classes/order_total.php

This file needs some modifications for credit class.

 

- Rigadin

Link to comment
Share on other sites

Hmmmmm interesting, my last post was deleted. How nice.

Can anyone tell me where i can i find the code the needs to be replaced for each file?

 

this contribution requires you to open each file within the contribution, look for the comments showing the start and end of each line of code that was added/deleted then compare to your files. There are tools like beyond compare that can help with this task. google it and you should find it.

 

just know ahead of time that this can be a very difficult contrib to add to your shop and might have some bugs/limitations depending on how you use it. as you can see by the amount of pages in this thread, its a very complicated contrib.

 

good luck.

Link to comment
Share on other sites

This will only work on fresh OSC files as stated in the installation text file. Thats why i need the code. I only need it for 2-3 files. The rest is done and working. One is the orders.php and create_account.php and one other i cant remember.

 

I cant overwite these file with the ones included cause those files are moded and they also do not come with the code to manually write them in or i would have overwritten them and added the code from the others.

 

So is their anyway to find the code and installation for what needs to be replaced and inserted?

 

Thanks

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.
Note: Your post will require moderator approval before it will be visible.

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