Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

my problem is with sending the voucher...

 

i test using most anything I can think of.. including my own name which has an apostrophe... whenever I go to send i get a MySQL error because of the slashes... whether in the username (person sending) or in the recipient name.

 

How would I handle this?

Link to comment
Share on other sites

I've just installed this contribution. So far, no warning messages; however, the Voucher/Coupon box with all of its sub-entries does appear twice within admin. What needs to be modified to correct this problem?

 

Thanks in advance for any attempt at assistance.

 

Allen

Link to comment
Share on other sites

If an order is placed for just a GV, shipping is still charged. Can anyone tell me if there is some setting I can change to prevent this or do I need to install another contribution to handle free shipping?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

then where this is checked for in create account.php on about line 274

  }

////  if ((NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) ||  (NEW_SIGNUP_DISCOUNT_COUPON != '')) {

//    $email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

//// }

// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* END

 

      $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

Near the quoted code block in create_account.php is the following code, which is active when a new customer is to receive a coupon. In my case the coupon_id is 30 and defined in my /local/config.php. It appears to me that the first code block below is incorrect because it has no sprintf() command. The result is that new customers receive email with a bare '%s' in it (if EMAIL_COUPON_INCENTIVE_HEADER is define with a string parameter).

 

 
$email_text .= EMAIL_COUPON_INCENTIVE_HEADER .  "\n\n" .
                  $coupon_desc['coupon_description'] .
                  sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" .
                  "\n\n";

 

The following code block looks more proper, but it does not do what I intend either. Rather than a bare '%s' the result in its place is nothing. I think what I should expect is the coupon description. In my case, coupon_code resolves to the correct name for my coupon_id and I have a coupon_description in my database.

    $email_text .= sprintf(EMAIL_COUPON_INCENTIVE_HEADER, $coupon_desc['coupon_description']) . "\n\n" .
                  sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n";

 

On further investigation, it appears that the query is incorrect for coupon_desc_query. The first line below does not reference 'languages_id' and it seems to work OK. The next line that is commented out is the original.

 

    $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id .  "'");
   //    $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . languages_id . "'");

 

It's probably that this has been fixed. If so, probably better than this. Please let me know.

 

Mark

Mark Gillingham / [email protected]

Link to comment
Share on other sites

SOOOOOO Friggen lame. OK, here is what I found out:

 

I added a coupon for an item, which is for 33.3333% off an item.

 

Lets pretend I have 2 items in my store, the coupon is only for ONE item, the other item has no coupon or discount associated with it. Now that we have that established, lets go on with the problem:

 

I noticed that my cart wasn't calculating the tax correctly with the coupon code applied... i was getting readings like this:

 

Sub-Total: $89.97

Discount Coupons:CCXXXX: -$10.00

Ground Shipping: $10.00

Tax (15%): $15.00

Total: $104.97

 

As you can see, the tax is on the amount of 100$, then the coupon is taken off afterwards, instead of before the tax, therefore it's not taking what it should be off.

 

I played around with it for a bit, and noticed something interesting, but I don't know how to fix it. To make the above calculation, I had to do this:

 

1-Clear shopping cart

2-Close browser (to have a fresh start)

3-Add the calendar (which is the ONE item that the coupon is good for, which happens to be 14.99)

