Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Problems in Admin - gv_sent.php

 

Under Gift Vouchers Sent I get a list of the vouchers which have been sent.

Each is clickable.

 

issue 1 :

Whichever one i click i get the same exactly the same details show up in the right hand column for each item in the list.

 

looks something like this

[1] ?10.00

Senders ID: 0

Amount Sent: ?10.00.... etc...

 

issue 2 : not major, just annoying :)

I use a welcome discount coupon which is set for 10%. It is redeemed at 10%, but wherever it's displayed in the gv_sent.php it appears at ?10.00. (eg the Voucher Value column).

 

gv_sent.php version is

$Id: gv_sent.php,v 1.2.2.1 2003/04/18 16:17:14 wilt Exp $

from 5.10b version of CCGV

 

im on 2.2MS2. the mod was actually installed & tested a couple of months ago, have only just noticed this behaviour, probably because I hadn't looked at it before. :)

 

have scanned through the last 40 or so pages and couldn't find any mention of this type of behaviour so wondering if you have any ideas.

 

thnx

 

Mel

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

netuser: I think you might have edited the order_totals.php file where there should be a = instead of a =. within the output, or at least that is what it appears to be.

That is exactly the problem. Thank you very much!

Link to comment
Share on other sites

when trying to send coupons I also get an error,

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /homepages/44/d97025904/htdocs/catalog/admin/includes/functions/database.php:13) in /homepages/44/d97025904/htdocs/catalog/admin/includes/functions/database.php on line 13

 

Any ideas on a possable fix?

Link to comment
Share on other sites

I am getting this error in the shopping cart infobox. I have added the code to application_top.php and still nothing. whats wrong here.

 

1146 - Table 'ndillon_osc1.coupon_gv_customer' doesn't exist

select amount from coupon_gv_customer where customer_id = '2'

[TEP STOP]

Link to comment
Share on other sites

Problems in Admin - gv_sent.php

 

Under Gift Vouchers Sent I get a list of the vouchers which have been sent.

Each is clickable.

 

issue 1 :

Whichever one i click i get the same exactly the same details show up in the right hand column for each item in the list.

 

looks something like this

[1] ?10.00

Senders ID: 0

Amount Sent: ?10.00.... etc...

 

issue 2 : not major, just annoying :)

I use a welcome discount coupon which is set for 10%. It is redeemed at 10%, but wherever it's displayed in the gv_sent.php it appears at ?10.00. (eg the Voucher Value column).

 

gv_sent.php version is

$Id: gv_sent.php,v 1.2.2.1 2003/04/18 16:17:14 wilt Exp $

from 5.10b version of CCGV

 

im on 2.2MS2. the mod was actually installed & tested a couple of months ago, have only just noticed this behaviour, probably because I hadn't looked at it before. :)

 

have scanned through the last 40 or so pages and couldn't find any mention of this type of behaviour so wondering if you have any ideas.

 

thnx

 

Mel

Hi,

 

ISSUE 1 :

Regarding your issue1 whenever you click on some record just check in the browser if the parameter gid is changing for each record.

 

eg : http://yourserver.com/catalog/admin/gv_sent.php?page=1&gid=5

 

If not then there is some problem in passing the gid.

 

ISSUE 2 :

You have mentioned about welcome discount coupon problem in gv_sent.php.

How can welcome discount coupons report be shown in gv_sent. As far as I think gv_sent only shows gift vouchers that have been sent . Correct me if I am wrong.

Link to comment
Share on other sites

indian_druid thnx for pointing me in the right direction.

 

issue 1 -

good spot on the gid not changing, question now is why? :) (keep reading..)

changing the gid manually appears to work but all the data fields on the right are empty.

 

issue 2 -

its definaltey listing coupons in the gift voucher sent report. whether its supposed to or not - ya got me there.

 

eg of the report listing

Senders Name Voucher Value Voucher Code Date Sent

Admin ?10.00 abcdef 04/13/2004

 

The code abcdef is actually the coupon code sent in admin/config/Welcome Discount Coupon Code.

The value of abcdef in admin/Vouchers Coupons/Coupon admin is 10.0000%

 

for both issues....

 

looking at the raw data & the code

gv_sent.php is building from table coupon_email_track and table coupons

and not differentiating between a coupon and a gift voucher. so both would/should appear in the report. Maybe this could be retitled to Coupons/GVs Sent?

 

also the gId isn't changing because the link is being built using the coupon_id field not the unique id in the coupon_email_track table which is (funnily enough) called unique_id.

the behaviour im seeing is due to all the coupons which have been sent having been welcome coupons which all have the same coupon_id.

 

Showing values in ? and not % is done when this line of code executes

