Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Just completed CCGV5.15a2 - clean install

I've been working on installing this CCGV for a month. I have to say that 5.15a2 is the best version yet. I only have 1 error.

 

Can someone give me a quick fix for this... The currency has changed to Euro's.

 

I did the admin - configuration - default currency button. The problem is that I cannot get back to US dollars at all.

 

Any suggestions?

 

Kym

 

Maybe in catalog\includes\languages\english.php

my lines 51 and 52 reads (because I am in Australia)

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'AUD');


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
It's been said before but is still a very clumsy and long-winded solution to the problem, especially for those with a lot of mods already installed as the highlighted differences can be huge in some cases and sorting through them, especially for novices, can be a big task.

 

Amazing for such a big and popular contribution that nobody has written a simple guide with the changes listed as most of the better mods have. I may try giving it a go myself if I can find some time as it so badly needs doing.

 

You'd have a list full of 'put this code between this and this' BC etc automatically show you where the code differs, with colour highlighting, that's the point. Even doing a 'find' in a decent code editing program would be less clear and far longer-winded, I think. But hey, knock yourself out ;)

Share this post


Link to post
Share on other sites
Maybe in catalog\includes\languages\english.php

my lines 51 and 52 reads (because I am in Australia)

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'AUD');

 

That did the trick. Thanks a bunch.

 

Kym

Share this post


Link to post
Share on other sites

Hi,

 

I messaged molafish about helping test this contribution but have had no reply.

 

I'm still available to test if needed.

Share this post


Link to post
Share on other sites
Been said before and will no doubt be said again ;) A file-comparing thing will help you loads, Beyond Compare is excellent and well worth the money as one can compare folders and files via ftp as well as locally. What I do is have a server installed here on my laptop, I used xampp for this, very neat package, though there are others. I install a 'clean' version of oscommerce, install the contribution, make sure it works OK as far as I can (still need to suss out getting it to send emails without connecting it to the 'net) then use the comparison program to copy the relevant changes to the right bits of the files on the copy of the 'live' shop that I also have on the local server, (just don't change the 'configure.php' files!!) make sure that works, then again with the comparison program to upload the changes to the real shop. I might be the only one who's so long-winded about it, mind you!!

 

Database edits are done by using the .sql file(s) in the contribution folder(s) in the sql admin program on your site's control panel, mine's phpMyAdmin.

 

HTH :)

 

Try Textpad. It has file diff capability. It has other useful text editing features too like syntax highlighting, customizable modules, and line number matching for command line tools (configurable). I don't know if the demo is time limited or feature limited...

 

 

It's been said before but is still a very clumsy and long-winded solution to the problem, especially for those with a lot of mods already installed as the highlighted differences can be huge in some cases and sorting through them, especially for novices, can be a big task.

 

Amazing for such a big and popular contribution that nobody has written a simple guide with the changes listed as most of the better mods have. I may try giving it a go myself if I can find some time as it so badly needs doing.

 

Many have already done it. Open the install instructions for the contribs on the ccgv contrib page. There are line by line instructions in some. However, I don't know if 5.15a1 or a2 have those instructions. I have built comprehensive instructions for modded stores in the release I'm working on.

 

 

Hi,

 

I messaged molafish about helping test this contribution but have had no reply.

 

I'm still available to test if needed.

 

I have now replied. I am currently testing the code myself (in a sort of alpha phase). After that has been finished, I will ask for greater widespread beta testing from others here. But before doing that, I will post the contrib so that you can all download it, in keeping with the forum rules.

 

Sorry if it seems I'm not around. I do have full time school, 3 part time jobs, and on the side programming work to load balance...

Share this post


Link to post
Share on other sites

Hi guys...

 

I just installed version CCGV5_15_a2 and it was a beaut! Mostly because I had to go through alot of files that already had code on them from my admin w/access levels installed.. That was mostly in the admin section anyways.. But still. WOW! lol It was a good 6 hour project.. And I ran into a few bugs like mentioned above as well..

 

For one.. That java error on the checkout_payment page.. I found by fixing the order in which they're supposed to be in via the admin side in order totals.. That , that error went away.. Hope this info helps anyone who may need it..

 

My problem is this.. I went into admin and then to Vouchers.. And I tried to create one.. Clicked "insert" and when i got to the bottom of the page.. I found this error by the start date area where you would implement a start date for your coupon that you're creating.. Ya know what I mean?

 

Start Date:

Fatal error: Call to undefined function: tep_draw_date_selector() in /home/cozytest/public_html/admin/coupon_admin.php on line 710

 

I need some help with this one.. And Shane.. I can't wait for your next release.. :thumbsup:

 

Thanks in advance..

 

Christine


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

Share this post


