Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Hi. I'm very sorry to interrupt the discussions, but I wanted to ask really quickly what the 'best' version of this contribution is to install. I noticed that the CRE Loaded version uses Credit Class/Gift Voucher/Discount Coupons 5.10b, but I see here (http://www.oscommerce.com/community/contributions,282) that there are many updates since then. I'm just trying to figure out what the best version is to try and install.

 

 

Josh,

To follow up primdudes's post, Molafish is hopefully working on a complete clean up and repack of the contribution, including bug fixes. Both primadude and I have given him a working lsit of bugs that i beleive he is working through so you may want to wait a couple days or PM him

Share this post


Link to post
Share on other sites
Sorry Joe

 

What I did not do was replace the two lines in the \catalog\includes\modules\order_total\ot_coupon.php file

as you suggested a few posts ago. When I did both, it worked.

BTW

I just ignored the differences between your and my file and replaced the FRED lines (or where the FRED lines would have been) with your code.

 

More testing now to see what else needs work.

 

Thanks again.

Josh,

To follow up primdudes's post, Molafish is hopefully working on a complete clean up and repack of the contribution, including bug fixes. Both primadude and I have given him a working lsit of bugs that i beleive he is working through so you may want to wait a couple days or PM him

 

That change was made in 5.15a1 or 5.15a2......

 

As pstrid said, Molafish is working on a repack. I have a test site set up for him to test it as soon as he is ready.......

Share this post


Link to post
Share on other sites
Hi Joe

Thanks for your reply and time.

 

I started with Notes for new install of CCGV, (including updates and forum suggestions) and that did not work.

Then I did Credit Class and Gift Voucher 5.14, (including updates and forum suggestions) and that did not work.

Then CCGV 5.15 (FULL PACKAGE), (including updates and forum suggestions) and that did not work.

Then CCGV 5.15a (Full Package), (including updates) and that did not work.

Then CCGV 5.15a1 Part 1 and Part 2 and that seemed to work.

Finally, I updated with CCGV 5.15a2 Part 1 and 2 (because I wanted the Jonyo stuff), and that seems to work.

There are still problems, but it is almost functional.

So to answer your query, I am pretty sure that it was included in CCGV 5.15a2 Part 1 and 2. Below is the header from the file.

 

<?php

/*

$Id: ot_coupon.php,v 1.1.2.37.3 2004/01/01 22:52:59 Strider Exp $

$Id: ot_coupon.php,v 1.1.2.37 2003/07/24 22:52:59 Strider-Cote Exp $

$Id: ot_coupon.php,v 1.1.2.36 2003/05/14 22:52:59 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com/

 

Copyright ? 2002 osCommerce

 

Released under the GNU General Public License

*

* v5.13a by Rigadin (rigadin@osc-help.net)

---

-- MODS

--

-- 09-11-05 Si Corrections to the redeem message

---

*/

 

 

Leslie, thanks for checking. Since I baselined at CCVG v5.15 this change obviously happened afterwards and I did not see a post on this. So the question is, does your CCGV 5.15a2 Part 1 and 2 code have a problem redeeming when you use Valid Catrgories or Valid Products listed or has my fix helped. I know it helped in CCVG v5.15...

 

Joe

Share this post


Link to post
Share on other sites
Thanks Joe. I tried the new code but still got the error. I think that the problem is with treeview.

Leslie, is TreeView functioning OK but jusdt not redeeming or is Treeview iteslf not working? Did you download the Treeview 1.2 contribution and install the java script, image files and check the bit of php code required? I am not sure what error you are getting...It is working for me so I should be able to help.

 

Joe

Share this post


Link to post
Share on other sites

I have just installed CCGV/Discount coupons 5.15

Can someone tell me why this text is showing up on the left side of the input box of the coupon section - TEXT_ENTER_GV_CODE

Also this may or may not be related, but after I input the coupon code a message at the top of the checkout page says -

The coupon has been successfully applied for <BR>***HOWEVER:No reducion available, please see the coupon restrictions***)

Share this post


Link to post
Share on other sites
Sorry Joe

 

What I did not do was replace the two lines in the \catalog\includes\modules\order_total\ot_coupon.php file

as you suggested a few posts ago. When I did both, it worked.

BTW

I just ignored the differences between your and my file and replaced the FRED lines (or where the FRED lines would have been) with your code.

 

More testing now to see what else needs work.

 

Thanks again.

 

Great Leslie, I am glad it is working so far. Let us all know how it goes...

 

Joe

Share this post


