Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

I've had CCGV installed on my site for a while now, but I just noticed that only $ off works, if I take a percentage off, the coupon simply doesn't work.

 

Unfortunately I'm not sure what version of the contribution I have installed (how can I tell?)

 

Does anyone know if this was a known problem that has an easy fix, instead of re-installing the newest version with 99 file changes?

 

Thanks in advance for your help!

Share this post


Link to post
Share on other sites

Hobbzilla: Hey Ryan, actually I did find it (or maybe it found me) and it is being tested now.

 

Mibble: Yes it has gotten kind of confusing hasn't it. The last one I put up was 5.10b and then a bunch of people have added some strange things to it. Some things that have been put up are really good of course and I will include them in the next release, some things I have no idea why they put them up.

 

renesam: I have no idea about the rewards module. Do you have a contribution number for it?

 

nyderrn: it is actually done in shopping_cart->calculate. It also depends on whether you are doing the table by weight, price or count. I think the normal table.php uses just weight and price.

 

bobc: I think I answered this just the other day. In 5.10b at least, free shipping and discount amount are mutually exclusive and free shipping takes precedence. You can have a free shipping coupon and a discount coupon but only one coupon works at a time.

 

volumax: yes they are the same. I apologize, I tried to make sure the tables were setup correctly. Thank you for bringing it to my attention.

 

CatDadRick: I don't know anything about linda's version. I do know the 5.10x is for 2.2.2 of osc and will not work with pre 2.2.2 versions. There actually isn't an upgrade path from previous versions of code I don't believe. But if you would like to hammer one out that would be great.

 

papirazzi: I have no knowledge of what 5.10c is or does.

 

siavash: if you don't have a products weight set it will bypass shipping. I have no idea about your payment page. sort order needs to be something like

sub=1

discount=9

gv=799

total=800

 

and put anything else where you think your business rules need to be.

the redemption of the gv is not complete til they login or signup, so yes they can use it again.

and yes the only place to redeem a voucher is through the email link or on the checkout_payment page

 

NextLevelMotoring: if you have "Id: ot_coupon.php,v 1.1.2.37.3 2004/01/01 22:52:59 Strider Exp $" in the ot_coupon file there is a good chance that you have 5.10b ... if not you might want to try 5.10b I know that percentages work in that release.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Strider,

 

Thanks for reply.

 

Linda's 'Shoppe Enhancement Controller' is OSC 2.2 MS2 with a bunch of contribs already installed, including Ian Wilson's CCGV.

 

I compared the new files in CCGV-5.10c with the CCGV that I have and many of them were identical, so I decided to give it a shot. I backed up my store and then copied all of your new files over mine. I'm now looking at the modified OSC files to see if anything needs changing, but so far nothing does, and my shop works fine with CCGV-5.10c.

 

Thanks,

Rick Knight

Share this post


Link to post
Share on other sites

Strider,

 

5.10c is basically the same as CCGV 5.10b.

 

--- excerpt from contrib section ---

26 Jun 2004 - ccgv-510c Author: Steel Shadow

I fixed a slight bug in the admin so that now when you click on the Catagory's title it will open the catagory, and show the first subcatagory instead of just staying on what ever catagory you where on before.

----

 

but the main thing is that certain functions used by the CCGV 5.10x contrib ( such as create_coupon_code) seems to generate an error stating it is an undefined function. Shouldn't these functions be defined in \includes\general.php ? I've also sent you an e-mail with more in depth explanations. Either way I can't find where these functions are defined....

 

Thanks,

Anouar

Share this post


Link to post
Share on other sites
I've also sent you an e-mail with more in depth explanations

 

items like this should be listed in the forum so others who know a bit about the module can contribute. this only makes others weary when reading this.

 

me, makes me wonder ok what will this do to my sites and items if someone uses them . ..


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
nyderm: In the standard release there is a bug if you are using table based shipping. you are correct if there is only the gift voucher it works ok but if more than one item all items get set for the table rate. I think it is changed in the table.php file and it needs to check for virtual_count instead of product_count or something like that.

 