Link to post
Share on other sites
Been said before and will no doubt be said again ;) A file-comparing thing will help you loads, Beyond Compare is excellent and well worth the money as one can compare folders and files via ftp as well as locally.

 

Also try winmerge, it does the same and is a free open source project as well. It helps especially if you have 2 different contributions changing the same exact code and not just adding new lines. It gives you the opportunity to find these pieces of code quickly and edit it appropriately. Probably not going to work for complete newbies but if you have any idea of PHP (or programming in general) it should help you out.

Share this post


Link to post
Share on other sites

Thank you, I think I got it working. Winmerge is Very helpful

 

one minor problem: in Module->Payment, Gift Vouchers (-) in french (others are fine), why?

Gift Vouchers

 

Affichage

true

 

Ordre de tri

740

 

Ch?ques en attente

true

 

Livraison

true

 

Taxe

true

 

Mode de calcule

None

 

Type de Taxe

--none--

 

Inclure taxe

false

Share this post


Link to post
Share on other sites

how can i use the "Voucher Balance" in my account?

 

There's no "extra box" as described in the faq.

 

When I click the $5 in Payment Method, I got a Javascrpt error from IE:

 

Line:56
Char:1
Error:'document.checkout_payment.cot_gv' is null or not an object
Code:0
URL: xxxxxxxxxx/checkout_payment.php

Edited by henryho

Share this post


Link to post
Share on other sites

Is this a bug in Gift Voucher?

 

 

I tried "Send Gift Voucher To Customers" to myself, and this is the e-mail i got:

The Gift Voucher is worth $10.00

 

To redeem this Gift Voucher, please click on the link below. Please also write

down the redemption code which is afe953 in case you have any problems.

 

/shifeon/catalog/gv_redeem.php?gv_no=afe953

 

or visit /shifeon/catalog/ and enter the code during the checkout process

 

Links in Red is not a complete URL.... why?

 

Thank you very much

Share this post


Link to post
Share on other sites
Thank you, I think I got it working. Winmerge is Very helpful

 

one minor problem: in Module->Payment, Gift Vouchers (-) in french (others are fine), why?

 

There is a translated to english file in the contribution pages as an update to sort this out for you.

Share this post


Link to post
Share on other sites
how can i use the "Voucher Balance" in my account?

 

There's no "extra box" as described in the faq.

 

When I click the $5 in Payment Method, I got a Javascrpt error from IE:

 

Line:56
Char:1
Error:'document.checkout_payment.cot_gv' is null or not an object
Code:0
URL: xxxxxxxxxx/checkout_payment.php

 

 

does this look normal?

 

I have $5 in voucher account, but how do i use it during checkout?

screen.GIF

 

 

Both indicate you have a fault with the checkout_payment.php check installation of extra code in this file.

 

also the image of you shop where it says $5 dollars it should come out as $5 to be used from Gift Vouchers plus a square checkbox to the right.

 

have you installed the module in your admin? plus have you added all the language files?

Share this post


Link to post
Share on other sites

I got 2 questions. How do you get PayPal to work? Because I am getting lot's of errors like these:

 

Warning: before_process(includes/modules/payment/paypal/classes/osC/osC.class.php): failed to open stream:

 

And where you can enter your code for getting discount I see TEXT_ENTER_GV_CODE instead of Enter Redeem Code. How can I fix that?

 

Thank you very much!

Share this post


Link to post
Share on other sites
I got 2 questions. How do you get PayPal to work? Because I am getting lot's of errors like these:

 

Warning: before_process(includes/modules/payment/paypal/classes/osC/osC.class.php): failed to open stream:

 

And where you can enter your code for getting discount I see TEXT_ENTER_GV_CODE instead of Enter Redeem Code. How can I fix that?

 

Thank you very much!

 

The paypal modules supplied with the Credit Class/Gift Vouchers/Discount Coupons 5.10 is not complete i believe if you go to the author own website http://www.devosc.com/ you can download the full package PayPal_Shopping_Cart_IPN you will find in this includes/modules/payment/paypal/classes/osC/osC.class.php which is on of many that is not supplied.

 

You second problem you have not installed all your language files. The one in question is includes/languages/english/modules/order_total/ot_gv.php plus check you have file ot_coupon.php in the same folder.

 

Hope that is of some help

Share this post


Link to post
Share on other sites
The paypal modules supplied with the Credit Class/Gift Vouchers/Discount Coupons 5.10 is not complete i believe if you go to the author own website http://www.devosc.com/ you can download the full package PayPal_Shopping_Cart_IPN you will find in this includes/modules/payment/paypal/classes/osC/osC.class.php which is on of many that is not supplied.

 

You second problem you have not installed all your language files. The one in question is includes/languages/english/modules/order_total/ot_gv.php plus check you have file ot_coupon.php in the same folder.

 

Hope that is of some help

