Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

HI

 

From the Coupon Admin page. is ther any way to copy a coupon?

 

We have to generate several hundred coupons for a single item. all the coupons will have all the same info (price, date, product etc). Instead of having to enter several hundres one at a time. Is there a way to copy the coupon with a unique Coupon Code?

 

 

thanks

 

Joe


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

Long Island, New York

Share this post


Link to post
Share on other sites

susie: you didn't include your add_ccgvdc_english.php in your english file

 

nyklen: on line 40 of ot_coupon.php change none to None. Also you need to decide if your going to recalc tax. I don't know what moms is (well maybe the diner down the street) so if you don't include tax or recalc tax it leaves the tax alone and if your running 10% tax then that would be where your 10$ came from.


(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

Hi, I don't know if this problem has already come up, but I've been looking around a lot.

 

I've installed the mod once with haste, and again more carefully and I think I've got all the settings right. However!

 

*Vouchers are added to someones account easily enough, shows up in the shopping cart, pays for items.... but doesn't subtract the amount when the item has been bought. I also have it set to queue purchase, doesn't do that either.

*Just a side note, I try and install coupon order total module and it seems to work, but doesn't give me any options. Just displays the install button again.

 

I've gone deep into the code to try and find something, but I think I've come up empty handed. Anyone?

Share this post


Link to post
Share on other sites

I've installed this mod TWICE now, and I still can't find where to put the coupon # anywhere on the catalog. :angry:

 

Can someone help me out?

 

Thanks. :\

Share this post


Link to post
Share on other sites
whats the difference between Discount Coupon and Gift Vaucher?

 

Hi Jaleel,

the concept of discount coupon and gift voucher are similar but GV's can act as ordinary products in the store and you may buy and give them away

 

I've searched the forums and the above quote is the closest I have come to an answer regarding my problem. I would like to offer GV's for customers to buy and give as gifts but cannot see how to add them. I did go into admin->Vouchers/Coupons->Coupon Admin and inserted a new coupon. But I don't see any way to insert a GV. Or are they considered the same when adding them? If the above post is accurate, then it would seem that it is possible. Does anyone know how to add a GV to a stores products?

 

Jack

Share this post


Link to post
Share on other sites

Strider,

 

I have MS2.2 and I am sitting here debating on installing per my bosses request. I have a question regarding create_account_process.php I dont have this file and I see it noted it was depreciated in 2.2 so what do I need out of this file to put into create_account.php? Is this already done in this release and I can disregard the file all together.

 

The install file kind of leaves you hanging at that point if you dont have that file.

 

Thx for the mod. Will await a response before atempting install

 

Eric

Share this post


Link to post
Share on other sites

From what I understand, if you don't have the file then you don't need it. I don't have it on my installation either and it works. There are some problems I am having that I have not been able to get answered but hopefully someone will respond eventually.

 

//venting mode on

You are right about the docs but I've found that that is true of most of these contributions. It wouldn't be so bad if there was a better way of getting answers to the problems but it seems that once soneone has the contribution installed, they have no interest in helping others. If is a very frustrating procedure.

//venting mode off

 

Jack

Share this post


Link to post
Share on other sites

This is weird

 

 

When I Mail Gift Voucher and receive the email, I click the link to redeeme the voucher. I procced to the check out and get an error message that says im using an invalid gift voucher code. When i check the databse it shows the voucher has been redeemed and is not active.

 

The next gift voucher i sent i did not cilk the link in the email. instead i went to the store, proceeded to check out and entered the voucher code. This time the code was taken, but the $10.00 from the voucher was not deducted from the price of the order. What did happen was it added the $10.00 to the balance of my voucher account

 

So now i have paid full price for the order, but have $20.00 worth of gift vouchers.

 

Has anyone heard of this problem before. I have been over the code but could not find the problem.

 

 

Thanks

 

Joe


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

Long Island, New York

Share this post


Link to post
Share on other sites

I apologize with not answering these sooner I didn't receive and email or anything telling me that there were any posts to this forum

 

skurge: there is a checkbox that needs to be checked for the voucher to be used. This checkbox is located on the checkout page where you enter payment information. That is how the voucher knows it needs to be used.

 

Nitro187: You enter the coupon and voucher codes, numbers or whatever you want to call them in the payment information page. The coupon will automatically be used when entered and you press redeem. The voucher will be added to the customers voucher balance and if they want to use them they will need to check the checkbox that is located in the same table. Also in rereading your question you don't put discount coupons on the site as a product per se I suppose you could put them somewhere in the text for people to use but they aren't a product per se.

 

Gift Voucher's are not automatically used, the user needs to check the checkbox after redeeming them whereas the discount certificate is automatically used when redeemed.

 

This is the last time I am answering this question:

Jack_mcs: For the 400th time in this thread alone, gift vouchers are a product that you create just like any other product except the model number HAS TO BEGIN WITH GIFT just as you put in your other posts from a quote from crash. To answer the other question you posed in the other thread if you have the gift voucher set to be queued which is suggested then you will need to ok the queued voucher in admin->vouchers-coupons->gift voucher queue and press the redeem button while you have the voucher you want selected. If you don't want to do it with the queue please tell me where your shop is so I can go buy gift vouchers and pay with money orders...

 

 

ehask: I think the doc said that create_account_process.php was deprecated and rolled into create_account.php .. which means that you don't need create_account_process.php and that create_account.php has the code from create_account_process.php placed in it.

 

 

applelinks: I am kind of confused here. On one part you said when you clicked on the voucher link from the email you received an error invalid gift voucher code. Yet in the second part you said you had entered the code of a 10$ voucher and it worked ok and now you had 20$ in your voucher account. So those numbers don't add up. To use the voucher you need to click the checkbox as stated in the beginning of this individual post.


(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

skurge: I apologize, I didn't read your post correctly

*Vouchers are added to someones account easily enough, shows up in the shopping cart, pays for items.... but doesn't subtract the amount when the item has been bought. I also have it set to queue purchase, doesn't do that either.

*Just a side note, I try and install coupon order total module and it seems to work, but doesn't give me any options. Just displays the install button again.

there is a line in the checkout_process.php file I believe you are missing.

it should be around line 184

 

$order_products_id = tep_db_insert_id(); /* this line is above it */ $order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM

//------insert customer choosen option to order-------- this line below it

 

on your side note it sounds kind of like you don't have your ot_coupon.php in your catalog->includes->modules->order_total directory.


(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
applelinks: I am kind of confused here. On one part you said when you clicked on the voucher link from the email you received an error invalid gift voucher code. Yet in the second part you said you had entered the code of a 10$ voucher and it worked ok and now you had 20$ in your voucher account. So those numbers don't add up. To use the voucher you need to click the checkbox as stated in the beginning of this individual post.

 

I see the problem, there is no checkbox on the checkout_payment.php page. I know i have missed some code here.

 

on the checkout_payment.php page there is a box to enter the Gift Vouchers/Discount Coupons code and there is a redeem button,but no check box.

 

can you give me a hint as to where to look for the missing code

 

 

Thanks

 

joe


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

Long Island, New York

Share this post


Link to post
Share on other sites

applelinks it's your sort order .. you can find the answer in previous posts probably


(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
This is the last time I am answering this question:

Jack_mcs: For the 400th time in this thread alone, gift vouchers are a product that you create just like any other product except the model number HAS TO BEGIN WITH GIFT just as you put in your other posts from a quote from crash. To answer the other question you posed in the other thread if you have the gift voucher set to be queued which is suggested then you will need to ok the queued voucher in admin->vouchers-coupons->gift voucher queue and press the redeem button while you have the voucher you want selected. If you don't want to do it with the queue please tell me where your shop is so I can go buy gift vouchers and pay with money orders...

Strider: I apologize for the frustration I have obviously caused you. I did search for the answer but did not find, or at leaset didn't understand, it The solution may have been mentioned 400 times but it is a very time consuming process trying to read through all of the posts trying to find such an answer. I don't mind putting forth the effort, but after hour's of looking through posts, I start to get a little dizzy.

 

Now, as far as the "other question" you mention, I'm not sure which one that is. My problem now is that if I order a GV and use check/money order as a payment method, I don't receive the GV's number (which I realize I should not). After changing the order from pending to delivered and redeeming the GV, I still do not get an E-Mail stating the GV's number. It is entirely possible I am doing something wrong, don't have some option set correctly or just don't understand the whole process correctly. But I don't know where to look for the answers other than in these forums. Putting in even a simple search pattern can return hundreds of hits, many of which have nothing to do with my subject.

 

So please try to understand my frustration at not being able to get it to work and feeling as if there is nowhere to turn for help. And, again, I am sorry for the bother. If I said something that offended you, or your effort with this contribution, I do apologize. I asked out of innocence, not maliciousness.

 

Jack

Share this post


Link to post
Share on other sites

Hey Jason,

 

Thanks for pointing me in the right direction, it turns out I was missing a few lines in my process. I just have so many other mods installed I can't just replace files anymore. =(

 

I'm confident that will work now, however I am having another problem with the mod. I saw a couple others post about this problem but I never saw a clearly defined solution.

 

If the gift voucher covers the whole payment, the payment processor still comes up and errors because of a $0.00 total

 

I've tried changing around sort orders in about every possible combination. Tax on, tax off. Reinstalling the modules from admin. I even just now took out all the database tables for the mod and redid that. I've read on your conversation with priest and juliaj and tried whatever they did.

 

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

 

2 Payment Methods

*Paypal

*Paysystems ( a payment gateway ).

 

Paypal errors for not having a dollar amount. Paysystems continues through with $0.00.

 

Current Sort Order:

Subtotal 1

Shipping 2

Tax 3 (shouldn't matter I don't have any, btw)

Customer Discount 4 ( individual customer discount mod)

Discount Coupons 5

Gift Vouchers 6

Total 7

 

Order Output

Sub-Total: $13.09

Shipping Cost (Shipping Cost): $10.17

Gift Vouchers: $23.26

Total: $0.00

 

General Info

Apache version 1.3.28 (Unix)

PHP version 4.3.2

MySQL version 3.23.56

Credit Class V. 5.06

Share this post


Link to post
Share on other sites

ok where do I begin.... First off I am rewriting ccgv so most of these bugs will be gone in the next version.. yes other bugs I am sure will take their place but that is the lay of it.

 

Skurge: on line 40 of ot_coupon.php and ot_gv.php in catalog/includes/modules/order_total change none to None

If that doesn't work uninstall the discount coupon and see if that works. There is a bug in the ot_coupon and I can't remember if it is the None that fixes it or what for sure. Hopefully I will have this new version out this week so it will play better for this scenario. It also has to do with the sort order but that should work for you.

If not then you will have to wait til I rewrite it.

 

Jack_mcs:hmmm ... lets go through theory of what is suppose to happen...(I think) ...customer buys gift voucher. gv is setup to queue gv purchase. shouldn't matter about payment method. admin decides to redeem bought gv. gv is placed in customers voucher bank. customer decides if he wants to email it or a part of it to his friend or mother. the email that has been sent from the admin states

You recently purchased a Gift Voucher from our online store.

For security reasons this was not made immediately available to you

However this amount has now been released. You can now visit our store

and sent the value via email to someone else

 

and that's about 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

I have finally found a solution to the queue dilemma.

For those of you who can't get the vouchers to queue:

 

If you have "credit including tax" set to false replace this section in

catalog\includes\modules\order_total\ot_gv.php

 

function update_credit_account($i) {
   global $order, $customer_id, $insert_id, $REMOTE_ADDR;
    if (ereg('^GIFT', addslashes($order->products[$i]['model']))) {
         $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);
 if ($this->credit_tax=='true') $gv_order_amount = $gv_order_amount * (100 + $order->products[$i]['tax']) / 100;
     $gv_order_amount = $gv_order_amount * 100 / 100;}
         if (MODULE_ORDER_TOTAL_GV_QUEUE == 'false') {
              	 // GV_QUEUE is false so release amount to account immediately
                $gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
                 $customer_gv = false;
                $total_gv_amount = 0;
            if ($gv_result = tep_db_fetch_array($gv_query)) {
          	 $total_gv_amount = $gv_result['amount'];
          	 $customer_gv = true;
   }     
                        $total_gv_amount = $total_gv_amount + $gv_order_amount;
                         if ($customer_gv) {
                     $gv_update=tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $total_gv_amount . "' where customer_id = '" . $customer_id . "'");
                           } else {
                            $gv_insert=tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $total_gv_amount . "')");
                           }
                        } else {
                   // GV_QUEUE is true - so queue the gv for release by store owner
         $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);
                   $gv_insert=tep_db_query("insert into " . TABLE_COUPON_GV_QUEUE . " (customer_id, order_id, amount, date_created, ipaddr) values ('" . $customer_id . "', '" . $insert_id . "', '" . $gv_order_amount . "', NOW(), '" . $REMOTE_ADDR . "')");
         }
     }

 

