### POINTS AND REWARDS MODULE V1.00 ###
#2061
Posted 01 September 2010, 07:40
Please help
Below is an example for the checkout payment problem
When the order is over $1000.00, in the checkout payment page, select payment with redeem points:
then,
In checkout confirmation page:
Sub-Total: $1199.97
Flat Rate (Best Way): $5.00
Points Redeemed: -$75.00
Total: $1.00
The order can successfully checkout but the customer just has to pay $1.00 instead of $1129.97
When the order is below $1000.00, there is not problems at all.
#2062
Posted 01 September 2010, 08:41
Below is the original code changed from sashaben
FIND:
includes/modules/order_total/ot_redemption.php
Replace this:
$order->info['total'] = number_format($order->info['total'] - tep_calc_shopping_pvalue($customer_shopping_points_spending), 4);
With the following:
$order->info['total'] -= tep_calc_shopping_pvalue($customer_shopping_points_spending);
Edited by Lumbridge, 01 September 2010, 08:44.
#2063
Posted 04 October 2010, 16:19
I'm trying to install this contribute..... on step 5 (first part) i need to find:
if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}
in checkout_process.phpI can't find it in my checkout_process.php........ so who can help me with this issue???
Thnx
Tjappie W (NL)
#2064
Posted 04 November 2010, 15:46
Within this support thread, in post #1871, there is a solution for the confirmation page. Although, this solution did not work for me, because the code "$order_total_modules->process();" was already removed.
I am using v2.2rc2a. And am using V2.1rc2a of this contribution, the version To be used with osCommerce-2.2rc2a. I have reviewed my installation and could find no errors, and could find no other solution within the support thread. All other functions work perfectly. I am using Credit Class Gift Voucher, latest version and the weave was quite simple per the instructions. I have looked at my order_total modules as well as my payment modules and my checkout_process.php page, but have yet to find a solution.
Has anyone had this problem and been able to fix it? Please let me know of that solution.
Thank you
Larry
This is a very nice contribution
#2065
Posted 11 November 2010, 01:05
The 1st has been mentioned before but i haven't seen a fix for it....
issue 1....
Points are being deducted at the checkout confirmation page. If customers change their mind and back out of the checkout they have lost their points.
issue 2....
emails don't seem to be sending to customers when points are added to their account via Admin. a message is shown saying the email was sent successfully but the customer never receives it.
Other than the issues above, everything else seems to be working perfectly.
Any help on these would be really appreciated.
Thanks,
Steven
#2067
Posted 16 November 2010, 17:15
lupole, on 04 November 2010, 15:46, said:
Within this support thread, in post #1871, there is a solution for the confirmation page. Although, this solution did not work for me, because the code "$order_total_modules->process();" was already removed.
I am using v2.2rc2a. And am using V2.1rc2a of this contribution, the version To be used with osCommerce-2.2rc2a. I have reviewed my installation and could find no errors, and could find no other solution within the support thread. All other functions work perfectly. I am using Credit Class Gift Voucher, latest version and the weave was quite simple per the instructions. I have looked at my order_total modules as well as my payment modules and my checkout_process.php page, but have yet to find a solution.
Has anyone had this problem and been able to fix it? Please let me know of that solution.
Thank you
Larry
This is a very nice contribution
#2068
Posted 19 November 2010, 19:48
on my customer order screen i am now unable to change the status of orders.
i get the the following error
1054 - Unknown column 'status' in 'field list'
select orders_id, status from customers_points_pending where status = 1 and orders_id = 2159
[TEP STOP]
i tried using the search but i could not find anything.
i am using the V2.1rc2a version
can anyone help me?
thanks
Edited by DarrenHoldaway, 19 November 2010, 19:49.
#2069
Posted 13 December 2010, 04:54
I only have one problem that I can't seem to fix....
We have Free Shipping on Items over $75 - If someone buys something for $100, and use $50 in points, it currently gives them free shipping as it adds the total before the points. I want it to look at the total after points as I need the customers to pay $75 out of their pocket to get free shipping. Any ideas?
#2070
Posted 20 February 2011, 15:30
One Page checkout uses a payment_Meethod.php which is in /includes/checkout/, there is a code for points in there.
Any help will be appreeciated.
#2071
Posted 14 March 2011, 16:17
skhuu, on 20 February 2011, 15:30, said:
One Page checkout uses a payment_Meethod.php which is in /includes/checkout/, there is a code for points in there.
Any help will be appreeciated.
I have the same problem. Can you help?
#2072
Posted 19 March 2011, 03:49
#2073
Posted 19 March 2011, 10:36
desmoworks, on 19 March 2011, 03:49, said:
Looks like I've got it. Basically just takes the customers current points and adds (well, subtracts the negative) the redeemed points to get the total accumulated points. Below is for what the customers see in their account. Just finishing up the report in the admin section so we can track these people easily. Next up will be to make loyalty groups at the different point levels and an automated system to alert those who qualify.
The query:
<?php $accumulated_points_query = tep_db_query("select c.customers_id, c.customers_shopping_points, pp.customer_id, sum(pp.points_pending) as points_redeemed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where points_status = 4 and c.customers_id = pp.customer_id and customers_id = '" . (int)$customer_id . "'");
$accumulated = tep_db_fetch_array($accumulated_points_query);?> And to display the data:
Lifetime Accumulated Loyalty Points: <?php echo number_format($accumulated['customers_shopping_points'] - $accumulated['points_redeemed'],POINTS_DECIMAL_PLACES); ?>
#2074
Posted 20 March 2011, 01:25
The query:
$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_points_expires, c.customers_shopping_points, pp.customer_id, (c.customers_shopping_points - sum(case when pp.points_status = 4 then pp.points_pending else 0 end)) as points_accumulated from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where c.customers_id = pp.customer_id group by c.customers_firstname, c.customers_lastname order by $sort ";
The output:
<?php echo number_format($customers['points_accumulated'],POINTS_DECIMAL_PLACES); ?>
#2076
Posted 23 March 2011, 08:09
$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_points_expires, c.customers_shopping_points, pp.customer_id, (c.customers_shopping_points - sum(case when pp.points_status = 4 then pp.points_pending else 0 end)) as points_accumulated from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where c.customers_id = pp.customer_id group by c.customers_firstname, c.customers_lastname order by $sort ";
#2077
Posted 02 April 2011, 12:10
I hope you apologize my English, I do not speak well.
I need your help, if possible, please.
I have installed this module, but I need to make me discount points on the sub-total and not the final total.
As I have it now:
____________________________
Product: 20 €
____________________________
sub-total: 16, 95 €
Other discounts: 0 €
18% VAT: € 3.051
Shipping costs: 5 €
----------------------------
discount coupons: - 10 €
____________________________
____________________________
TOTAL: 15 €
____________________________
____________________________
But it would have to be this way:
____________________________
Product: 20 €
____________________________
sub-total: 16, 95 €
discount coupons: - 10 €
Other discounts: 0 €
18% VAT: € 1.251
Shipping costs: 5 €
____________________________
____________________________
TOTAL: 13.20 €
____________________________
____________________________
I tried to change the disposition of all modules in OrderTotal and not get the expected results.
I appreciate any help. please.
#2078
Posted 12 May 2011, 11:02
#2079
Posted 17 May 2011, 14:29
As I can see now, after a user creates an account, when he places his first order he is asked if he/she was referred by someone else and asked to type the email address.
This is too complicated, because one can enter a wrong address...
So, wouldn't it be possible to create a referral link in every customer's account page?
Something that whey will show to their friends, and if someone visits the page and creates an acount, they are credited with points?
The link should be something like www.domain.com/referrer.php?client_id=xxx or something like that...
How hard would it be to implement that?
#2080
Posted 23 June 2011, 15:42
right now to the problem.
1st: I sell digital products via my store and would like the points to be automatically awarded once the order status has been set to delivered, i know you can automatically award them after a set amount of days or immidiately but what if they didn't finish payment, are the points still awarded?, so i shouldn't imagine it would be too difficult to change it to award points once a 'desired' order status is reached i.e. delivered, has anyone got an idea of what code to alter and how?
2nd I use the activate account contribution and have got both to work, but once the customer has activated account it still tells me unverified in the admin section, i merged both codes as follows:
//Account activation BOF
if (ACTIVATION_CODE == 'off') {
// Points/Rewards system V2.1beta BOF
if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {
tep_add_welcome_points($customer_id);
$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';
$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';
$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";
$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . EMAIL_CONTACT . EMAIL_WARNING;
} else {
$email_text .= EMAIL_WELCOME . EMAIL_TEXT .EMAIL_CONTACT . EMAIL_WARNING;
}
// Points/Rewards system V2.1beta EOF
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
} else {
$activation_id = md5($email_address);
$verification_href = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id, 'SSL');
$verification_mail = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id . '&submit=true&activation_code=' . $activation_code, 'SSL');
$verification_link = '<a href="' . $verification_mail . '">' . $verification_mail . '</a>' ."\n\n";
// Points/Rewards system V2.1beta BOF
if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {
tep_add_welcome_points($customer_id);
$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';
$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';
$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";
$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;
} else {
$email_text .= EMAIL_WELCOME . EMAIL_TEXT . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;
}
// Points/Rewards system V2.1beta EOF
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_redirect($verification_href);
}
//Account Activation EOF
Crude i know but seems to be working as customer can indeed activate their account, but causes some confusion as it states they haven't.
3rd: Last and most importantly (as both of the above do not cause immidiate problems but would be nice if working), when a customer places an order they can use their points as desired, but if they decide to cancel their purchase after clicking confirm order button when they return they find that their points have been deducted (GONE) and that price of the item has gone back up to it's original value (before redeeming points).
This for me personally is not an option and would result in me not being able to use this contribution in an active store. as all businesses recognise you can not allow your customers to feel they have lost out in anyway, it would undermine what this whole contribution is about (rewarding your loyal customers) and would result in the exact opposite in losing valuable customers.
I will help find a solution to this problem for me and the others who noticed and am willing to put some hard work in on my behalf but i am only a php novice
PLEASE UNDERSTAND THAT'S NOT MEANT AS A DIG AS THIS IS AN AWSOME CONTRIBUTION AND I WANT IT IN ALL MY STORES
thanks
Dan