Okay about the first answer I will get to you back on a later time since it does require some time to install.

 

The second answer you gave:

Those two files are in the folder you supplied. And when I open ot_gv.php in Notepad I can see this: define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code '); So that means the variable is defined. But it doesn't show up during checkout.

Share this post


Link to post
Share on other sites

Okay the PayPal module works fine now! Thank you very much!

 

But the other problem is still there. Hope you can help me with that.

 

Thanks!

Share this post


Link to post
Share on other sites
Okay the PayPal module works fine now! Thank you very much!

 

But the other problem is still there. Hope you can help me with that.

 

Thanks!

 

i can't really answer that if all language files are there and in there right folders it should show up?

 

all i can say is try adding the define line to your english.php and see if then it shows up.

 

come back and say the result

Share this post


Link to post
Share on other sites

The words (and click) on the checkout_payment.php does anyone know were this is found? i wish to delete it so you have box followed by button no text inbetween.

Share this post


Link to post
Share on other sites
Got everything installed (not easy with all of the purchase-without-account mods and such), and it seems to work so far, but the coupon redemption box is formatted weird. It's the one titled 'Credits Available' and has the text about 'Enter code below'. That text is on the right side, entry blank is on the left below it, and the Redeem button is below that. Works OK, looks ugly. What am I doing wrong?

 

I have the same problem. Anybody have any ideas. I am having a hard time following the layout of the table. It seems to span several files, or I just don't understand how it works.

 

Michael

Share this post


Link to post
Share on other sites
Has anyone had or got the same problem i'm getting in the coupon_admin.php this part doesn't load up on page what is the problem? does anyone know?

 

<td align="left" class="main"><?php echo COUPON_STARTDATE; ?></td>

<td align="left"><?php echo tep_draw_date_selector('coupon_startdate', mktime(0,0,0, $coupon_startdate[1], $coupon_startdate[2], $coupon_startdate[0], 0)); ?></td>

<td align="left" class="main"><?php echo COUPON_STARTDATE_HELP; ?></td>

</tr>

<tr>

<td align="left" class="main"><?php echo COUPON_FINISHDATE; ?></td>

<td align="left"><?php echo tep_draw_date_selector('coupon_finishdate', mktime(0,0,0, $coupon_finishdate[1], $coupon_finishdate[2], $coupon_finishdate[0], 0)); ?></td>

<td align="left" class="main"><?php echo COUPON_FINISHDATE_HELP; ?></td>

</tr>

<tr>

<td align="left"><?php echo tep_image_submit('button_preview.gif',IMAGE_PREVIEW); ?></td>

<td align="left"><?php echo '  <a href="' . tep_href_link('coupon_admin.php', ''); ?>"><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>

</td>

</tr>

</td></table></form>

</tr>

 

</table></td>

Please help me out here

 

 

Still need help on this bit can anyone help me out here?

Share this post


Link to post
Share on other sites

Hi there

 

I've done a bit of a search back through the pages but cant find a solution to a problem i'm having.

 

The problem is when i create a new discount code (the one i'm doing is a 5% discount) in OSCommerce admin, i can never select a correct End Date. The end date defaults to exactly 1 year into the future, from when i set the start date.

 

I can pick the new date, and preview it, but when I click insert it goes automatically to 1 year on from the coupon's start date.... (meaning i view its details and i see the wrong date).

 

Is this a known problem - can anyone offer any insights?

 

I have Paypal IPN, Ultimate SEO, Shipsched date picked, all installed - but i dont see how they would offer a direct conflict.

 

Many Thanks

David

Share this post


Link to post
Share on other sites
Testing of a 10% coupon redemption functioned normally until I tried to restrict the coupon to specific products or categories using the Valid Product List or Valid Categories List. When I redeemed coupons that were in the Valid Product List or Valid Category List, the redeem produced an error indicating the coupon was good:

 

In /catalog/includes/modules/order_total/ot_coupon.php, find this line in two places in "Function calculate_credit($amount)"

 

$pr_c = $this->product_price($pr_ids[$ii]); //Fred 2003-10-28, fix for the row above, otherwise the discount is calc based on price excl VAT!

 

Comment the lines out and replace it with this:

 

$pr_c = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);

 

If anyone has made this change and incorporates taxes in the coupon value, let me know if your order total math is coming out correct.

 

Fred's code doesn't work because $cart is not set when he called product_price(). But I fail to see why we need Fred's change, because I am unfamiliar with the VAT shop setup. Somebody let me know how this works out with your tax settings (I don't let coupons deduct the tax amount).

Share this post


Link to post
Share on other sites
Still need help on this bit can anyone help me out here?

 

There are different sections of code that display based on which action mode was passed to the page.

 

What is the action GET variable when you are having the problem? And what section of the $action switch is this code in? It looks like the 'new' case...

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

×