nyderrn: it is actually done in shopping_cart->calculate. It also depends on whether you are doing the table by weight, price or count. I think the normal table.php uses just weight and price.

Hi,

 

Thanks for the reply. I'm using table rate as stated and using price as the determining factor in the calculation. Is there a way around this or a fix that I can apply? Or, should I just inform the cusotmer that it would be in thier best interest to buy gift vouchers separately?

 

 

Thanks for your time and patience,

 

Tim

Share this post


Link to post
Share on other sites

Thanks for the reply Strider.

I've tried reinstalling some elements and clearig everything in the values of the SQL - sometimes that works. And it was all going so well :unsure:

the tread for the reward contribution is: http://forums.oscommerce.com/index.php?act=ST&f=7&t=100155

I've asked for help there as well, but no reply yet. I was reading the coding in the order total and it says that there will be another section for credits so the customer can use vouchers or reward points, so I'm guessing the credit class system already has it in place to deal with the reward points contribution. They just don't seem to work together. I'd rather have the gift vouchers and discounts working again then the reward points.

 

Thanks again for getting back to me.

 

Rene B)

Share this post


Link to post
Share on other sites

Thanks for the reply Strider - I have identified my version and it looks like I do have 5.10b. Percentage discounts aren't working for me though, any suggestions of which files might affect that, so I can re-edit a few files to troubleshoot rather than going through all 99?

Share this post


Link to post
Share on other sites

CatDadRick: glad to hear it works for you

 

papirazzi: hmmm ... 5.10c is a single line of code that does a filename call instead of a basename call. I don't understand why anyone would do a release for that but if it helps you fine. as far as the errors you talked about from function calls i.e. create_coupon_code ... they are placed in the file add_ccgvdc_application_top.php which should be included in your app top file so you should never get an error from that if you installed the mod correctly. Why they are not put in general is very simple, they are not used for general coding. I suppose some might think of general as being a catchall for all mods functions etc but I don't. If you personally would like to place that code in there you can but I think you might have a bunch of spaghetti instead of a well defined mod.

 

mibble: some things just aren't worth worrying about.

 

nyderrn: I will try to find the code for it but I can tell you it will take a while to find it. I apologize but I am just overwhelmed at the present moment.

 

renesam: wow ... blue wrote that along time ago...lol I never saw it before... but blue was/is pretty good I will try to find it in the contribs and look it over. there shouldn't be any conflicts but who knows...

 

NextLevelMotoring: I tested it out and it works ok. You might make sure your coupon amount has a percent sign in the value i.e. 10% and it should work fine.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Hello,

 

I have read through most of this forum but have not found a solution to my problem.

 

I have checked the sort order

 

dc 4

gv 5

low order fee

ship 2

subtotal 1

Tax 3

Total 6

 

and it still doesnt work. I have reinstalled the contrib and patches several times, and everything works, except I cannot get the gift voucher balance to go down after successfully purchaing something. I can generate gv's, and redeem them and using phpmyadmin to see, everything is showing up in the db tables.

 

I have seen this problem of not deducting posted in the forums, but teh answer that worked (modify sort order) is not working for me.

 

Any ideas why the balance will not deduct correctly?

 

Thanks,

 

Tom

Share this post


Link to post
Share on other sites

Continuing my last post.... After more troubleshooting, I have found that the Gift Voucher balance will be correctly deducted only when using Paypal as payment method. If using either check or Credit card, the gv balance will not go down.

 

Getting closer to a solution, any ideas?

 

Thanks,

 

Tom

Share this post


Link to post
Share on other sites

Very nice system... finally got it to work after tweaking and reading and installing patches/fixes.

 

Running some tests...and have a failure. Read here that others have same trouble.

 

It is the part when a Gift Certificate is purchased (Say 25$ [GIFT25]), when that is the only thing in the cart....Confirm order goes back to select payment type.