What I did:

(Line numbers should be close...)

Line 89 - added } because otherwise the entire section fell into the if ($this->credit_tax=='true')

 

After line 106 inserted - $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);

because I couldn't get the amount itself to show up in the queue otherwise.

 

Line 110 - removed }

 

Also, there is a small typo in

admin\includes\languages\english\qv_queue.php

TEXT_REDEEM_COUPON_MESSAGE_HEADER should have

'and send the value via email to someone else.' not sent ;)

 

Please note that this worked for ME. I am using 5.03. I hope it helps.

Also, thank you to Ian and everyone who helped make this contribution. :D

Laurie

Share this post


Link to post
Share on other sites

I tried to none to None and no worky. Reinstalling discount didn't work either. I guess I'll just wait for the next release to launch my store. The funny thing is it worked right at one point, with the payment method I mean. That was when I clicked install in admin section and it didn't do anything for discount coupon. Now that I can install it, its broken.... if only I could break it again.

 

Thanks for all your help Jason both directly and indirectly,

Share this post


Link to post
Share on other sites

skurge: remove the discount coupon from admin and everything will work ok then

 

neverfight: I am glad you got it working for your version of 5.03, though you have to ask why you placed a bracket at the end of $gv_order_amount = $gv_order_amount * 100 / 100;}

 