Link to post
Share on other sites
Here is a tip for those that develop on local Windows workstations like I do and then upload to their provider production site. When I want to find some particular code and search all .php files on my dev site for a text string, I use thhe following windows command.

 

This is an example running this command from from my local dev site directory on d:\server\apache\htdocs\catalog:

 

findstr /s /c:"ERROR_REDEEMED_AMOUNT" *.php

 

This will show you every php file that contains the string "ERROR_REDEEMED_AMOUNT". I use this all the time and it works great to track down what php file has the code you are looking for. Hope this tip helps someone... :D

 

Joe

By the way, for those who want to use this great tip...when searching, what is contained in the quotes is case-sensitive

 

For example:

findstr /s /c:"Credits Available" *.php will return different results than findstr /s /c:"credits available" *.php

Share this post


Link to post
Share on other sites
I have just installed CCGV/Discount coupons 5.15

Can someone tell me why this text is showing up on the left side of the input box of the coupon section - TEXT_ENTER_GV_CODE

Also this may or may not be related, but after I input the coupon code a message at the top of the checkout page says -

The coupon has been successfully applied for <BR>***HOWEVER:No reducion available, please see the coupon restrictions***)

 

For the second issue, try entering the coupon code twice and see if it goes through the second time. If so, then this is how I fixed this issue:

 

2x Error Fix

 

 

For the cosmetic text that is displayed, it is easy to change the text. This is what I changed it to:

 

in Catalog/Includes/languages/english/modules/order_total/ot_coupon.php:

 

define('ERROR_REDEEMED_AMOUNT_ZERO', 'a valid coupon number. HOWEVER: This coupon has restrictions that have been exceeded. No reduction will be applied, please see the coupon restrictions that were sent within your offer email***');

 

Can you explain more clearly what your first issue is? Is this happening in Admin or on the Checkout Payment page?

 

Joe

Share this post


Link to post
Share on other sites
I believe what you may have missed here is to execute the SQL commands to add the CCVG tables to your database. You will need to launch your PHPMyAdmin, select your OSC database, Select the SQL tab, paste the SQL commands into the query window and click go

 

Joe

 

What SQL commands am I executing? (Perhaps someone can add a bit more explanation to the install file than, "install the sql"?) Am I supposed to be finding these in the downloaded packages somewhere? (5.15 is what I installed - parts 1 and 2.) Or am I just supposed to "know" what to run? I know absolutely *nothing* about SQL except that it's databases. Honestly, I am going to have to go digging just to find PHPMyAdmin. :) I really, really appreciate all the effort that went into the contribution. (Heaven knows *I* couldn't have done it!) I don't at all want to sound ungrateful; I'm just really confused.

Share this post


Link to post
Share on other sites
What SQL commands am I executing? (Perhaps someone can add a bit more explanation to the install file than, "install the sql"?) Am I supposed to be finding these in the downloaded packages somewhere? (5.15 is what I installed - parts 1 and 2.) Or am I just supposed to "know" what to run? I know absolutely *nothing* about SQL except that it's databases. Honestly, I am going to have to go digging just to find PHPMyAdmin. :) I really, really appreciate all the effort that went into the contribution. (Heaven knows *I* couldn't have done it!) I don't at all want to sound ungrateful; I'm just really confused.

 

You are going to need to find and use your PHPMyAdmin to load the SQL tables. This has to be done for most contributions to function. In the instructions, it does assume you should know how to do this. It states:

 

In the bottom level directory (The same one this document is in) you will find a file ending with .sql. This contains the database definitions for tables that are required by the contribution. These definitions need to be added to the Database that you use for your osCommerce catalog. How you achieve this depends on your installation. The easiest method is to use phpMyAdmin to upload and add the .sql file.

 

The CCVG contribution has a file called "order_total_gv.sql". Use the instructions I posted earlier. Just copy/paste this information into the SQL query window and click GO to update your database. Make sure to do a database backup first before this to be safe.

 

Joe

Share this post


Link to post
Share on other sites
What SQL commands am I executing? (Perhaps someone can add a bit more explanation to the install file than, "install the sql"?) Am I supposed to be finding these in the downloaded packages somewhere? (5.15 is what I installed - parts 1 and 2.) Or am I just supposed to "know" what to run? I know absolutely *nothing* about SQL except that it's databases. Honestly, I am going to have to go digging just to find PHPMyAdmin. :) I really, really appreciate all the effort that went into the contribution. (Heaven knows *I* couldn't have done it!) I don't at all want to sound ungrateful; I'm just really confused.

 

You seem to be a little confused about installing sql, so here goes.

 

