PDA

View Full Version : Credit Class/Discount Coupon/gv



CookieMonster
10-06-2003, 02:07 PM
Hi, I installed MS2-Max and it works great! Thanks Michael, it's an excelent program!! :)

I have a few questions regarding Credit Class/Discount Coupon/GV feature:

1) I signed up as a new member of my online store to confirm if everything works fine. And after I signed up, I receive two welcome messages each with a $10 gift voucher (with different redeem codes) LOL. So in other words, I received $20 GV instead of $10 right after I signed up. May I ask how I can fix this problem? I tried with different browsers including Netscape and IE, Opera etc and it seems it's not the problem of the browsers.

2) Regarding welcome messages with $10 gift voucher again, if the customer actually signs up for more than one account in order to receive more $10 gift vouchers (they automatically receive $10 gv right after they sign up in the welcome message), can they redeem all these $10 gift vouchers and use them in one order?

3) I redeemed the $10 gift voucher and I tried to buy another $25 gift vouvcher (as a product) to try to use the $10 gift voucher, it shows on the right side of the menu that :

Shopping Cart
1 x GIFT VOUCHER1
$25.00
Voucher Balance $14.00
Send Gift Voucher

but after I entered the redeem code in the check out page, it says that the code is invalid and I am not able to use this $10 gv, that is, the balance is still $25 when I check out, may I ask what could be the problem and can the customer use the $10 gv for their use instead of sending the gv to someone else? I checked my admin panel under :Gift Voucher Queue and nothing is in there.

Does the store owner (admin) have to approve this gv and discount coupons via the admin panel (Gift Voucher Queue) b4 theses gv/coupons can be used?

Thanks very much for your help.

CookieMonster
10-06-2003, 02:10 PM
sorry I meant after I signed up, I received one welcome message with one redeem code only but when I send gift voucher via the admin panel to "all customers" or to just one recipient, they would receive two emails with two gift vouchers of different redeep codes.

Anonymous
10-06-2003, 02:38 PM
I just tested the "Coupon Admin" feature via admin panel and sent a coupon of 5% off to all customer and it works only if the "Uses per Coupon" is not set to 1. But it works! :) If I set "Uses per Coupon" = 2 and "Uses per Customer" = 1, may I ask if it means this coupon will become invalid after two customers redeem the coupon?

I also found out that after I sent the discount coupon via admin panel to all customers. And after I redeemed this discount coupon code as a customer, I can eventually use the amount of the $10 gv that I redeemed as well as the discount coupon of 5% off. Now it shows that:

Sub-Total: $25.00
Discount Coupons:38ca80: $1.25
Gift Vouchers: $10.00
Total: $13.75

But the gift voucher features works only if if the customer redeem the discount coupon that's being sent by the admin via admin panel, and it does not work (won't subtract the gv amount in checkout page) if it's being used by itself without the discount coupon, may I ask how we can resolve this problem? Thanks very much again!

CookieMonster
10-06-2003, 03:12 PM
OK I just found out why the git voucher did not work at the first place. It's because after I received the welcome email with the $10 gv info, I clicked on the link to redeem the gv and then I entered the redeem code again in the checkout page, and that's why it said "invalid gv code". If I don't enter the redeem code again, it would work. I think I would just remove the redeem link in the welcome email message and just make the customers enter the code manually because I am sure many people would be like me LOL...to act like such a goof that we would click the redeem link in the email and then manually enter the code again in the checkout page. And in that case after they redeem the gv twice, then they would see the error message with "invalid code". I think it's more efficient if I just remove the link in the welcome message. :)

I still have a few questions that I need to resolve:

1) May I ask what's the Gift Voucher Queue (admin panel) is for? In what cases does the admin have to approve the gv b4 the gv can be used? I am wondering if it's the case that when the customer actually purchase the gv of $25, 50 or 100 etc?

2) If the admin sends gv using the "Mail Gift Voucher" via admin panel, the customers still recieve two emails with different gv redeem codes. In other words, if the admin sends a gv of $10 each, the customers would receive a total of $20 gv. May I ask how I can resolve this problem?

3) Every person that signs up a new account will receive a welcome message with $10 gift voucher, but it seems the customer can cheat by signing up more than one account and receive multiple $10 gvs, and they can send the gv to one email account and then use these gv amount all together in one order?

4) Can we limit the use of gift voucher so that the customer can use one gv per order?

Thanks! :)

if the customer actually signs up for more than one account in order to receive more $10 gift vouchers (they automatically receive $10 gv right after they sign up in the welcome message), can they redeem all these $10 gift vouchers and use them in one order?

CookieMonster
10-12-2003, 03:06 PM
Some customers signed up in our store and the gift vouchers're sent to them automatically after they signed up. But I cannot see the gv info in the admin panel (gv queue) and there's no error message there (admin panel), I also sent out some gv to a few users via the admin panel but there's still nothing shows up in gv queue? I am wondering if the only circumstances that the gv would needs to be approved by the admin b4they can be used would be when the customers actually purchase the gv as a product? I cannot find this info in the original contribution neither. Any help would be much appreciated! Thanks.

CookieMonster
10-12-2003, 03:08 PM
I also added this line