If anything esle is in the cart...the purchase is a success. :D

 

It doesn't matter how many Gift Certificates are added...if nothing else is in the cart, the purchase fails. <_<

 

Is there something that can be done to fix this?

 

It would be GREAT if someone created a new release with full instructions.

 

I have both the enhanced address and RMA system installed as well.

 

Any help is appreciated... :)

Thanks

Share this post


Link to post
Share on other sites

First I have no idea what patches people are talking about. All of the patches that I have seen have been wrong on here and I have tried to mention this unless they were just so far off the wall that I wondered how anyone could think that a particular code snippet would work. So far unless you are doing french or chinese languages there really isn't any patches for 5.10b and since 5.10c is just a filename_coupon instead of a basename call on one line I don't consider that a ... well anyway ...

 

tfreeland: Usually if it isn't deducting it is because you have not modified checkout_process properly. You can usually tell if the mod is going to work based on the checkout_confirmimation page. depending on which paypal you are using would depend on how your system operates. since you needed to modify order payment and order total files you might see if check/cc work without using the gv then try it with it.

 

VNekic: It sounds like you don't have your gv options in modules->ordertotal->gift voucher set correctly, and in particular tax and shipping included.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Hey Strider,

 

VNekic: It sounds like you don't have your gv options in modules->ordertotal->gift voucher set correctly, and in particular tax and shipping included.

 

Thanks for the response...

Unfortuneately, I dont' understand your fix for me. I have tried the documentations defaults

 

Discount Coupon

Display Total

true

Sort Order

9

Include Shipping

true

Include Tax

true

Re-calculate Tax

None

Tax Class

--none--

 

 

 

The default settings for the Gift Voucher is as follows:

 

Gift Vouchers

Display Total

true

Sort Order

740

Queue Purchases

true

Include Shipping

true

Include Tax

true

Re-calculate Tax

None

Tax Class

--none--

Credit including Tax

false

 

Including, what was posted here of setting Gift to 799 and Total to 900. None of which works to confirm order. The process continually goes back to "Payment Information" screen.

 

Is there somethings I should try or check in codes ?!?!

Share this post


Link to post
Share on other sites

Strider-

 

Ok..did another test... nothing worked. I went ahead and added weight (1 lb) to a $25 gift certificate and it went through with no problems.

 

What does that say?

 

Thanks in advance... :)

Share this post


Link to post
Share on other sites

well that looks ok .. but let's go back to the beginning just so I can understand. I am kind of slow you know.

In your first statement you said

It is the part when a Gift Certificate is purchased (Say 25$ [GIFT25]), when that is the only thing in the cart....Confirm order goes back to select payment type.

If anything esle is in the cart...the purchase is a success.

If you are trying to purchase a gift cert then I must admit I have never heard of this problem.

But then I am not familiar with the enhanced address system either ... I don't think the rma would have anything to do with it.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

try enabling downloads. with a weight of 0


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Strider -

 

Found the bug.... don't know why since I am not a guru here... but, will look into the code in a bit.

 

4 Sep 2004 - CCGV 510c Bug Fix - by Chris Martin

 

The checkout_shipping.php he included for the Ryan Hobbs' Address Enhancer (which I have) and many others here is the issue.

 

Can you check his code and see what might be the issue. If I use the orginal, purchasing the Gift Voucher by itself works fine.

 

Shew! To dig up the issues.

 

Thanks!

 

Link to contributes section

http://www.oscommerce.com/community/contri...y,all/search,gv

Share this post


Link to post
Share on other sites

Ok... finally figured out the BUG...

 

Please verify..as I have no idea why Chris Martin did this...he reported it as a bug fix.

 

Fix: Open catalogue/checkout_shipping.php where 'catalogue' is your store directory, for example 'catalog' on a default install. Search for the following (around lines 80-90 in my copy):

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

// ICW CREDIT CLASS GV AMENDED LINE BELOW