I am on a Unix Server. My webhost provides a control panel that I log into. Once logged in I can do lots of things like look at statistics, protect my configuration, etc. In the conrol panel there is MySQL Server (which is my database for OSC because I am on Unix). There is also phpMyAdmin that I use to administer MySQL Server. To run the sql files, I need to go into phpMyAdmin, select the user to configure database via phpMyAdmin, select the database that I want to administer, and then select SQL from the top of the left hand column.

 

At this point I can import the sql file (click on import and then browse to the file location on my PC) or I can copy and paste the contents of the sql file into the Run SQL query/queries on database window.

 

Either way, I then press go and it is done.

 

I am sure that someone else can explain the process better, but I hope this helps.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Joe, i tried your suggestion, and it still does not work.

 

the way i uploaded the files, was made a complete copy of the unzipped files. i matched directories between my ftp and local folder. i slelected each file for that folder from local, and uploaded. once loaded, i deleted them.

 

i might try to do another stock store, and redownload the files again, and try it again tomorrow.

 

Did you sort this out, I'm having the same problem (vanilla store, right version of checkout_payment) Here's what I get when I 'view source' (without identifying stuff):

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
function selectRowEffect(object, buttonSelect) {

 // #################### Begin Added CGV JONYO ######################
 if (!document.checkout_payment.payment[0].disabled){
 // #################### End Added CGV JONYO ######################
if (!selected) {

if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
// #################### Begin Added CGV JONYO ######################
 }
// #################### End Added CGV JONYO ######################
}

function rowOverEffect(object) {

 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}


<br />
<b>Fatal error</b>:  Call to a member function on a non-object in <b>/home/evidence/public_html/copyshop/checkout_payment.php</b> on line <b>174</b><br />

 

If anyone knows when molafish will be ready to release the pulled-together update I'd really really like to know... I'm also wondering how it's so hard to get this thing to work, though my php skills are rudimentary at best...

Share this post


Link to post
Share on other sites

Primadude and Coopco, thanks. The text you quoted regarding the SQL file is not in the install file I downloaded. The part I quoted earlier, about copying the files and installing the SQL, are the full installation instructions in my file. The remainder of the file is the admin configuration settings. However, I have now found the file, copied & pasted it into PHPMyAdmin, and run it, and I guess I did it right because my coupons are available to set up now. Thank you, thank you, thank you! :) (Hopefully, I'll have a better idea of what I'm doing next time, having done this one.)

 

Primadude, this may be a silly question, but if you've edited your coupon at all, are you sure it still has the settings you intended? I noticed that if I go in to edit one of my coupon variables, a bunch of the others revert to defaults.

Share this post


Link to post
Share on other sites
This is the most difficult contribution I have implemented yet but I am finally seeing light at the end of the tunnel. I do not believe there is a fully working version that anyone could install even onto a stock OSC site yet. You will have to make an educated guess and plan on fixing bugs afterwards. The problem is that there are so many variables to test that it takes a lot of time to set up and test each potential situation that a customer would experience...

Joe

Thanks for the info!

 

I should have mentioned in my original post that I only want to use the coupon portion of the contribution, not gift vouchers. All I want to do is setup 'simple' 10% off, 20% off, et. coupon codes. Any thoughts as to whether or not a particular version of CCGV is more stable for just Discount Coupons? Or does the same answer apply regardless of what I need the contribution for?

 

Thanks again!

 

-- Josh

Share this post


Link to post
Share on other sites
Thanks for the info!

 

I should have mentioned in my original post that I only want to use the coupon portion of the contribution, not gift vouchers. All I want to do is setup 'simple' 10% off, 20% off, et. coupon codes. Any thoughts as to whether or not a particular version of CCGV is more stable for just Discount Coupons? Or does the same answer apply regardless of what I need the contribution for?

 

Thanks again!

 

-- Josh

 

 

that's all i'm using it for (or trying) is the discount coupons.. but i can't get the percentage to actually work


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites
and i'm getting the following error

 

MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR

 

any ideas on how to fix this as well

well i found the answer to this one here:

http://forums.oscommerce.com/index.php?sho...10entry778210

 

now if I can just find an answer to my percentages problem.. i'll be alright....

Edited by Mediajuggle

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

I have spent many of hours trying to get this with still no luck. My cart is adding tax on the shipping charges, which it is suppose to do, however the tax added to shipping is not being carried to the final total.

 

Is there anyway for me to simply add tax to the shipping charges for the final total?

 

Example lets say my total tax is $5. My shipping charges tax is $0.50. My cart will show tax is $5, but when you add up the total, it is 50 cents short.

 