if ($this->credit_tax=='true') $gv_order_amount = $gv_order_amount * (100 + $order->products[$i]['tax']) / 100;

    $gv_order_amount = $gv_order_amount * 100 / 100;}

 

because the 'if' was a single statement and doesn't drop down. And that in turn screwed with the logic the rest of the way down and actually above it too.

If you think there is a problem with that function though you could take 5.06's update_credit_account function and it should play just right for you.

good luck


(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

LOL That's why I said this solution worked for "ME". Not being a php whiz, that was the net result of a working solution and I did it. I have seen several posts from others who had the same problem but not once did I see an actual solution. I simply provided mine. Had I known that 'the bug that was not' was fixed in a later version, I would have checked it out. :D

It is still a most excellent contribution.

 

Laurie

Share this post


Link to post
Share on other sites

neverfight: are you running 222 or 221? I believe 5.03 is the last rev for that mod. But I think there is a bug fix file somewhere or I have heard of one.

What is sad is I know I will have to rewrite this twice more. Once for the bugs in this version and once for the new 2.2.3 ahhh the pain of it all


(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,

 

My web hosting service installed this module at my request for my Deo Gloria Designs site. I have been able to add a discount coupon successfully and worked the process right through to payment stage. The only thing messed up is the What's In My Cart page, which returns several warnings like the one below:

 

Warning: Variable passed to each() is not an array or object in /home/virtual/site31/fst/var/www/html/catalog/includes/modules/order_details.php on line 84

 

Is this something a non-techie can fix?

 

Thanks

 

Dennis

Share this post


Link to post
Share on other sites

Maybe you can ask someone here to install for you? paying a few buck is much better then spending 2-3 days to figure them out which otherwise can be spent to market your product.

 

Jaleel

P.S dont ask me :D

Share this post


Link to post
Share on other sites
Jack_mcs:hmmm ... lets go through theory of what is suppose to happen...(I think) ...customer buys gift voucher. gv is setup to queue gv purchase. shouldn't matter about payment method. admin decides to redeem bought gv. gv is placed in customers voucher bank. customer decides if he wants to email it or a part of it to his friend or mother. the email that has been sent from the admin states

You recently purchased a Gift Voucher from our online store.

For security reasons this was not made immediately available to you

However this amount has now been released. You can now visit our store

and sent the value via email to someone else

Ok, I think it is safe to say that I am just totally confused at this point. I understand what is supposed to happen but...

 

I placed an order for a GV. In my admin panel I went in and changed the order status to delivered and redeemed the GV. I received an email saying that the GV is in my account. I login and send the GV to someone. That email says that I was sent the GV and to click on the link to redeem it. I do that and it takes me to a page telling me to look at the faq. I click on the Redeem button on that page and then continue. Now, in effect, I am at my site as a guest. I try to buy something and am prompted to create an account, which I do. In my shopping cart box it shows I have a GV balance. So far, this seems to be as it should be. Now what? If I go through the process of creating an order, it is like the balance does not exist. There is no where to say "use the balance in my account." Any idea what am I missing?

 

Jack

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

×