Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Well I am not really at the payment phase of my store yet as I am not going live for a another week. But the store credit stuff very interesting too me... Though I never got it to work correctly :(

 

The next thing I am trying to figure is the best way to make a coupon work like the gift voucher since the coupons seem to work flawlessly. Problem I am having is I can make a code that gives you $20 off an order that is one use and has no restrictions. If you buy 20$ or less with shipping and eneter the code the total amount due is $0.00 which is how it should be... but even though you owe no money you still have to select a payment option like check/money order. Any ideas on a good fix for that? Best i was thinking is to code something to check if the total is 0.00 and if so not force you to select anything for a paypment option but that might screw up the order status stuff... I was wonder if anyone else had this problem and if so how did they go about fixing it.

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Hi Brann,

What is wrong with your gift vouchers mine work great! Perhaps I can help you get them to work. Coupons are figured after the payment page and so you need to select a payment method in case there is a balance, not sure how to work around that.

 

Maddie

Link to comment
Share on other sites

ok I have a dumb question... I want to realign the redeem button closer to the input field as some customers have said it is confusing... I am in teh catalog/includes/modules.ot_gv.php file and nothing i do moves it... can anyone assist me?

 

I think the code is here

 

$selection_string .= '<tr>' . "\n";

$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>';

$selection_string .= ' <td class="main">' . "\n";

$image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';

$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';

$selection_string .= ' <td align="right">' . $image_submit . '</td>';

$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';

$selection_string .= '</tr>' . "\n";

Link to comment
Share on other sites

Maddie,

 

I am not sure on your problem but I am in code hacking mode at the moment and I will see if i can find anything and post my results :)

 

As for my gift voucher code it is kind of odd i had a shopping list of things that were wrong with it.

 

* in the payment module section the credit class didnt work and gave me errors

(im pretty sure thats what made all the other problems...)

* the GV release screen did not work and when someone got a voucher it just gave them the credit and I was not able to approve them.

 

 

If I could only figure out why the credit class did not work I would be golden I am sure. But until then I have to use the coupons as a sort of GV system.

Link to comment
Share on other sites

What I did was to use Rigadins download and opened the same file(s)

 

catalog/includes/modules/ot_coupon.php  around line 556

catalog/includes/modules/ot_gv.php    around line 321

 

and after this line of the following 2 files

 

function install() {

 

I copied the english from this file to the updated one that portion if the files.

Then I uploaded these files... but then you have to go into admin panel and remove the module and reinstall it by clicking on the green plus sign... then you should see it in english

Hope you were able to follow that

Maddie

 

Thanks Maddie, that fixed it.

 

Anyone know how to add/remove credit on a customers account via the admin? I've checked all the possible options but don't see it. My admin-->modules--> says credit class error. Could that be the problem?

 

One more thing, the email sent to the purchaser after an order is being sent as follows:

 

osCommerce

EMAIL_SEPARATOR

EMAIL_TEXT_ORDER_NUMBER 3

EMAIL_TEXT_INVOICE_URL

http://.../catalog/account_history_info.php?order_id=3

EMAIL_TEXT_DATE_ORDERED Thursday 02 June, 2005

 

EMAIL_TEXT_COMMENTS_UPDATE

 

EMAIL_TEXT_STATUS_UPDATE

 

When I send credit voucher emails they are sent fine. Has anyone dealt with this?

 

Thanks in advance, and I apologize if these problems were already discussed elsewhere.

 

Chris

Link to comment
Share on other sites

Thanks Maddie, that fixed it.

 

You're welcome :)

 

Anyone know how to add/remove credit on a customers account via the admin? I've checked all the possible options but don't see it. My admin-->modules--> says credit class error. Could that be the problem?

 

You can add, delete or adjust a customers vouvher balance from phpMyAdmin :thumbsup:

 

One more thing, the email sent to the purchaser after an order is being sent as follows:

 

osCommerce

EMAIL_SEPARATOR

EMAIL_TEXT_ORDER_NUMBER 3

EMAIL_TEXT_INVOICE_URL

http://.../catalog/account_history_info.php?order_id=3

EMAIL_TEXT_DATE_ORDERED Thursday 02 June, 2005

 

EMAIL_TEXT_COMMENTS_UPDATE

 

EMAIL_TEXT_STATUS_UPDATE

 

When I send credit voucher emails they are sent fine. Has anyone dealt with this?

 

What exactly is the problem? Do you want to get rid of empty space change it or what? Have you tried to alter this file already? May be you deleted something you needed...try re uploading the ot_gv.php and/or the gv_send.php files.

 

Maddie

Link to comment
Share on other sites

that section is found in the catalog/checkout_process.php file and should look like this

 

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "'>" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "</a>\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

 

Maddie

Link to comment
Share on other sites

I'm just doing a quick evaluation of this extension, so that I can help direct my client on what this extension will do.  I've read most of the install.html file.  I have only one question at this point:  Can a credit voucher be created for people who are not yet customers?  (One major reason to issue a credit voucher is to gain new customers)  The scenario I would like to implement is this:

1) Create a credit voucher