<td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td>

so it formats the 10.0000% to ?10.00

may not be able to get around this one...(yet...)

 

off to play :)

Link to comment
Share on other sites

to get GV_sent.php semi working i did the following

 

Line 64

From

$gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id";

To

  $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, et.coupon_id, et.unique_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id";

 

Reson: Query was selecting c.coupon_id twice and not et.coupon_id. added to select et.unique_id

 

Lines 68-81 replace all 7 instances coupon_id with unique_id

note that coupon_code should stay as it is

 

no idea what changing anyother instance of coupon_id would do.

 

modified code block for 68-81 :

    if (((!$HTTP_GET_VARS['gid']) || (@$HTTP_GET_VARS['gid'] == $gv_list['unique_id'])) && (!$gInfo)) {
   $gInfo = new objectInfo($gv_list);
   }
   if ( (is_object($gInfo)) && ($gv_list['unique_id'] == $gInfo->unique_id) ) {
     echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->unique_id . '&action=edit') . '\'">' . "\n";
   } else {
     echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['unique_id']) . '\'">' . "\n";
   }
?>
               <td class="dataTableContent"><?php echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname']; ?></td>
               <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td>
               <td class="dataTableContent" align="center"><?php echo $gv_list['coupon_code']; ?></td>
               <td class="dataTableContent" align="right"><?php echo tep_date_short($gv_list['date_sent']); ?></td>
               <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list['unique_id'] == $gInfo->unique_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_GV_SENT, 'page=' . $HTTP_GET_VARS['page'] . '&gid=' . $gv_list['unique_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>

 

 

This will let you selet each voucher/coupon listed on the gv_sent page and see where it was sent to and when.

 

Because the customer ID is not recorded in the email_track table for welcome discount coupons I cant (at present) tie this in to the redeem_track table used around line 100 (to display onscreen if a welcome discount coupon has been redeemed. This is covered in the Coupon Admin report, which does show redeemed vouchers, but not how many have been sent.

 

hth.

 

Mel

Link to comment
Share on other sites

I'm having a minor problem with this discount coupons addon. All I need to be able to do is create a discount coupon, email this coupon to one or multiple customers and then allow this customer to redeem this coupon at checkout time. As of now, I have only the discount coupon module installed and configured and in checkout payment I see a text box to enter a coupon, but on the confirmation page the discount coupon doesn't show up. Why is that? Shouldn't it be counted as an order_total_module? What gives?

Link to comment
Share on other sites

Using the very latest versions, on the checkout payment, if someone forgets to enter credit card info, and clicks REDEEM, it does not go through the proper credit card validation process, and I end up getting this message:

------

The first four digits of the number entered are: <br>If that number is correct, we do not accept that type of credit card.<br>If it is wrong, please try again

------

 

Normally, if you click continue, you would get an alert to fill in the credit card info.

Has anyone got a fix for this, or is it just me?

 

Thanks

Sorry, I have to ask again since I did not recieve a response from my question a few pages back. This bug needs to be corrected if it's in the contribution.

Edited by notset4life
Link to comment
Share on other sites

notset4life: Actually that is what the cc_validation sends. Why? If you are using a gift voucher then there is a possiblity that the gv overrides the cc info and the cc info is not needed. So the process doesn't go through the same check for blank information.

 

tomhole: Sounds like sort order.

 

ndillon: sounds like you didn't include your include files/database file names somewhere.

 

kaotic_snow: you have the same problem as you did before. do all of the other gv's work? then delete the gv_mail and try reuploading sometimes it doesn't overwrite correctly.

 

melc: discount coupons are not in the gift vouchers sent portion of the code if you are trying to view the coupons and their redemption they are in the coupon admin under the auspecies of the voucher report code and do not state anything but who has redeemed them. Also gift vouchers do not have a % they are regulated to dollar amounts only.

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

Link to comment
Share on other sites

kaotic_snow: you have the same problem as you did before. do all of the other gv's work? then delete the gv_mail and try reuploading sometimes it doesn't overwrite correctly.

I deleated all of the GV files and reupladed them all, I still however have this error. is ther anything else that could cause this problem?

Link to comment
Share on other sites

ok I apoligies for the multiple post but one last question, I solved the last proble, it was with the language files. after I reuloaded them it ran great. ok now when a user gets a voucher via e-mail form the Admin CP it does not include my address just the part after my adress. like this

As a new coustomer, have a $10 Voucher for anything in our store.

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 XXXXXX in case you have any problems.

/gv_redeem.php?gv_no=XXXXXX

or visit / and enter the code during the checkout process

Its only including the part of the link after my address not the address. thx again for the help.

Link to comment
Share on other sites

kaotic_snow: well it sounds like you either 1) don't have your admin/includes/configure.php set correctly or 2)you have modified the file. take your pick

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

Link to comment
Share on other sites

melc: discount coupons are not in the gift vouchers sent portion of the code if you are trying to view the coupons and their redemption they are in the coupon admin under the auspecies of the voucher report code and do not state anything but who has redeemed them. Also gift vouchers do not have a % they are regulated to dollar amounts only.

 

Then why do coupons show up in the gv sent report then?

 

gvsentrpt.jpg

 

this is a screen shot from a live, unmodified, gv_sent.php

 

data from the db tables confirms that all items listed are welcome discount coupons.

 

thoughts?

 

:)