// if ($order->content_type == 'virtual') {

if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) {

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

$sendto = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

Change:

 

$sendto = false;

 

To:

 

tep_session_unregister('sendto');

 

If I change this, I get the issue where it continually goes back to "Payment Information". I put it back to "$sendto = false;" and check was successful with only a Gift Voucher in cart.

 

Any ideas why this was done.... what is your recommendation Strider?

 

Thanks, hope this helps some. :)

Share this post


Link to post
Share on other sites

Here is a new question...

 

- DELETE Gift Voucher in Queue:

 

 

This has to do with admin.... Gift Voucher Release Queue

 

I see that we can REDEEM.... how do we delete... (payment didn't go through with money order/check)

 

Short of deleting from database itself. A delete button would tie this up nicely!

Share this post


Link to post
Share on other sites

Question on redeeming gift vouchers:

 

If a person does not already have an account at my store, they can still click the redeem link and the voucher will show in their credits. I assume a cookie tracks the voucher on their browser.

 

But if they switch browsers or computers, this will be gone. I want them to have to create an account first before redeeming. I've put text to this effect in the redeem message, but it would be better to have a foolproof way to do this.

 

Susan

Share this post


Link to post
Share on other sites
Question on redeeming gift vouchers:

 

If a person does not already have an account at my store, they can still click the redeem link and the voucher will show in their credits. I assume a cookie tracks the voucher on their browser.

 

But if they switch browsers or computers, this will be gone. I want them to have to create an account first before redeeming. I've put text to this effect in the redeem message, but it would be better to have a foolproof way to do this.

 

Susan

Susan,

 

The system is designed to do that. Anyone with the code can redeem this coupon. It will be posted to their guest account and it will stay there until they create an account, log in to thier account ...or leave.

 

If they leave, they will have to redeem it again through thier email or at checkout.

 

----

It shows up in the guest cart...but, only does them any good if they want to purchase. If they try to purchase, system will force them to log in or create an account.

 

So, as you can see, it is fool proof. It's like a customer walking into the store with thier coupon... Does them no good until time of purchase. To puchase, they will identify themselves.

 

This is why they get a redeem code...to resubmit it when they are ready to create an account.. (for a purchase...for example)

Share this post


Link to post
Share on other sites

Looking over FREE SHIPPING Discount... I see an issue.

 

I made a purchase and got the following results.

Sub-Total: $1,936.95

United Parcel Service (1 x 10lbs) (Ground): $7.90

Discount Coupons:03d81a: -$7.90

FL TAX 7.0%: $136.14

Total: $2,073.09

 

 

Sub + Shipping = TAX. Even though the shipping was removed. It should

only TAX the Sub-total.

 

How do I get it to only tax sub and not shipping when the -7.90 was applied?

 

My order is set to...

 

Discount Coupons 760

Gift Vouchers 740

Shipping 2

Sub-Total 1

Tax 800

Total 900

 

Discount Coupons (edited to)

Display Total

Do you want to display the Discount Coupon value?

 

true

 

Sort Order 760

 

Include Shipping

Include Shipping in calculation

 

true

 

Include Tax

Include Tax in calculation.

 

true

 

Re-Calculate Tax

 

None

 

Tax Class

Use the following tax class when treating Discount Coupon as Credit Note.

--none--Taxable Goods

 

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

 

Thanks in advance if anyone knows this one...

Share this post


Link to post
Share on other sites

interesting... thanks for the update for people that try that...

on the discount coupons try recalculating taxes=true for dc's and with a sort order of taxes above dc's ie dc=9 tax=10 or something like that and it should work ok.

you really need to be careful when using mods... especially when they call other sites as some have been known to do.

what does address enhancer do?


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Address Enhancer basically creates additional street address lines, moves telephone & fax from customer's table to address_book and also creates default ship to & default bill to address book entries instead of just 1 default address book entry. It also allows you to name address book entries (i.e. WORK, HOME, etc.). Nothing crazy!

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

×