4-Change the quantity to 2 (don't think this has anything to do with it, as I believe it does it with just one, but these are the steps I took this time, so shut up. ;) )

5-Go back to the main page, and add the other item, in this case, a vest, which is 59.99.

6-The total $ of the cart is now 89.97, click checkout.

7-Select the ground shipping option of $10

8-Select the Paypal option

9-Type in the code - CCXXXX into the redeem code spot, and click 'redeem'

 

Thats how I get the bad calculation! Pretty sick. Now, These are the steps I take to get the CORRECT calculation: (note the items in steps 3-5 have been reversed)

 

1-Clear shopping cart (same as above)

2-Close browser (to have a fresh start) (same as above)

3-Add the vest (item that does NOT have a coupon associated with it, 59.99)

4-Go back to the main page, and add the Calendar, the one WITH a coupon associated with it, $14.99.

5-Change the quantity of the calendar (the one with the coupon attatched) to 2

6-The total $ of the cart is now 89.97, click checkout. (same as above)

7-Select the ground shipping option of $10 (same as above)

8-Select the Paypal option (same as above)

9-Type in the code - CCXXXX into the redeem code spot, and click 'redeem' (same as above)

 

Here is the calculation output:

 

Sub-Total: $89.97

Discount Coupons:CCXXXX: -$10.00

Ground Shipping: $10.00

Tax: $13.50

Total: $103.47

 

 

So why must it do this? :D The bottom calculation is what it SHOULD be, why won't it do this everytime? Why ONLY when the item you FIRST put in your cart, which HAS the coupon attatched, bet the ONLY TIME it screws up?

 

Please help, thanks!

Link to comment
Share on other sites

Jack: set your weight to 0 for the gv. The notes for this are in the code yet not in the doc. If I can remember tonight/tomorrow I will put this in the new doc also. But it has been talked about adnauseum in the posts.

 

Markgill: actually part of the code you used for examples was fixed in 5.04. and part of it has been fixed today. Part of the problem is if you look at rel 2.2.2 it still used the old email text struct in the espanol and german portions of the text and used the new methods in the english. It has since been corrected in the cvs and I brought it into the code/language files I am doing now for the new release which hopefully will be out soon.

 

Nitro: actually it doens't work. but that is another story. I am in the process of rewriting it and should be done tonight. I am trying to keep the changes to a minimum so you only have to copy over files but that statement isn't definitive yet.

If everything goes well I should be through tomorrow sometime.

 

speaking of ... if anyone would like to help me bang on this before release please pm me and we will set something up.

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

Link to comment
Share on other sites

Jack: set your weight to 0 for the gv. The notes for this are in the code yet not in the doc. If I can remember tonight/tomorrow I will put this in the new doc also. But it has been talked about adnauseum in the posts.

The weight is already set to zero. So is this a function of the basic shop? That is, should shipping charges not be applied when the weight = 0 even without a contribution such as yours? If so, it would appear I have a problem elsewhere.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I am having problems with 5.6.1.the latest version..

 

1. Duplicating email problem is not fix..

2 not applying coupons.. after clicking redeem coupon and nothing happens. in the address bar. it show something like "errormessge=congratuationl...." which seems have have successfully applied coupon.. But the amount is not deducted..

Look in coupon history. and it says the coupon is redeemed...........

 

totally at lost now. : P

any ideas? thanks million!

Link to comment
Share on other sites

well, im sorta get it working now..

Just a quick dumm questions.. How do I sell GVs as products ?

I add a product and set model to gift10dollar but when I buy this product..how do i get the coupon code? It seems that gift10dollar is not treated as a GV...

Did i miss something?thanks

Link to comment
Share on other sites

most probably you have the Gift Vaucher set to Queue in admin.

 

go to admin page and release the queue and you will receive an email saying the Gift Vaucher has been released with the vaucher code. then you can use the code for buying item in store.

 

Hope thi helps.

 

Jaleel

Link to comment
Share on other sites

thanks , Jaleel. I've already checked there and nothing shows up.

That's why Im so at lost...

What i did is created a category called coupons. under which i created a product whose model number is set to Gift_100 or similar. But when I buy these GVs....they are jsut treated as normal goods...

I miss something? Any thing else i should do in GV admin area? thanks..

Link to comment
Share on other sites

Applelinks: I am not for sure. The way it works is that the coupon should be able to be used only once but it is still considered active until admin deactivates it. I forget but I will look at the code in the next day or so. There is a reason for the madness but I my brain is so small I can't always remember everything. If I remember you were using this for the product a company was giving away and you were trying to generate 500 in bulk or something. How did you solve the coupon generation? BTW you can also make it for that single product if that is your desire, if not it will be for the whole catalog.

 

jello: *chuckles*

Hi

 

We did not have time to look into the code so we did all 557 vouchures manually. We did use it for a single product, it worked like a charm

 

It seems that all discount coupons that have been redeemed stay active. We have even change the active date of the coupon to yesterday and it still satys active. The only way to make it inactive is to go into PHPmyAdmin and change the status fro 'Y' to 'N'

 

It there is a way to automate this process please let me know. We need to generate a report for our coustomer with the 557 vouchures. Viewing the inactive coupons would be a big help

 

BTW: this is a great addition to OSC.

 

 

Joe

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

Long Island, New York

Link to comment
Share on other sites

Sorry for cross posting (this was referenced in this thread: http://www.oscommerce.com/forums/index.php?sho...=0entry269535 ), but I am having problems at the screen at where you make the coupon. This error comes up right after the Start Date: "Call to undefined function: tep_draw_date_selector()"

This is the line of code there:

<?php echo tep_draw_date_selector('coupon_startdate', mktime(0,0,0, $coupon_startdate[1], $coupon_startdate[2], $coupon_startdate[0], 0)); ?>

I am installing 506 on osC 2.2 MS2. Please help! Thank you!

Link to comment
Share on other sites

Hi,

I am getting the following errors for GV installed on MS2:

I have voucher US$25 in my account and I check the box to use use and redem

the amount of GV, all setting is correctly, but actually it does not get deducted from the total amount and show Gift Voucher colum! In admin page the module order total voucher has been set up OK and the voucher amount is valid. My Modules Sort Order Action ahave been try set follwoing 2:

 

Discount Coupons 4

Gift Vouchers 5

Low Order Fee

Shipping 2

Sub-Total 1

Tax 3

Total 6

 

AND

 

Discount Coupons 740

Gift Vouchers 760

Low Order Fee

Shipping 2

Sub-Total 1

Tax 5

Total 990

 

Both doesn't work! May I know any setiing I miss?

Best Regards,

Gunnar

Link to comment
Share on other sites

logicnerd411: You need to edit your app top file in admin and place the required require fields in it

 

gunnarcheung: Make sure you have made the correct changes to your checkout process files such as payment, confirm and process

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

Link to comment
Share on other sites

I have finished(I think) the new mods for ccgv 5.07 release I believe. If anyone would like to bang on it I would appreciate it.

There is debug code setup in the credit card module and the checkout success module to tell you if you tried to go to your gateway. It will tell you on the success page if you did or not.

I really would like a pretty good banging on this before I contribute it. If you blow it up that is fine, just email me through the contact us page and I will reset the config file.

Please be courteous of others while they are banging on it. I suppose the best way to tell if someone else is banging on it is to look at who's online and make your best judgement.

There are 2 coupons setup now .. one is for 10% - test_10_percent and the other is for $10.00 test10

I have not banged on it massively but I have played with it and I believe all the known issues are fixed... (of course sarah there are bugs .. this is software)

 

anyway

the addy for the test site is

http://www.oscworks.com/work/anew_ccgv/index.php

 

 

happy trails

 

and the addy for the admin is

 

http://www.oscworks.com/work/anew_ccgv/admin/index.php

 

there are no passwords in the admin .. I hope I don't need to put them there.

Please don't try the different cc modules .. You can test those on your sites when I release the code.

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

Link to comment
Share on other sites

Godkid:well I haven't heard that one yet. From where are you trying to send the email and what is your email addy.

check it out at http://www.digisolvit.com/store

 

getting the vouchers aren't a prob... just after I approve in the queue and you try to send it to someone that you get issues...

 

STRIDER: you can get me at [email protected]

Edited by Godkid
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...