thnx

Mel

Link to comment
Share on other sites

they aren't coupons they are vouchers. but then I might be mistaken and you might know a lot more about this code than me

(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 a litle problem with this contribtion.

When it should calculate it al I got this values:

 

Total exl. shipping: 15.00kr

Coupon:jakobskompis (10%): -1.50kr

Shipping: 29.00kr

Total: 42.20kr <- Wrong

Tax 25 %: 8.50kr

 

It should be:

Totalt exklusive frakt: 15.00kr

Rabattkoder:jakobskompis: -1.50kr

Fast fraktkostnad (Alltid 29 kr): 29.00kr

Totalt: 42.50kr

Moms 25 %: 8.50kr

 

Thanks for helping!

Jakob Naredi

Link to comment
Share on other sites

phatweb: change your sort order and make your total greater than anything else

 

naredi: change your sort order as it says to do in the installation.html file

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

Link to comment
Share on other sites

I still cant make it :(

I have tried all combinations...

 

With standard Re-calculate Tax and this sort-order:

Sub-total - Sort order = 1

Shipping - Sort order = 2

Gift Voucher - Sort order = 9

Discount Coupons - Sort Order =740

Tax - Sort order = 800

Total - Sort Order = 900

 

Total: 15.00kr

Shipping: 29.00kr

Coupons (10%): -1.50kr

Tax 25 %: 7.92kr <-- Should be 8.50

Total: 41.62kr <-- Should be 42.50

 

 

And without recalculated tax and this sort-order:

Sub-total - Sort order = 1

Shipping - Sort order = 2

Tax - Sort order = 3

Gift Voucher - Sort order = 9

Discount Coupons - Sort Order =740

Total - Sort Order = 900

 

Total: 15.00kr

Shipping: 29.00kr

Tax 25 %: 8.80kr <-- I want it to be 8.50

Coupons (10%): -1.50kr

Total: 42.50

 

/Jakob Naredi

Link to comment
Share on other sites

Trying to test on a local server. Everything works except the emails are being rejected with this error (test emails being sent to a yahoo account)

[sat Apr 17 19:43:34 2004] [error] PHP Warning: mail(): SMTP server response: 501 Failure Naked LF see http://netwinsite.com/surgemail/help/smtplf.htm in f:\phpdev\www\catalog\admin\includes\classes\email.php on line 500

 

To make sure the CRLF function is definately chosen, I comment out these lines in email.php to look like this:

// if (EMAIL_LINEFEED == 'CRLF') {

$this->lf = "\r\n";

// } else {

// $this->lf = "\n";

// }

 

As I have these settings chosen in Administration/Configuration/E-Mail Options:

E-Mail Transport Method = smtp

E-Mail Line Feeds = CRLF

Use Mime HTML When Sending E-Mails = false

Verify E-Mail Addresses Through DNS = false

Send E-Mails = true

 

Testing on XP with apache and PHP. If I send an email from admin via Customers/ this works fine and the email is not rejected.

 

Any thoughts?

 

TIA,

 

Chris

Link to comment
Share on other sites

Hello,

 

I have been a longtime user of OScommerce and I love this idea of the GVDC system. I have been able to solve most of my problems up until now.

 

Problem 1:

 

I am getting very frustrated with the coupons. Is there a way in checkout_payment.php to have it set up so that when the customer enters a coupon it refreshes the payment page puts a thank you or something like it does with the gift vouchers.

 

Problem 2:

 

In addition to my first problem, is there a way to have more than one coupon per order since it goes straight to the checkout_confirmation page after you redeem a coupon?

 

Problem 3:

 

Very minor, more of a suggestion really. on the payment page where it shows that you have a Gift Voucher and has a tick box for it. Wouldnt it be cool if next to the tick box it showed the amount of that gift voucher that you are ticking? Just my 2 cents.

 

Thanks,

 

JT

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.
Note: Your post will require moderator approval before it will be visible.

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...