Community Add-Ons
## POINTS AND REWARDS MODULE V1.00 ##
for osCommerce Online Merchant v2.2
The idea comes from contributions...
http://www.oscommerce.com/community/contributions,2082
http://www.oscommerce.com/community/contributions,2221
but they are not required and its NOT an update to them .
Please note that even if this contribution carry the same title as contributions 2221,
they are NOT the same and you WON'T be able to merged this module with contributions 2221.
that's the reason i did not uploaded there, if you already installed contributions 2221 or cosidering
it, you will have to make your choice amoung the two.
(NOT like contributions 2221, this module does NOT require any of the functions required
by Credit Class & Gift Voucher so you can use it with or without Gift Voucher contribution(tested)
What does this module do ?
------------------------------------
I think that the title say it all.
This is a Points and Reawrds system,(more or like a cash back or discount system)
aimed to popup sales and get new usrs to signup.
The system awards shopping points to customers for the amount they spend.
Points consider as cash when redeemed, so points are in pending status untill approved by admin.(manually)
Once approved, customers can then use those points to pay for order druing checkout.
Admin features.
------------------------------------
1.Enable/Disable the Points System.
2.Enable/Disable the Redemptions System.(maybe you would like to offer a gift and not money back).
3.Set the number of points awarded for evry $1.00 spent(or whatever based on your currency system).
4.Set the value of each point(based on your currency system).
5.Enable/Disable points awarded for shipping fees.
6.Enable/Disable Products Restriction.
7.Set the model name allowed When Products Restriction enabled.(only one group)
8.Enable/Disable Points Limitation. and set the number. of points needed before they can be redeemed.
9.Enable/Disable Welcome Points. and set the Points amount to be auto-credited for New signup customers.
10.Admin can view/add/delete customers points with/without queuing customers points table(optimised the database).
Customes features.
------------------------------------
* New signup customers can be awarded with welcome points.
* Customers can earn points(cash back) for an item purchased at the store.
* Customers can choose the amount of points they would like to spend.
* Customers can view their shoping points account status.
The system designed to use minimum database space, customers points hold in customers table while
all other points hold in customers_points_pending table.
Once pending points approved by admin, pending points move to customers account so table used stay optimised.
Redeemed points recorded in customers order history only.
What this module does not do ?
------------------------------------
1.The system designed for a small to medium shops.
Since shopping points cosider as money when redeemed. awarded points default status is pending.
Customers shopping points account will never be auto-credited(except points for new signup if enabled).
if you own a large shop with lots of orders daily, it could be hard to keep track of points
then this system is NOT for you.
2.When admin delete order while points status for that order is still pending. those points will also be
deleted, however if admin already approved those points, admin must delete them manually(via admin panel).
This module as been tested on a fresh install of osCommerce Version 2.2MS2
as well as on a fully modified versions (includes Credit Class & Gift Voucher contribution).
Please use it at your own risk.
The full zip package includes...
* A folder contain all files and images required by this module .(sorry,only english language files provided).
* A folder contain all images, new and modified files required by this module (for a fresh install).
* A folder contain screenshots admin and catalog(I think that all contributions uploaded here should have).
* Step by step installation instrctions(corrently only in english).
Please Note: a light zip contains only files needed for this module uploaded here.
All support handled through the osCommerce forums. Please do not email directly.
http://forums.oscommerce.com/index.php?showtopic=152746
As a respect to the contributors and as part of GNU General Public License
You are not allowed to remove any of the comments/links to oscommerce web site.
Unclear instructions, may cause confusion.
Now better understood
This is the fix for people using the PayPal Standard module with the Points and Rewards Module.
It was modified from the PayPal_IPN module and applied to the paypal_standard.php file included in the osC release v2.2 rc2a.
It has been tested to apply new points to products you purchase via PayPal and to deduct points if used in an order.
Just apply this diff to your stock file and you are good to go.
Permite tener menus en español dentro del administrador para las opciones de puntos. Alimenta la base de datos con los menus traducidos al español.
diverses corrections/améliorations dans le fichier sql de la version française :
+ bugs de quotes non échapés
+ amélioration des descriptions des options
note : ceci n'est pas le package complet, mais juste le fichier sql pour la version française.
In the current form, the 'customer_shopping_points_spending' variable from checkout_payment.php could be fed with a higher number than available on ones account and be deducted to the total amount in the checkout_confirmation page.
Fix a little bug in previous versions.
The referrer is saved only for the first order.
Here is the updated version of remember referrer.
I corrected the file catalogcreate_account_success.php in the modified files zip. No other changes FULL package.
Please read the forum post for details
http://forums.oscommerce.com/index.php?showtopic=152746&st=1680&gopid=1317670
To fix it replace
catalog/includes/languages/english/modules/order_total/ot_redemptions.php
with the new one found in this zip
1.
Overall reffresh of the code.
*compatibility with the latest osCommerce-2.2rc2a.
*compatibility with MySql V5.xx .
*compatibility with PHP V5.xx and V6.00 .
- Register_global off
- Register_long_array off
2.
Bug fixed at admin section.
when sorting points on a page other then the first page,
the script took you back to the first page.
3.
Bug fixed at admin section.
when adjusting points to a customer without points and auto expire is on,
the date left empty.
4.
Created a new installer.
The old installer did not work on heavily secured servers.
5.
Updated the code to reflect the tax issue.
osCommerce-2.2rc2a team has made changes to the currencies class,
read osCommerce-2.2rc2a log file for more details
6.
Updated the code in refer to products_info.php .
Points information no longer shown on a none qualified Product.
7.
Bug fixed at create account page .
Email did not sent out at all if the point system is turned off.
8.
Fixed a possible security hole .
where an hacker could go trough and add mutiple referral points for the same order.
9.
Clean up the INSTALL.txt file .
Some people had problem understanding it.
10.
Added the new FAQ type Provided by Phocea.
-Clean up the file and removed none English comments.
-Moved the css elements to catalog/stylesheet.css
-Fixed a minor bug in Phocea's version where the date not show
at FAQ no.14
10.
Maybe some more .
There is a good chance that i made a few other changes along the
way and probably forgot about it.
--------------------------------------------------------------------
The user wanting to upgrade this contribution will need first upgrade to the latest osCommerce-2.2rc2a
then replace the module core files as well as go trough the install.txt to confirm that
your code is the same.
There is a demo site for a limited time.
You can find the link at the module forum topic.
Ben Zukrel
DEEP Silver Accessory
Yamagata City, Japan.
http://www.deep-silver.com
In this archive is :
customers_points.php
customers_points_pending.php
In the original package when you try to search over admin side, for an user or an order, you will notice that you will be redirected to login page.
I have added up some files in the search for of these two files.
USAGE: Backup original files, place the files into ROOT/admin/ .
Best regards, Tibi !
I am still working on re - releasing this entire contribution and am currently working out a couple of kinks.
Here is an updated set of installation instructions.
Just the installation instructions here......
Regards
Sol
--------------------------
I have recently installed this contribution and found it very difficult and messy.
I decided to re-publish the entire package - however I have run into a few issues.
Whilst I solve these, I decided it would be worthwhile to republish the instructions associated to the installation.
I hope you will find this useful, please bear in mind it is based on previous instructions....
I would suggest installing this contribution on a test site first
BACK UP BACK UP BACK UP
I will upload the entire package when time permits.
Please post questions in the forum
I welcome collaboration on this so we can get this contribution working properly.
Cheers
SSNB
NB just the instructions file in here
Lets points and vouchers completely pay for an order. IF CCGV installed, see if points and vouchers cover order total together(only if both points and vouchers are both used).
1. in catalog/includes/classes/order-total.php
***FIND:***
// #################### Begin Added CGV JONYO ######################
global $payment, $order, $credit_covers, $customer_id;
// #################### End Added CGV JONYO ######################
***CHANGE TO:***
// #################### Begin Added CGV JONYO ######################
// $gv_payment_amount added for Points and Rewards CCGV Compatibility
global $payment, $order, $credit_covers, $customer_id, $gv_payment_amount;
// #################### End Added CGV JONYO ######################
2. In catalog/checkout_confirmation.php
***FIND:***
##### Points/Rewards Module V2.00 check for error BOF #######
if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && USE_REDEEM_SYSTEM == 'true') {
***ADD AFTER:***
// BOF Points and Rewards & CCGV covers
if (tep_session_is_registered('cot_gv') && ($cot_gv=='on')){
(tep_calc_shopping_pvalue($customer_shopping_points_spending)<=($order->info['total']-$gv_payment_amount)) ? $ccgvpoints_covers = false : $ccgvpoints_covers =true;
}
// EOF Points and Rewards & CCGV covers
***FIND:***
if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers)) {
***CHANGE TO:***
if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers) && (!$ccgvpoints_covers)) {
***FIND:***
if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers)) {
***CHANGE TO:***
if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers) && (!$ccgvpoints_covers)) {
Ajout des fichiers en français + traduction du .sql en français
pack complet avec les dernieres corrections
Adding files + french translation. Sql in french
Full Pack with the latest fixes
Points for comments are not correctly assigned in v.2,0d.
You must edit catalog/includes/functions redemptions.php file and modify function tep_add_pending_points($customer_id, $insert_id, $points_toadd, $points_comment, $points_type)
first line
$points_awarded = $points_toadd * POINTS_PER_AMOUNT_PURCHASE;
must be changed by
if ($points_type=="RV"){
$points_awarded = $points_toadd;
} else {
$points_awarded = $points_toadd * POINTS_PER_AMOUNT_PURCHASE;
}
File : catalogadmincustomers_points_pending.php
at ligne 102, replace this :
$notify_comment = sprintf(EMAIL_TEXT_COMMENT . ' ' . $comment_cancel) . "n";
by this line :
$notify_comment = sprintf(EMAIL_TEXT_COMMENT, $comment_cancel) . "n";
With the last post there came some other mistakes so don't use this code...
if you have register globals off
make a php.ini
I use this content and everything is working:
register_globals = On
safe_mode = Off
upload this php.ini to your catalog folder....
Thanks to deep-silver for this constribution
for all having trouble showing points on checkout_confirmation.php register_globals=off could be the reason...
to fix this problem, simply change one thing:
in catalogincludesmodulesorder_totalot_redemptions.php search for:
// if customer is using points to pay
if ($customer_shopping_points_spending > 0){
$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($customer_shopping_points_spending));
$this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
'text' => '<font color="FF0000">-'.$currencies->format(tep_calc_shopping_pvalue($customer_shopping_points_spending), true, $order->info['currency'], $order->info['currency_value'].'</font>'),
'value' => tep_calc_shopping_pvalue($customer_shopping_points_spending));
}
and replace with:
// if customer is using points to pay
if ($_POST['customer_shopping_points_spending'] > 0){
$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']));
$this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
'text' => '<font color="FF0000">-'.$currencies->format(tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']), true, $order->info['currency'], $order->info['currency_value'].'</font>'),
'value' => tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']));
}
------------------
second solution but not that safe is to overwrite existing ot_redemptions.php with that one I included...
Thx for this wonderful constribution goes to silver...
fix by www.artesanias.de
includes only some files translate in german
This small fix will prevent getting mutiple referrals for the same person.
I don't used the Remeber Referrer below so I'm not sure how it affects that.
These modifications make it possible to keep in memory the referrer of a customer.
It will request the email of the referrer at the creation of the account.
If you activate referral in the course of production, the system will require the referrer of the moment of the payment (as actually) and will save him.
(Excuse for my english)
-------------------------------------------------------
Ces modifications permettent de garder en mémoire le parrain d'un client.
On demandera le mail du parrain au moment de la création du compte ou, si vous activez le parrainage en cours de production, le système demandera le mail parrain au moment du paiement (comme actuellement) et l'enregistrera dans la base.
PS : Je cherche une traduction francaise de cette contribution, merci ;-)
Minor query bug in customers_points_referral.php
Line 435:
$order_query = tep_db_query("SELECT o.customers_name, o.payment_method, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s WHERE o.orders_id = '" . (int)$pending_points['orders_id'] . "' AND s.language_id = '" . (int)$languages_id . "' AND ot.class = 'ot_total' LIMIT 1");
should be:
$order_query = tep_db_query("SELECT o.customers_name, o.payment_method, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s WHERE o.orders_id=ot.orders_id and o.orders_id = '" . (int)$pending_points['orders_id'] . "' AND s.language_id = '" . (int)$languages_id . "' AND ot.class = 'ot_total' LIMIT 1");
Attached the modified file only.
Deleted 3 archives (application_top.php, database_tables.php and filenames.php) from the "new files" folder, because this archives are NOT new, and they are in the "modified files" folder.
It's all.
** Full Package Included **
This is a full package including a better way of displaying the FAQ as well as the Paypal IPN 3.1.5 installation instructions
Included is only a simpel texte file including the changes to make to your Paypal module in order to work properly with Points and Reward 2.0
The latest upload missed the image folder contain
the gif image for catalog side.
there is a small change to catalog/includes/functions/redemptions.php
to support non expire date.
this is the full package again.
as always replace catalog/includes/functions/redemptions.php
with the one found in this package.
DEEP-SILVER
Bug fixed where dates not addred correctly in MySQL 4.0.24-nt
update MUST replace
catalog/includes/functions/redemptions.php
with the new one found in the zip
Dated: JULY.15.2006 V2.0b
--------------------------
Added the support for expire date when using points for new signup.
To update replace
catalog/includes/functions/redemptions.php
with the new one found in the zip
This is the whole package again
Some lines in redemptions_update.sql has doble quote (") and generate erros when update manualy.
Maybe some errors generated with this upgrade (1.6 to 2.0) is because this file.
This is a complete package
Normando
There was a bug in redemptions_update.sql file. this has been fixed as well as added the ability to set the expire date to customers who already has points.
When using the auto installer.php the script will verify the expire months while when using a manual update you will have to open the redemptions_update.sql and set the expire months statement before executing it.
Writeen by DEEP SILVER ACCESSORY Contributed to the osCommerce Project under the GNU General Public License.
To be used with osCommerce-2.2ms2-051113
Version 2.00 Dated: 2006/JULY/07
--------------------------
1.Added Admin features.
Added Referral points to the system .
Admin can now award referral points to customers.
When referred friend place an order, during the checkout procces on the same page that you select a payment
method there will be a box to enter a Referral code. Referral code is the Referral registered email address.
This feature can be turn on/off via admin.
*.Added Review points to the system .
Admin can now award Review points to customers.
All points for review are in pending untill admin confirm them(unless using auto confirm)
*.Enable/Disable Auto Credit Pending Points(in days)
Admin can now set the system to auto confirm pending points and auto update customers
account balance upon each success checout.
Set a days period before the reward points will actually added to customers account.
*.Enable/Disable Auto Expire Points(in month)
Admin can now set points expire date, using a cron job the script will remove customers points and pending rows
after expire date.
*.Enable/Disable Points Expires Auto Remainder(in days)
Admin can now set the numbers of days prior points expiration for the script to run.(Auto Expires Points must be enabled)
All customers where their points will expire in numbers of days from remainder will receive an email advice them to use
thier points balace before expire date.
*.Set Points Decimal Places.
Admin can now Pad the points value with amount of decimal places.
*.Sort Points.
Admin can now sort all type of points with all types of order status.
2.Updated the code in refer to catalog/checkout_payment.php
The checkbox will contain only the maximum points redeemptions allowed.
When customer choose to use his/her points balance, he/she will be using all points available/allowed.
3.fixed a tiny bug in catalog/my_points.php
where table layout brake when refershing the same page.
(amazing how nobody reported it before i have to find all bugs)
4.Made change to table structure for table 'customers_points_pending'
To avoid scripts error while using both orders status and points status as well as points comment and order comment.
The table is now holding points type.
5.Combined limit points before Redemptions and limit points to be use per order.
doing this saved script and one database query. so now in order to set points redemption to
exact amount you must set both options above to same amount.
5.Combined all 3 Restriction options into a loop.
No more on/off to disable it you must leave it empty. else Restriction is on what ever come first.
1.Model 2.Products ID, 3. Categories Cpaths.
6.Installer.php can now handle upgrade from V1.60 to V.200.
the install check for previous module in database and if found it will show update screen.
if version 2.00 it will show the Uninstall screen. else will show wellcome screen.(because the script is actually on my site and the installer just calling it,
on some server with havey security it will not work)
Made some code cleaning and few changes here and there that i can even remember, therefore i advice all
of you who upgrading from V1.60 to replace all this module files.
--------------------------
This is the full package includes update and modified osCommerce PayPal IPN Module v1.3
All support handled through the osCommerce forums. Please do not email directly.
before posting read others post to make sure you not posting the same.
http://forums.oscommerce.com/index.php?showtopic=152746
DEEP SILVER ACCESSORY.
Yamagata City, Japan
Added an installer to help new users installing tables(instead of using PHPMyAdmin).
The installer.php will...
1.check for duplicated rows.
2.make sure to creat a uniqe configuration group ID.
3.Will auto install module options using your store default currency.(so don't have to worry about the YEN symbol).
4.will reconfirm each step to avoid error or overwriting database rows.
5.Installer also conatin an Uninstall wizard to insure saftly removal of this module(when needed).
6.Solve me the time i spent giving supprt on how to use PHPMyAdmin to creat tables.
To use it...
Place the installer.php (found in this package) inside your catalog folder.
(same place where your store index.php file is)
then call this file via your browser
i.e. = http://www.YOUR DOMAIN NAME / YOUR CATALOG DIR / installer.php
.. and just follow the Installation Process wizard and you done!
Don't forget to remove this file from your server when done.
That's it.
Hope you will find it useful.
Good Luck everyone.
DEEP-SILVER ACCESSORY
This is the same full package.
just updated installation instrctions for stores
owners upgrading from V1.50 .
also small minor change in admin/includes/languages/english/orders.php
where the email subject is using the same as order update.
in this file find...
define('EMAIL_TEXT_SUBJECT', 'Shopping Points Account Update');
and replace with...
define('EMAIL_TEXT_SUBJECT2', 'Shopping Points Account Update');
just added '2' after 'EMAIL_TEXT_SUBJECT
.
those who experienced error in admin/orders .
try to compar with the modified files i also subbmited.
DEEP-SILVER
1.Added Admin features.
Added admin ability to confirm pending points via admin/order.php .
admin can now confirm pending points when updating order status.
An additional checkboxt added next to customer notify check box.(default status of the checkbox is uncheked)
if admin check the box to notify customer, an additional email will be send out to
the customer notifying him/her of points status update and current points balance.
This option will only show up when there are pending points for that order and only if Auto Credit Pending Points
is set to "false".(see below ...)
*.Enable/Disable Restriction of Points Redemption For Minimum Purchase Amount(as per request at the forum)
Admin can now set the Minimum Purchase Amount required before any Points Redemptions can take place.
The amount set is according to admin default currency.
i.e if admin set the minimum amount to 50 and the store default currency is set to $US
then the customer will need to buy no less then $50.00 (per purchase)before he/she can use the points
balance to pay for the purchase.
*.Enable/Disable Auto Credit Pending Points(as per request at the forum)
Admin can now set the system to auto confirm pending points and auto update customers
account balance upon each success checout.
Default is set to false(using this feature is not recommended)
2.Updated the code in refer to catalog/checkout_payment.php
Now the box contain more info of the estimated total and the maximum points redeemptions allowed.
The checkbox to use all available points credit will show up, however
the script will check to see that the customer points balance is not higher then the total purchase
if in that case the check box will contain only the maximum points redeemptions allowed.
3.fixed a tiny bug in catalog/my_points.php
where a wrong status shown when admin reverse any order status.
4.a small addon to shopping cart info box.(as per request at the forum)
Now when a customer is loged on and his/her points balance is higher then 0
the cart will contain the accounts points balance info with a link to my points page.
5.When New signup customers awarded with welcome points, an additional information in refer
is added to the New signup email sent out by default.
The information conatin the same info shown on creat account success page.
You must set your send HTML format email to "true" in order for the link to my points and
points program FAQ pages to be clickable.
7.Changed the default query for admin/customers_points_pending.php
When the page first loaded the script will only list up the points with the status "pending".
This is made in order to speed up page loads and database queries for a stores with lots of customers.
in return you wil need to use the switch view to list up other points status.
* admin/customers_points_pending.php has now the same sort method as customers_points.php
------------------------------------------------------------------------------------------
Dated: Octomer.19.21.2005 V1.51
--------------------------
Added extra languages files,
French & German and Italian languages files(catalog only)for this module. provided by urbach.
All credit for those languages addon goes to him.
I wish there where more nice people out there.
1.Added Admin features.
Added admin ability to confirm pending points via admin/order.php .
admin can now confirm pending points when updating order status.
An additional checkboxt added next to customer notify check box.(default status of the checkbox is uncheked)
if admin check the box to notify customer, an additional email will be send out to
the customer notifying him/her of points status update and current points balance.
This option will only show up when there are pending points for that order and only if Auto Credit Pending Points
is set to "false".(see below ...)
*.Enable/Disable Restriction of Points Redemption For Minimum Purchase Amount(as per request at the forum)
Admin can now set the Minimum Purchase Amount required before any Points Redemptions can take place.
The amount set is according to admin default currency.
i.e if admin set the minimum amount to 50 and the store default currency is set to $US
then the customer will need to buy no less then $50.00 (per purchase)before he/she can use the points
balance to pay for the purchase.
*.Enable/Disable Auto Credit Pending Points(as per request at the forum)
Admin can now set the system to auto confirm pending points and auto update customers
account balance upon each success checout.
Default is set to false(using this feature is not recommended)
2.Updated the code in refer to catalog/checkout_payment.php
Now the box contain more info of the estimated total and the maximum points redeemptions allowed.
The checkbox to use all available points credit will show up, however
the script will check to see that the customer points balance is not higher then the total purchase
if in that case the check box will contain only the maximum points redeemptions allowed.
3.fixed a tiny bug in catalog/my_points.php
where a wrong status shown when admin reverse any order status.
4.a small addon to shopping cart info box.(as per request at the forum)
Now when a customer is loged on and his/her points balance is higher then 0
the cart will contain the accounts points balance info with a link to my points page.
5.When New signup customers awarded with welcome points, an additional information in refer
is added to the New signup email sent out by default.
The information conatin the same info shown on creat account success page.
You must set your send HTML format email to "true" in order for the link to my points and
points program FAQ pages to be clickable.
7.Changed the default query for admin/customers_points_pending.php
When the page first loaded the script will only list up the points with the status "pending".
This is made in order to speed up page loads and database queries for a stores with lots of customers.
in return you wil need to use the switch view to list up other points status.
* admin/customers_points_pending.php has now the same sort method as customers_points.php
Here is the catalog part for this mod in Italian
also provide to us my chooch so he gets all credit for it.
more info can be found at the forum.
This is only the language file.zip
Those are the French & German languages files(catalog only)for this module. provided by chooch.
All credit for thie addon goes to him.
I wish there where more nice people out there.
Enjoy.
This is not the full package only the languages files.
Just a small update for
catalog/admin/customers_points.php
Admin can now sort the list of customers by thier points,first name,last name or date of birth
You can now list up your customers points ABC,123 or whatever you want.
To upgrade Just replace
catalog/admin/customers_points.php
with the one found in this zip.
Hope you will find it usefull.
Deep-Silver.
fixed install.txt found in the below zip
This uploaded only contain the nececary files for this module , the full package is way over 300K
as it contained a complite set of files for core install as well as lots of screenshots.
if you after the full download, you can get it from my site.
http://www.deep-silver.com/oscommerce/points_reward_V1.50.zip
I just made the admin buttons in spanish according to the text i recived from Antonio Garcia I did not make the spansih language files and can't read them so i can't take responsibility for it please read the forum for more info.
1.Small updates to the code in refer to catalog/checkout_payment.php
The checkbox to use all available points credit will only show up when the customer points account
total is less then whole payment.
2.An addon to admin/customers_points_pending.php
Admin can now filter view the points by thier status.
3.The module has now a full support for Spanish language(includes admin buttons) available to the OsCommerce Community
by Antonio Garcia .
Full credit go to him for his time and efford for those addon.
along with a requst to the OsCommerce Community for other languages support.
The latest updated allowed a negative resoult in order toatl when a customers use both points and gift vouchers.
this has benn fixed in return for this....
Customer can only use both modules only if other payment method selected or if points cover the total cost or gift voucher account founds enough to cover the total cost.
for store alredy using this module just refer to corrections.txt file found in this zip.
This issue requeire future testing by stores using both moduls.
please post the forum a.s.a.p any bugs errors itc...
thank you.
Deep Silver
Thanks to Chooch(read the forum).
Small updates to the code in refer to catalog/checkout_confirmation.php
in order to obtain compatibilty with the latest Credit Class & Gift Voucher and XTML issues.
for store alredy using this module just refer to installation instructions(CATALOG STEP = 3)
and replace your code with the latest one found in that chapter.
This is the full package NOT include the below addon in regard to shipping fees.
This modification will allow you to choose if you want or do not want customers to use points to pay for shipping. It is a simple modification that should take you no more than 2 minutes to complete.
Please remember to backup - we take no responsibility for loss or damage!
Added Admin features.
* Added admin ability to rollback confirmed points to pending points .
The Roll Back buttom will ONLY show up when there are points to roll back and only if those points are already confirmed.
* Enable/Disable points awarded for order with redeemed points.(as per request at the forum)
When order made with Redeemed Points.
When set to false, customers will NOT awarded with points even if only part of the payment made by points.
* Updated.. catalog/includes/languages/english/my_points_help.php
to refalx the above changes.
* Added admin ability to ajust Customers Qualified Points amount.
This option enable you to quickly ajust the total amount of points.
Note that this will replace the current points amount and customer will not be notify.
* Added java script to check for invalid charecters entered in admin section .
When a Admin enter invalid charecter(any charecters other then numbers).This is to avoid errors reading
points value when using languages convert keborards like Japanese or Chinese to input digit. This javescript
make sure that only numbers entered.
--------------------------------------------------
This zip package includes...
* A folder contain all files and images required by this module .(sorry,only english language files provided).
* A folder contain all images, new and modified files required by this module (for a fresh install).
* A folder contain upgrades installation instrctions.
* Step by step installation instrctions(corrently only in english).
All support handled through the osCommerce forums. Please do not email directly.
http://forums.oscommerce.com/index.php?showtopic=152746
Not a big deal.
Forgot to add one line.....
B. ADD this new button image "button_ajust_points.gif" into..... admin/includes/languages/english/images/buttons/
That's it.
Enjoy
(full package again)
As per request at the forum.
Added admin ability to ajust pending points amount before aproval.
Full package(no screenshots, you can get them from the demo site at http://www.deep-silver.com/shop/).
** If you don't use half points and wish to get rid of the 2 decimal showing on points (i.e change from 1,000.00 points to 1,000 points).
open all files that show points and look for the code that start with this ...
number_format(
and remove the ,2 between "number_format(" and ")" .
for example:
open catalog/my_points.php
...find this (line no.168)
number_format($points['points_pending'],2)
....and replace it with this...
number_format($points['points_pending'])
---------------------------------------------------------------------------------
THAT'S IT.
Enjoy.
any problems?
Please vist the forum
http://forums.oscommerce.com/index.php?showtopic=152746
This is the full package again(no screenshots) updated with the above information.
1.Tewaked the code for a faser load of *.PHP
The same idea with much shorter code.
2.Fixed bug in admin/customers_points_pending.php
where confirming points for order with redeemed points return wrong result.(thanks to James Wyld,resolvIT Pty Ltd.).
3.Added Admin features. admin can now Set the Products Id allowed When Products Restriction enabled.(unlimited products).
or Set the Categories ID allowed When Products Restriction enabled.(unlimited categories path).
4.Updated..
catalog/includes/languages/english/my_points_help.php
to refalx the above changes.
5.Made redemptions box compatible with select payment method alart so disabling the java script is no longer neccessry.
6.Added java script to check for invalid charecters entered to redemptions box .
When a customers enter invalid charecter(any charecters other then numbers).This is to avoid errors reading
points value when using languages convert keborards like Japanese or Chinese to input digit. This javescript
make sure that only numbers entered.
7.Changed html layout for redemptions box to match payment layout and center shop contribution.
8.Added an extra error to inform customer using small amount of points that the points value is not enough
to cover the cost and ask to select another payment method.
9.improved security by minimazing seassons to use by this module.
10.some other small changes that even i can't remember...
typo error found at the last upload this has been fixed and upload the full package again.
1.Tewaked the code for a faser load of *.PHP
The same idea with much shorter code.
2.Fixed bug in admin/customers_points_pending.php
where confirming points for order with redeemed points return wrong result.(thanks to James Wyld,resolvIT Pty Ltd.).
3.Added Admin features. admin can now Set the Products Id allowed When Products Restriction enabled.(unlimited products).
or Set the Categories ID allowed When Products Restriction enabled.(unlimited categories path).
4.Updated..
catalog/includes/languages/english/my_points_help.php
to refalx the above changes.
5.Made redemptions box compatible with select payment method alart so disabling the java script is no longer neccessry.
6.Added java script to check for invalid charecters entered to redemptions box .
When a customers enter invalid charecter(any charecters other then numbers).This is to avoid errors reading
points value when using languages convert keborards like Japanese or Chinese to input digit. This javescript
make sure that only numbers entered.
7.Changed html layout for redemptions box to match payment layout and center shop contribution.
8.Added an extra error to inform customer using small amount of points that the points value is not enough
to cover the cost and ask to select another payment method.
9.improved security by minimazing seassons to use by this module.
10.some other small changes that even i can't remember...
When customer click on one of the rows shown it my points page the link will take him/her
to the order history page to view the details. then trying to return to my points page, using
the default back buttom shown will take the customer to My Order History page.
This will solve the problem as it use the jave script to return one step back (history.go(-1)).
open catalog/account_history_info.php
Find this.... (Start at aprox. line no.238)
<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
..and replace it with this.......
<!-- // Points/Rewards Module v1.20 history_back_bof
<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
//--> <td class="main"><a href="javascript:history.go(-1)"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a></td>
<!-- // Points/Rewards Module v1.20 history_back_eof //-->
Full packge again include modified catalog/account_history_info.php.
This is the same full package.
just updated installation instrctions for stores
owners upgrading from V1.10 .
PLEASE NOTE:
make sure you haven't made any change to configuration group ID, if yes you must
do the same change to redemptions_update.sql before applying any other change.
As well as by any chance if some rows shown with wrong sort no. then you should do the correction
to sort order to fit you need.
its always a good idea to open redemptions_update.sql with your text editor and view the statements
before applaying change to your databse. since this is just an update I'm not sure if it will match
your rows sort order.
PLEASE NOTE:
If your customers already have points you MUST confirm that their points updated correctly
as some points values might get rounded both way up or down. this can end up with wrong results.
in this case you will have to ajust those points manually.
P.S
The package below is the same v1.20 nothing change to the contribution its just an addon for people using PayPal IPN Module v1.1.
For stores owners wanting to use this contribution with: osCommerce PayPal IPN Module v1.1 For 2.2MS2.
This is the Full package included
Paypal IPN Modifications instrctions as well as a modified paypal_ipn.php (V1.1)
Note the include attached paypal_ipn file has been modified with all updates and patch.
use it at your own risk.
Deep Silver
Fixed bug in .
admin/customers_points_pending.php
where emails sent out with incorrect order date format.
Change the way points handled by the system.
points are now similar to the way values display.
Changed INT(11) to DECIMAL(15,2) so now points no. have .00
for example 100 points will now show 100.00 points.
I've made this change for store owners that deals with small amounts
and set the points value way below 1 points.
So now admin is able to handle/add/delete points value under 1
for example 1.50 points or 0.50 0.43 and so on.
as per requests at the forum...
Added Admin features.
1.Enable/Disable points awarded for discounded products.
Admin can choose if to award points for products that already discounded (i.e speacials).
If admin choose NOT to award points for specials and display points info in product info page is set
to 'true' .Customers will see "No points awarded for discounted products." insted of points value .
2.Enable/Disable Products Price Restriction.
Admin can choose if to allow points redeemptions for products that already discounded (i.e speacials).
tested to wotk with products specials. I'm not sure if it will work with PWA contribution but the idea
is that when ever Products Price Restriction enabled. Any price other then the full price will disable
the redeemptions box.
3.Enable/Disable Keeping Records of Redeemed Points.
Admin now has the option to keep records of all redeemed points.
When disabled, redeemed points recorded in customers order history only.
When enabled, redeemed points recorded also in costomers points row and the customer will see the order
info and will be able to click the row and this will take him to the order history page.
Updated catalog/includes/languages/english/my_points_help.php
to have all new features information.
This page has an auto update info.When ever admin make change to the points system values,
it will say this page last updated (last modified dates are pulled up from database).
** Please note when you first install this mudule you must update all vaiables in admin points/reward option
screen alse the last update date will not show.
Clean up the code in order to try to boost up the system.
Changed the way points shown up in my points page.Now points shown with their values.
if the customer made order but has got no points yet, instad of showing points info with 0 values.
it will now show "You don't have Qualified Points yet."
This zip contain all packge with complete set of files for new install.
and installation instrctions to upgrade from V1.10 .
there are NO screenshots here.
The demo site is still online.
Store owners wanting screenshots will be able to download a packge includs screenshots from the link at the site.
sorry the below bugs fixed is refer to
admin/customers_points.php
admin/customers_points_pending.php
and not the languages files
Fixed a small bug thanks to Young Tae Byun .
in...
admin/includes/languages/english/customers_points.php admin/includes/languages/english/customers_points_pending.php
where emails sent out with incorrect Gender greeting.
Replace the above 2 files with the one in this zip.(only contain the 2 files)
Please read this post in the forum for more info.
http://forums.oscommerce.com/index.php?showtopic=152746&st=141
I missed up this step while modifiying installation instrctions. i also had to fix up the spam things on the test shop. im sos sorry for that
* modified admin/customers_points.php
as per post at the forum please read for more details.
this is the full package with all modified files.
if you haven't made any change to this modules original files then the simple way is to replace all new* files with the one in this zip
O.K
now its fixed
sorry evrybody
this zip is the same as the one before
ATTENTION ALL...
Do not access points reward test shop untill i fix it.
Someone was smart enough to add a spam that pull out visitors to the test site
info and send email that look like from me
ITS NOT ME!!!!!!!!
i have to clean few things give me time
DEEP
New Version with extra features as per request at the forum.
Added Admin features.
--------------------------------------------------
1.Enable/Disable points awarded for taxes.
2.Set the Maximum redeemptions points allowed per order.
3.Limit Points Redemptions to exact amount.
4.Enable/Disable Points credit information. shown in products info page.
Fixed grammar, spelling, layout in catalog/includes/languages/english/my_points_help.php
Thanks to James Stewart http://store.majiks.ca/
--------------------------------------------------
To test the customer side please use...
http://www.deep-silver.com/shop/
E-Mail Address: test@test.com
Password: users
to test the admin use this link
http://www.deep-silver.com/shop/admin/
THE ZIP uploaded here contain...
1.folder contain all files and images required by this module
2. folder contain all images, new and modified files required by this module (for a fresh install).
3. Step by step installation instrctions.
4.upgread from V1.00 installation instrctions.
NO SCREENSHOTS includes.
if you need screenshots go to my site and download the full packges.
http://www.deep-silver.com/oscommerce/points_reward_v1.10.zip
All support handled through the osCommerce forums. Please do not email directly.
http://forums.oscommerce.com/index.php?showtopic=152746
An addon to STEP BY STEP INSTALLATION instrctions
For stores with Credit Class & Gift Voucher contribution installed.
(updated install instruction B in reffer to catalog/checkout_confirmation.php)
THE ZIP uploaded here contain...
1.folder contain all files and images required by this module
2. folder contain all images, new and modified files required by this module (for a fresh install).
3. Step by step installation instrctions.
NO SCREENSHOTS includes.
if you need screenshots go to my site and download the full packges.
http://www.deep-silver.com/oscommerce/points_reward_v1.00.zip
To all of you who install this and still having problem with redemptions.php
just replace the file in this zip to the same place in you catalog(catalog/includes/functions/redemptions.php)
or get the letest vrsion from my site
http://www.deep-silver.com/oscommerce/points_reward_v1.00.zip
All support handled through the osCommerce forums.
http://forums.oscommerce.com/index.php?showtopic=152746
As a respect to the contributors and as part of GNU General Public License
You are not allowed to remove any of the comments/links to oscommerce web site.
This zip only contain
catalog/includes/functions/redemptions.php
DEEP SILVER ACCESSORY
To all of you out there.
It's good to know that you can run this mod on your site and thank god that all the
post here regard the YEN or $ got clear and more then all the problem with missing fuction that some people where having errors.
well to be hunest I really don't find any diff in the catalog/includes/functions/redemptions.php that i have in my site and the one that had been fixed if you compers the files you will see that its the same file.
the most recent updated or latest or call it what ever you want but its still Points/Rewards Module v1.00 since nothing changed in the files and WORKING vesrsion was up and running way before who ever made it to v.100
and the screenshots and live test can confirm that, for me its still Points/Rewards Module v1.00 and its still consider beta and subject to bugs or error. even if its looks like it run well you must remember that i just made it and it take time before
other users try it enough to find bugs.
BUT its really dosent metter you can call it Points/Rewards Module v1.00 or Points/Rewards Module v1.2 its up to you as long as you happy it with then im happy to .that is the reson i made it from the first place.
Please note that the zip uploaded here is NOT the full version its only contain the file needed for this bod to work.
The full version is too lage to upload here(over300k) .
You can downloaded from my site use this link
http://www.deep-silver.com/oscommerce/points_reward_v1.00.zip
the full version contains...
* A folder contain all files and images required by this module .(sorry,only english language files provided).
* A folder contain all images, new and modified files required by this module (for a fresh install).
* A folder contain screenshots admin and catalog(I think that all contributions uploaded here should have).
* Step by step installation instrctions(corrently only in english).
God bless all of us.
DEEP SILVER ACCESSORY
p.s please don't mine my spelling mistakes
Appologies ppl, the wrong redemptions.php slipped in.
This now contains the correct one, full install package.
Appologies again.
HTH
Fatmcgav
Hey there,
This is just a update to this module, which incorporates the correct redemptions.php file, and a slight addition to the installation instructions to fix the parse error.
Full credit goes to the original author, i just put the files togeather so they work :D
Cheers
Fatmcgav
To make sure everyone knows this is a beta project and that maybe there are errors, bugs or god knows what.
The zip uploaded here only contain this *Points & Rewards Module BETA* with ONLY files needed.
I've setup a test shop in order for you to test this module, please pay respact and try not to spend long time logedin so others can test it as well.
Products shown are for demonstrational purposes, any products purchased will not be delivered nor will the customer be billed and no mail will sent in or out via this site.. Any information seen on these products is to be treated as fictional.
To test the customer side please use...
http://www.deep-silver.com/shop/
E-Mail Address: test@test.com
Password: users
to test the admin use this link
http://www.deep-silver.com/shop/admin/
if you like it you will be able to downloaded from the test site
and here.....
http://www.deep-silver.com/oscommerce/points_reward_v1.00.zip
Hi evrybody.
Thanks for your interest in this module.
I made a mistake the STEP BY STEP INSTALLATION instrctions chapter G.
This is the correction for chepter C.
##############################################
G. open catalog/checkout_process.php
Clear sessions used at checkout if by any chance they still active.
Find... (aprox. line 275)
tep_session_unregister('comments');
... and add after.....
tep_session_unregister('customer_shopping_points');// Points/Rewards Module v1.00
tep_session_unregister('customer_shopping_points_spending');// Points/Rewards Module v1.00
##############################################
I've tested this on a some shops.
and on my pc with windows server and sql version 4.0 php version 4.3.
I will now try to set up a live test shop on my server to give some more
idea and maybe find any error while using linux system with apache
This zip only contains the files needed with this fix.
The idea comes from contributions...
http://www.oscommerce.com/community/contributions,2082
http://www.oscommerce.com/community/contributions,2221
but they are not required and its NOT an update to them .
Please note that even if this contribution carry the same title as contributions 2221,
they are NOT the same and you WON'T be able to merged this module with contributions 2221.
that's the reason i did not uploaded there, if you already installed contributions 2221 or cosidering
it, you will have to make your choice amoung the two.
(NOT like contributions 2221, this module does NOT require any of the functions required
by Credit Class & Gift Voucher so you can use it with or without Gift Voucher contribution(tested)
What does this module do ?
------------------------------------
I think that the title say it all.
This is a Points and Reawrds system,(more or like a cash back or discount system)
aimed to popup sales and get new usrs to signup.
The system awards shopping points to customers for the amount they spend.
Points consider as cash when redeemed, so points are in pending status untill approved by admin.(manually)
Once approved, customers can then use those points to pay for order druing checkout.
Admin features.
------------------------------------
1.Enable/Disable the Points System.
2.Enable/Disable the Redemptions System.(maybe you would like to offer a gift and not money back).
3.Set the number of points awarded for evry $1.00 spent(or whatever based on your currency system).
4.Set the value of each point(based on your currency system).
5.Enable/Disable points awarded for shipping fees.
6.Enable/Disable Products Restriction.
7.Set the model name allowed When Products Restriction enabled.(only one group)
8.Enable/Disable Points Limitation. and set the number. of points needed before they can be redeemed.
9.Enable/Disable Welcome Points. and set the Points amount to be auto-credited for New signup customers.
10.Admin can view/add/delete customers points with/without queuing customers points table(optimised the database).
Customes features.
------------------------------------
* New signup customers can be awarded with welcome points.
* Customers can earn points(cash back) for an item purchased at the store.
* Customers can choose the amount of points they would like to spend.
* Customers can view their shoping points account status.
The system designed to use minimum database space, customers points hold in customers table while
all other points hold in customers_points_pending table.
Once pending points approved by admin, pending points move to customers account so table used stay optimised.
Redeemed points recorded in customers order history only.
What this module does not do ?
------------------------------------
1.The system designed for a small to medium shops.
Since shopping points cosider as money when redeemed. awarded points default status is pending.
Customers shopping points account will never be auto-credited(except points for new signup if enabled).
if you own a large shop with lots of orders daily, it could be hard to keep track of points
then this system is NOT for you.
2.When admin delete order while points status for that order is still pending. those points will also be
deleted, however if admin already approved those points, admin must delete them manually(via admin panel).
This module as been tested on a fresh install of osCommerce Version 2.2MS2
as well as on a fully modified versions (includes Credit Class & Gift Voucher contribution).
Please use it at your own risk.
The full zip package includes...
* A folder contain all files and images required by this module .(sorry,only english language files provided).
* A folder contain all images, new and modified files required by this module (for a fresh install).
* A folder contain screenshots admin and catalog(I think that all contributions uploaded here should have).
* Step by step installation instrctions(corrently only in english).
Please Note: a light zip contains only files needed for this module uploaded here.
All support handled through the osCommerce forums. Please do not email directly.
http://forums.oscommerce.com/index.php?showtopic=152746
As a respect to the contributors and as part of GNU General Public License
You are not allowed to remove any of the comments/links to oscommerce web site.