2) Email it to a prospective customer

3) Allow that customer to create an account and then use the credit voucher that was emailed to them.

 

Is that possible with this contrib?

 

Thanks in advance!

-david

 

Hi David,

 

Yes, you can email a voucher to anyone, not just customers - when they create an account, they can redeem it.

 

You can also set it up to automatically send a voucher to every new account.

 

Hope this helps

 

Quentin

Link to comment
Share on other sites

Hey guys, what page are the posts about setting up the ccgv settings. I am having a tax calculation problem. When using the voucher the tax is calculated without deducting the voucher from the total. What settings should i have for the voucher module if i want to recalculate?

 

Thanks

Danny

Link to comment
Share on other sites

Hi there,

 

I have the latest contribution installed (5.13d) and I'm having problems when I set an order minimum for my discount coupons. If the discount does not go through because they do not have the required amount, ERROR_REDEEMED_AMOUNT appears and no discount is given. However when they HAVE reached the minumum order amount ERROR_REDEEMED_AMOUNT still appears but the discount is given.

 

Any ways to solve this so that I don't get the same error message for 2 different actions?

Link to comment
Share on other sites

Hello Everyone,

 

I've spent quite a bit of time reading this thread, and I have seen this question raised already, but unfortunately the fix that was mentioned didn't work for me, so I'm bringing it up again. (Or possibly I missed another fix option in the many pages of reading, and I'm sorry about that if I did.)

 

I have version 5.3d installed.

I've deleted the duplicate functions in functions/general.php

I've changed the two places where amount was spelled wrong

I have verified the define statements in the database_includes.php that Jans described

 

So, the issue that I'm having is that if a make a coupon for 20% off without specifying a product or cpath catagory, it works perfectly, but if I want to limit the coupon to be 20% off only certain products or catagories, it simply stops working altogether.

 

Any help is appreciated, and thanks for this great contribution! Even with the current snafu, it's saved me a ton of time.

 

Adrienne

Link to comment
Share on other sites

Heyo all :)

 

I have installed last Version from CCGV, all i think works great.

I have setup a 2.50 $ voucher for new users.

 

But in the create Account email for the new user, i have no clickable link for the voucher.

 

Can anyone help me out, to change this in a clickable link ?

 

I think, it?s tzhan easier for new users in the store.

 

Thanks in advance.

 

Hobbes

Link to comment
Share on other sites

Back to the French bit "again " sigh.

 

I've discovered that if I remove the 2 modules coupons and gift vouchers that come with CCGV from the order total section and re install them again that the French is put back into the dataBase and the program again, HUH ??

 