The solution seems a like a simple fix but i just can't find it.

 

Thanks again,

Shawn

Share this post


Link to post
Share on other sites
I have spent many of hours trying to get this with still no luck. My cart is adding tax on the shipping charges, which it is suppose to do, however the tax added to shipping is not being carried to the final total.

 

Is there anyway for me to simply add tax to the shipping charges for the final total?

 

Example lets say my total tax is $5. My shipping charges tax is $0.50. My cart will show tax is $5, but when you add up the total, it is 50 cents short.

 

The solution seems a like a simple fix but i just can't find it.

 

Thanks again,

Shawn

 

I don't know if this may help or not.. But I had a similar thing happen to me while testing a different contribution.. Basically, I had to go into Locations/Taxes and then Tax Zones via the admin section.. And then click on the folder "ie. California" Go into it and click insert.. Chose United States and then California as state.. And this should section off taxing for only the area you want taxed.. If you have more states (folders involved) do the same for those as well.. I noticed before I had done any of this above mentioned, that even I was being taxed here in Pennsylvania.. And when I did this.. It worked. So on that note, I hope this helps you out too.. :)

 

Christine


If it ain't broke, don't fix it! :)

Share this post


Link to post
Share on other sites

i had version 5.15 installed..and had the problem of having to push redeem twice..despite applying serevral different fixes for the problem. So i tried version 5.15a, and that gave me even more problems.

 

I think it may have something to do with gloabal registers patch i have installed..

Share this post


Link to post
Share on other sites
I have spent many of hours trying to get this with still no luck. My cart is adding tax on the shipping charges, which it is suppose to do, however the tax added to shipping is not being carried to the final total.

 

Is there anyway for me to simply add tax to the shipping charges for the final total?

 

Example lets say my total tax is $5. My shipping charges tax is $0.50. My cart will show tax is $5, but when you add up the total, it is 50 cents short.

 

The solution seems a like a simple fix but i just can't find it.

 

Thanks again,

Shawn

 

Shawn,

 

Check out the ot_coupons.php file in includes/classes/order_checkout/ot_coupons.php (or something like that -- I'm not looking at my installation).

 

In there, there's a commented tag with the term "VAT" in it. Search for that. Uncomment the code and add your tax rate. See if that works -- I suspect it will.

Share this post


Link to post
Share on other sites
Did you sort this out, I'm having the same problem (vanilla store, right version of checkout_payment) Here's what I get when I 'view source' (without identifying stuff):

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
function selectRowEffect(object, buttonSelect) {

 // #################### Begin Added CGV JONYO ######################
 if (!document.checkout_payment.payment[0].disabled){
 // #################### End Added CGV JONYO ######################
if (!selected) {

if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
// #################### Begin Added CGV JONYO ######################
 }
// #################### End Added CGV JONYO ######################
}

function rowOverEffect(object) {

 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
<br />
<b>Fatal error</b>:  Call to a member function on a non-object in <b>/home/evidence/public_html/copyshop/checkout_payment.php</b> on line <b>174</b><br />

 

If anyone knows when molafish will be ready to release the pulled-together update I'd really really like to know... I'm also wondering how it's so hard to get this thing to work, though my php skills are rudimentary at best...

 

Yeah - I'm the same issue with a new install and 5.151a install.. I'm looking into it..

Share this post


Link to post
Share on other sites
Primadude and Coopco, thanks. The text you quoted regarding the SQL file is not in the install file I downloaded. The part I quoted earlier, about copying the files and installing the SQL, are the full installation instructions in my file. The remainder of the file is the admin configuration settings. However, I have now found the file, copied & pasted it into PHPMyAdmin, and run it, and I guess I did it right because my coupons are available to set up now. Thank you, thank you, thank you! :) (Hopefully, I'll have a better idea of what I'm doing next time, having done this one.)

 

Primadude, this may be a silly question, but if you've edited your coupon at all, are you sure it still has the settings you intended? I noticed that if I go in to edit one of my coupon variables, a bunch of the others revert to defaults.

 

Leslie, yes I noticed that quirk when you edit a coupon, it puts in some default values that you need to reset if you re-save the coupon...

 

Joe

Share this post


Link to post
Share on other sites
Hey, I'm using 5.13a and whenever I add a percentage in the amount field... like 50% and it looks fine in preview, but when I submit it, it changes to $50.00 instead of a percentage.

 

How do I correct this?

 

Cartel,

 

This happens when you have selected the Free Shipping checkbox. Percent seems to work only when Free Shipping is deselected. Not if this was by design or not.

 

Joe

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

×