define('FILENAME_GV_QUEUE', 'gv_queue.php');

in the admin\include folder but still nothing shows up in gv queue in admin panel :cry:

Anonymous
10-12-2003, 04:24 PM
I found the big fixes text file in the original contribution. Do we have have to apply these fixes in MS2-Max? Thanks.

(shown below:)

-----------------------------------------------------------
THESE PROBLEMS ARE FIXED IN THIS DOWNLOAD ... THIS IS ONLY WHAT THE CHANGES WERE

PROBLEM WITH DUPLICATING TEXT IN EMAILS:

It is only duplicating these fields:
define('EMAIL_TEXT',
define('EMAIL_CONTACT
define('EMAIL_WARNING

These are the settings in add_ccgvdc_application_top.php
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0');
define('NEW_SIGNUP_DISCOUNT_COUPON', '');

Any ideas on this duplication in the regular new customer email with these values set to 0 and ''?

in create_account.php on line 276 or there abouts
change

$email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

to

if ((NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) ||
(NEW_SIGNUP_DISCOUNT_COUPON != '')) {
$email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
}

I think that should take care of it.

================================================== ====

CATALOG/INCLUDES/MODULES/

Change catalog/includes/modules/ot_coupon.php about line 74:

$selection_string .= ' <td align="right"' . $image_submit . '</td>';

To:
$selection_string .= ' <td align="right">' . $image_submit . '</td>';


Change catalog/includes/modules/ot_gv.php about line 124:

$selection_string .= ' <td align="right"' . $image_submit . '</td>';

To:

$selection_string .= ' <td align="right">' . $image_submit . '</td>';

================================================== =====


1 ) This contribution contains bufixes i found in the german forum.
2 ) I translated all missing/english files the german language files.

The changes in the code are cut and paste, works all fine with my MS2.
Please don't ask me any questions regarding the bugfixes, i'm not a coder ;-)

Greetings from Berlin,
Andre
ambidex@gmx.net

I can aswer your questions regarding all translations, but the following files were changed by cut'n'paste:

################################################## #####################################

In admin\includes\add_ccgvdc_application_top.php about line 51

changed code from:

$gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "'");

to:

$gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");

################################################## ####################################

catalog/includes/modules/order_total/ot_gv.php about line 67

changed code from

function pre_confirmation_check($order_total) {
if ($SESSION['cot_gv']) {
$gv_payment_amount = $this->calculate_credit($order_total);
}
return $gv_payment_amount;
}

into the following:

function pre_confirmation_check($order_total) { if ($_SESSION['cot_gv']) { $od_amount = $this->calculate_credit($order_total); if ($this->calculate_tax != "none") { $tod_amount = $this->calculate_tax_deduction($order_total, $od_amount, $this->calculate_tax); $od_amount = $this->calculate_credit($order_total)+$tod_amount; } } return $od_amount; }

################################################## ####################################

in catalog/includes/add_ccgvdc_application_top.php about line 60:

changed code from

$gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "'");

into

$gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "' where customer_id = '" . $customer_id . "'");

################################################## #####################################

================================================== ===========

Category Restriction Fix to Gift Voucher module 5.05
Date: August 3, 2003
=================================
Nick Stanko of UkiDev.com, nick@ukidev.com

Thanks to Rob Cote, robc@traininghott.com for the original idea.
Thanks to Solinka Molinero of MemoriesForTheFuture.com who carefully tested
osCommerce and found this problem.

Rob's original fix for product discounts calculated based on percentages worked
great for me but it helped me find another problem. If one restricts a coupon to
categories and sets a percentage discount the current code calculates incorrectly.
The problem only comes up when products are added from both restricted
and unrestricted categories. The current code seems to apply the coupon to
the total, ignoring the fact that some products do not fall under the coupon's scope.

This can be fixed by applying Rob's logic to the category portion of the following file:
catalog/includes/modules/order_total/ot_coupon.php

VERSION 5.05

the code in catalog/includes/modules/order_total/ot_coupon.php around line 178 reads as follows:

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

for ($ii = 0; $ii < count($cat_ids); $ii++) {
if ($sub_cat_ids[$iii] == $cat_ids[$ii]) {
if ($get_result['coupon_type'] == 'P') {
$od_amount = round($amount*10)/10*$c_deduct/100;
$pr_c = $order->products[$i]['final_price']*$order->products[$i]['qty'];
$pod_amount = round($pr_c*10)/10*$c_deduct/100;
} else {
$od_amount = $c_deduct;
}
---------------------------------------------------

The code should be like this. Takes on the same principal as the product based restrictions Rob fixed.

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

for ($ii = 0; $ii < count($cat_ids); $ii++) {
if ($sub_cat_ids[$iii] == $cat_ids[$ii]) {
if ($get_result['coupon_type'] == 'P') {
//$od_amount = round($amount*10)/10*$c_deduct/100;
$pr_c = $order->products[$i]['final_price']*$order->products[$i]['qty'];
$pod_amount = round($pr_c*10)/10*$c_deduct/100;
$od_amount = $od_amount + $pod_amount;
} else {
$od_amount = $c_deduct;
}