How come, and why ? I have used version 5.13d to set it up in the first place ( that's where the problem was ) Then I've changed the SQL and removed the French Db fill line and copied the English from V 5.13 or 5.13c

 

I've also removed the tables and added them again by running the SQL.

 

And to my great surprise I find the French back into my tables time and time over again, I remove them but they keep coming back, WHY ??

 

Can someone tell me if there is, like a duplicate file that somehow overrules the module file ?

 

Can someone tell me which files to put where to et the modules (re)installed, because the default seems to get me the French problem back.

 

Thnks, Jan

Link to comment
Share on other sites

Back to the French bit "again " sigh.

 

I've discovered that if I remove the 2 modules coupons and gift vouchers that come with CCGV from the order total section and re install them again that the French is put back into the dataBase and the program again, HUH ??

 

How come, and why ? I have used version 5.13d to set it up in the first place ( that's where the problem was ) Then I've changed the SQL and removed the French Db fill line and copied the English from V 5.13 or 5.13c

 

I've also removed the tables and added them again by running the SQL.

 

And to my great surprise I find the French back into my tables time and time over again, I remove them but they keep coming back, WHY ??

 

Can someone tell me if there is, like a duplicate file that somehow overrules the module file ?

 

Can someone tell me which files to put where to et the modules (re)installed, because the default seems to get me the French problem back.

 

Thnks, Jan

 

 

Found it:

 

First remove the modules with the admin tool, then;

 

Take OT_COUPON.PHP and OT_GV.PHP from version 5.13 and replace the lines that say "function install" ( somewhere at the end )

 

 

in ot_coupon.php copy this:

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_COUPON_STATUS', 'true', 'Do you want to display the Discount Coupon value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_COUPON_SORT_ORDER', '9', 'Sort order of display.', '6', '2', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '5', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Tax', 'MODULE_ORDER_TOTAL_COUPON_INC_TAX', 'true', 'Include Tax in calculation.', '6', '6','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Re-calculate Tax', 'MODULE_ORDER_TOTAL_COUPON_CALC_TAX', 'None', 'Re-Calculate Tax', '6', '7','tep_cfg_select_option(array(\'None\', \'Standard\', \'Credit Note\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_COUPON_TAX_CLASS', '0', 'Use the following tax class when treating Discount Coupon as Credit Note.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

}

 

 

 

and in ot_gv.php copy this:

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_GV_STATUS', 'true', 'Do you want to display the Gift Voucher value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_GV_SORT_ORDER', '740', 'Sort order of display.', '6', '2', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Queue Purchases', 'MODULE_ORDER_TOTAL_GV_QUEUE', 'true', 'Do you want to queue purchases of the Gift Voucher?', '6', '3','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_ORDER_TOTAL_GV_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '5', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Tax', 'MODULE_ORDER_TOTAL_GV_INC_TAX', 'true', 'Include Tax in calculation.', '6', '6','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Re-calculate Tax', 'MODULE_ORDER_TOTAL_GV_CALC_TAX', 'None', 'Re-Calculate Tax', '6', '7','tep_cfg_select_option(array(\'None\', \'Standard\', \'Credit Note\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_GV_TAX_CLASS', '0', 'Use the following tax class when treating Gift Voucher as Credit Note.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Credit including Tax', 'MODULE_ORDER_TOTAL_GV_CREDIT_TAX', 'false', 'Add tax to purchased Gift Voucher when crediting to Account', '6', '8','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");

}

 

 

 

And now if you install the modules again you get English text ;-)

Link to comment
Share on other sites

Hmmm I added this define

 

define('MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR', 'Coupon Redemption');

 

to this file

 

catalog/includes/languages/add_ccgvdc_english.php

 

And it worked but now I wonder if there are others that are missing as well as the text that was already defined seems to end abruptly

 

Congratulations, you have redeemed ????

 

Thanks, that worked.

 

I am wondering why more people didn't have this problem??

 

 

 

Also, that French fix sounds pretty complicated? Maybe Ill just stick with the translation!

Link to comment
Share on other sites

Heyo all? :)

 

I have installed last Version from CCGV, all i think works great.

I have setup a 2.50 $ voucher for new users.

 

But in the? create Account email for the new user, i have no clickable link for the voucher.

 

Can anyone help me out, to change this in a clickable link ?

 

I think, it?s than easier for new users in the store.

 

Thanks in advance.

 

Hobbes

 

 

Can anybody answer my question ??

 

Greets

Hobbes

Edited by Hobbes_TheReal
Link to comment
Share on other sites

Can anybody answer my question ??

 

Greets

Hobbes

 

 

There is a fix for that, if I remember correct it is in the ccgv 5.13d version ?

 

anyway I've seen the question before and I am almost certain that the answer is given already, search the topic and you will find it I'm sure ;-)

Edited by jans
Link to comment
Share on other sites

New error I've found:

 

It seems that CCGV cannot calculate Tax Classes with 2 different rates. I have an Ontario store so I need to collect 8% tax in Ontario and 7% tax for all of canada. It re-calculates the tax when it only has to deal with one tax class, but it doesn't work if it has to deal with the two tax classes.

 

Go here and you'll see what I'm talking about if you follow the instructions for your store (not a contribution file, just set up notes).

Link to comment
Share on other sites

Hi guys,

I had the same FRENCH problem in the mudules, which I fixed it with above code. But I still have four more lines in french. In the admin --> Configuration --> My store, the last 4 lines and their descriptions are still in FRENCH. how can I fix that?

 

Thank You

Regards,

Link to comment
Share on other sites

Hi guys,

I had the same FRENCH problem in the mudules, which I fixed it with above code. But I still have four more lines in french. In the admin --> Configuration --> My store, the last 4 lines and their descriptions are still in FRENCH. how can I fix that?

 

Thank You

 

Ok, The last 4 lines are the welcome message. But they are duplicated. I have two of each, and all 4 are in FRENCH.

 

Please let me know how can I change this sections to english.

 

Thanks

Regards,

Link to comment
Share on other sites

Hi guys,

I had the same FRENCH problem in the mudules, which I fixed it with above code. But I still have four more lines in french. In the admin --> Configuration --> My store, the last 4 lines and their descriptions are still in FRENCH. how can I fix that?

 

Thank You

 

 

in the sql that came with the ccgv 5.13d version there are 2 lines that fill the database, replace them with the 2 lines from the 5.13c or 5.13 version and delete all further lines that are in the file( delete all lines after the 2 added files ), then save it under a name like fillDB.sql e.g.

 

now remove all french records from the Db table named " configuration" using mysql admin or something like that tool.

 

now you can run the fillDB.sql you just made, and that should do the trick easely.

 

Before you try that BACK_UP

 

Gr, Jan

Link to comment
Share on other sites

Ok, The last 4 lines are the welcome message. But they are duplicated. I have two of each, and all 4 are in FRENCH.

 

Please let me know how can I change this sections to english.

 

Thanks

 

 

read my last post and be calm my friend ;-)

Link to comment
Share on other sites

read my last post and be calm my friend ;-)

Thank you Jans, but I don't know how to do that. can you walk me through it.

 

And I have three errors with coupons.

 

1- In the shopping cart table, there is a Coupon: more info. The more info button is not working ( I see a error message in the internet explorer status bar.)

 

2- When I enter a coupon code and click on redeem (as a customer) it shows "MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR" above the "Congratulations, you have redeemed" message.

 

3- I have made a discount coupon with $10.00 value. When I use it as a costomer, it gives "$10.00+shipping Price" discount to the customer.

 

4- After I have added the CCGV, my USPS is not working and it is showing "An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner." message.

 

 

 

Would you please let me know how can I fix these problems. I wonder if anyone else had the same problems or not.

Thanks again for your help

Regards,

Link to comment
Share on other sites

Thank you Jans, but I don't know how to do that. can you walk me through it.

 

And I have three errors with coupons.

 

1- In the shopping cart table, there is a Coupon: more info. The more info button is not working ( I see a error message in the internet explorer status bar.)

 

2- When I enter a coupon code and click on redeem (as a customer) it shows "MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR" above the "Congratulations, you have redeemed" message.

 

3- I have made a discount coupon with $10.00 value. When I use it as a costomer, it gives "$10.00+shipping Price" discount to the customer.

 

4- After I have added the CCGV, my USPS is not working and it is showing "An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner." message.

Would you please let me know how can I fix these problems. I wonder if anyone else had the same problems or not.

Thanks again for your help

Ok, about error number 2 I have added

define('MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR', 'Coupon Redemption');

to the catalog/includes/languages/add_ccgvdc_english.php and now It's not whowing the error message, but the looks like the "Congratulations, you have redeemed" message is not complete. What is wrong? anybody has any idea?

and still the discount amount is (Coupon amount+shipping fee).

 

Thank you

Regards,

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