Jump to content
deep-silver

### POINTS AND REWARDS MODULE V1.00 ###

Recommended Posts

Hi

 

I was wondering.

 

Can we upgrade to V1.4 from V1.0?

 

the upgrade instructions say upgrasding from V1.4 - V1.4? Do we have to install V1.3 first then do the upgrade to V1.4?

 

 

Thanks

Share this post


Link to post
Share on other sites
Hi

 

I was wondering.

 

Can we upgrade to V1.4 from V1.0?

 

the upgrade instructions say upgrasding from V1.4 - V1.4? Do we have to install V1.3 first then do the upgrade to V1.4?

Thanks

well.....

To do that you will have to do it step by step start from v.120.

Doing that you will be able to see what change took place druing upgrade.

OR You can overwrite all module files with the one in v1.40 and use the modified files to compar with yours.

The problem is with the database, if your customers have points record using the latest sql file will delete those record.

so the best thing to do is to upgrade database step by step start from v1.20.

Good Luck. :thumbsup:


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

Hey Deepsilver, fantastic work on the module I love it working great, except I am using this paypal IPN module, found here

 

http://www.oscommerce.com/community/contri...1/search,paypal

 

V3.1.5 is the version im using however the points don't work with this, I realize I need to modify something similar to the one you mention for the other module, hoping you could maybe have an idea where to start.

 

cheers

Share this post


Link to post
Share on other sites

####### POINTS AND REWARDS MODULE V1.50 #########

 

Dated: August.10.2005 V1.50

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

 

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.

 

One option that you may want to add on the admin side is that ... when a customer decides to redeem points during checkout, they should not earn points on that purchase.

 

I mean, you could make that an option for the admin to turn that on or off because if you think about it, we'll lose more of our profit.

 

* Enable/Disable points awarded for order with redeemed points(as per request at the forum, we have to make sure Young Tae Byun is :D )

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.

We would be nice:

If in points pending we can go in and adjust the number of points and then approve them.  What we have to do now is go in and cancel the pending points and then apply the correct amount to the clients account.

 

Or if the module just applied to points that are not discounted.

 

Thanks!

 

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

 

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

 

Hope it will back all of us HAPPY! :D

DEEP-SILVER


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
Hey Deepsilver, fantastic work on the module I love it working great, except I am using this paypal IPN module, found here

http://www.oscommerce.com/community/contri...1/search,paypal

V3.1.5 is the version im using however the points don't work with this, I realize I need to modify something similar to the one you mention for the other module, hoping you could maybe have an idea where to start.

cheers

1.

Get the latest version points/rewards V.150 .

2.

This as not been tested so use it at your own risk.

backup....... checkout_process.inc.php .

 

here we go...

open checkout_process.inc.php

 

Find this.... (start at aprox. line no.17)

global $payment_modules, $shipping_modules, $order, $currencies, $cart, $PayPal_osC, $customer_id,
        $sendto, $billto, $shipping, $payment, $language, $currency, $languages_id, $order_total_modules, $order_totals;

 

.. and REPLACE it with this...(we just add this 2 elements to the line $customer_shopping_points, $customer_shopping_points,)

 

#### Points/Rewards Module V1.50 balance customer points BOF ####
 global $payment_modules, $shipping_modules, $order, $currencies, $cart, $PayPal_osC, $customer_id, $customer_shopping_points, $customer_shopping_points_spending,
        $sendto, $billto, $shipping, $payment, $language, $currency, $languages_id, $order_total_modules, $order_totals;
#### Points/Rewards Module V1.50 balance customer points EOF ####*/

still at the same file....

Find this.... (start at aprox. line no.105)

    tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
 }

.. and add this after...

#### Points/Rewards Module V1.50 balance customer points BOF ####
// customer shoppping points account balanced 
 if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) {
   $customer_shopping_points = tep_get_shopping_points();
     tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id);
   if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') {
     tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);
   } 
 } 
// customer pending points added 
 if ((USE_POINTS_SYSTEM == 'true') && ($order->info['total'] > 0) && (get_award_discounted($order) == true)) {
   $redemption_awards = get_redemption_awards($customer_shopping_points_spending);
   $points_toadd = get_points_toadd($order);
   if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0))
     tep_add_pending_points($customer_id, $insert_id, $points_toadd);
 }
#### Points/Rewards Module V1.50 balance customer points EOF ####*/

 

Save and close this file.

Now run a few test to let us know how it went.

also reads posts before in refer to paypal INP.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
Verry good contribution for oscommerce!

Question :  I'm using CRE LOADED 6.15 for my site, is there any chance to install your contribution on my eshop?

I've tried but no chance...the files to modify just don't match the instalation instruction.(don't have the same content)

 

CRE LOADED team did a very good job, you the same...it would be great to go in the same direction  :-"

Sorry about my english...

I've uploaded a POINTS AND REWARDS MODULE V1.50 to be used with CRE LOADED 6.15, at CRE LOADED official site under users contibutions.

from some reason its not shown yet(maybe need approval for any uploads)

anyway if by the time you read this replay if its still not there then use this link.

V.150 FOR CRE LOADED 6.15

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 screenshots admin and catalog.(osCommerce)

* Step by step installation instrctions(currently only in english).

 

Don't just copy, check!

IN THEORY, if you have a clean install of CRE LOADED 6.15 , you COULD copy the files over.

I do not recommend. It may well be that some changes are in yours already, or you have a slightly

different checkout, or whatever.

Also, it is much better to run a ?diff?, find the changes and edit them in manually

(or semi-automatic, like with WinMerge). ( look for //Points/Rewards Module V1.50)

use your editor program to make the change a good (and Free) text editor i recommend is "Crimson Editor"

those are the links to downloads page.

http://www.crimsoneditor.com/

http://winmerge.sourceforge.net/

I only test it with normal payment module Not with any getaway payment module

so you will have to find your way true.

I found a few bugs in 6.15, got nothing to do with my mode.

Please use it at your own risk.

 

Note that i wont be supporting nor upgrading the package for CRE LOADED 6.15 as this module is bild for osCommerce ms2.2.

For futuere upgrdes you will have to run a ?diff?, find the changes and edit them manually


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

Hi

The contribution wors perfectly. But...Silly problem....

There is a typo error on product info page. Showing as:

 

Points Credit : 175 points Corrently valued at ?17.50

 

The word corrently should be currently. I have looked at all language files but cannot find where to chage this. A quick pointer would be appreciated.

Thanks.

Share this post


Link to post
Share on other sites

Hi,

i like the looks of this contrib but i have jus the one question.

Will it work with credit cards.

My site is set up to accept credit cards through Protx along with Paypal and cheques.

Colin

:blink:

Edited by segdoune

Share this post


Link to post
Share on other sites

Hello.

 

I installed STS and a few other mods and SPPC today. I just tried to run the redemption.sql file and got this error message:

 

Error

 

SQL-query :

 

/*-----------$Id: redemptions.sql, v 1.50 2005/AUGUST/10 15:17:12 dsa_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.deep-silver.com Copyright © 2005 osCommerce http://www.oscommerce.com Released under the GNU General Public License ********************************************************************************

*********** This will... a. Add a new line to table CUSTOMERS to hold the customers_shopping_points. b. Creat a new table called CUSTOMERS_POINTS_PENDING this table hold all others points. c. Creat a new Configuration group called "Points/Rewards". Note that on a clean install the last configuration group ID is 15 "Sessions", The new group called Points/Rewards will appear after it and the configuration group ID is 22, please make sure that this configuration group ID is not beeing use by other configuration group alse you will get sql error. if so then change the configuration group and its sub to a higher number in the redemptions.sql before execute it. (redemptions.sql line 31 and 33 to 41 change the value 22 to match your value) ** ATTENTION** in redemptions.sql (line no. 36,37) it use the word Yen as a currency .this is just a word ,the currency defined according to your admin default currency( your store default currency set at... admin/Localization/currencies) IF you feel bad with this word and you can't sleep at night because of it,then please feel free to change it to whatever you want symbol,words no, as long as you do it before executing the statements in redemptions.sql ********************************************************************************

*********** */ ALTER TABLE customers ADD customers_shopping_points decimal( 15, 2 ) NOT NULL default '0.00';

 

#

# Table structure for table 'customers_points_pending'

#

DROP TABLE IF EXISTS customers_points_pending;

 

CREATE TABLE customers_points_pending(

unique_id int( 11 ) NOT NULL auto_increment,

customer_id int( 11 ) NOT NULL default '0',

orders_id int( 11 ) NOT NULL default '0',

points_pending decimal( 15, 2 ) NOT NULL default '0.00',

COMMENT VARCHAR( 200 ) ,

date_added datetime NOT NULL default '0000-00-00 00:00:00',

STATUS int( 3 ) NOT NULL ,

PRIMARY KEY ( unique_id )

) TYPE = MYISAM ;

 

INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` )

VALUES (

'22', 'Points/RewardsV1.50', 'Points/Rewards System Configuration', '22', '1'

);

 

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )

VALUES (

'', 'Enable Points system', 'USE_POINTS_SYSTEM', 'true', 'Enable the system so customers can earn points for orders made?', '22', '1', '', now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

)

 

MySQL said:

 

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';

 

#

# Table structure for table 'customers_points_pending

 

 

 

 

 

Do I need to install the SPPC mod or is it included in your package?

Clesha


Thanks!

Clesha

Share this post


Link to post
Share on other sites
Hi

The contribution wors perfectly. But...Silly problem....

There is a typo error  on product info page. Showing as:

 

Points Credit : 175 points Corrently valued at ?17.50

 

The word corrently should be currently. I have looked at all language files but cannot find where to chage this.  A quick pointer would be appreciated.

Thanks.

Thanks for pointing that.

Sorry for my typo errors(you will find more :blush: ) English is not my native language and some time spelling drive me crazy. as most update for this mod done on the spot but i have to write a new install instraction each time.

any just forgive me and here is where to fix a......Silly problem....

 

open catalog/includes/languages/english/product_info.php

find this.....

define('TEXT_PRODUCT_POINTS_VALUE', 'Corrently valued at ');

and replace it with....

define('TEXT_PRODUCT_POINTS_VALUE', 'Currently valued at ');

Done!


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
Hello.

I installed STS and a few other mods and SPPC today.  I just tried to run the redemption.sql file and got this error message:

Error

MySQL said:

You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ';

 

#

# Table structure for table 'customers_points_pending

 

Do I need to install the SPPC mod or is it included in your package?

Clesha

mmmm :'(

Did you open redemptions.sql with text editor that its language not english?

Did you had problem when downloading the zip?

what is your sql server version?

Anyway it looks like you are missing closing ) in the statements.

You are doing a full install of this module then....

If you downloaded the zip from osCommerce site then downloaded again from the demo site http://www.deep-silver.com/shop/

maybe the file got broken druing download.

then go to your phpMyadmin(your databse) and make sure that the last try to execute the statements in redemptions.sql did not made change to database as sometime sql server return sql error but still apply changes.

or Just restore your databse and try to execute the statements in redemptions.sql again.

For a better chances when executing the statements in redemptions.sql using phpMyAdmin make sure to do it when phpMyAdmin language is set to English (en-iso-8859) and not English(en-utf8) sometime utf-8 or other languages read the statements wrong.

Hope it will work fine for you.

Please let us know the results.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
Hi,

i like the looks of this contrib but i have jus the one question.

Will it work with credit cards.

My site is set up to accept credit cards through Protx along with Paypal and cheques.

Colin

:blink:

It's works with osCommerce original mayment modules.

At the zip you will find a folder contain Paypal Inp modifications instractions (if you are using it)as for others getaway modules, there are so many out there so i can really answer that i will give support for my module to work with a fresh install as when i check the system its always on a fresh install.

I don't know about Protx. all i know is that it will work on any payment module that bild on the bases as osCommerce and use the same process.

You just have to try it yourself.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

I can not locate a checkout_process.inc.php ..... ??

 

1.

Get the latest version points/rewards V.150  .

2.

This as not been tested so use it at your own risk.

backup....... checkout_process.inc.php .

 

here we go...

open checkout_process.inc.php

 

Find this.... (start at aprox. line no.17)

global $payment_modules, $shipping_modules, $order, $currencies, $cart, $PayPal_osC, $customer_id,
        $sendto, $billto, $shipping, $payment, $language, $currency, $languages_id, $order_total_modules, $order_totals;

 

.. and REPLACE it with this...(we just add this 2 elements to the line $customer_shopping_points, $customer_shopping_points,)

 

#### Points/Rewards Module V1.50 balance customer points BOF ####
 global $payment_modules, $shipping_modules, $order, $currencies, $cart, $PayPal_osC, $customer_id, $customer_shopping_points, $customer_shopping_points_spending,
        $sendto, $billto, $shipping, $payment, $language, $currency, $languages_id, $order_total_modules, $order_totals;
#### Points/Rewards Module V1.50 balance customer points EOF ####*/

still at the same file....

Find this.... (start at aprox. line no.105)

    tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
 }

.. and add this after...

#### Points/Rewards Module V1.50 balance customer points BOF ####
// customer shoppping points account balanced 
 if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) {
   $customer_shopping_points = tep_get_shopping_points();
     tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id);
   if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') {
     tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);
   } 
 } 
// customer pending points added 
 if ((USE_POINTS_SYSTEM == 'true') && ($order->info['total'] > 0) && (get_award_discounted($order) == true)) {
   $redemption_awards = get_redemption_awards($customer_shopping_points_spending);
   $points_toadd = get_points_toadd($order);
   if ((get_redemption_awards($customer_shopping_points_spending) == true) && ($points_toadd >0))
     tep_add_pending_points($customer_id, $insert_id, $points_toadd);
 }
#### Points/Rewards Module V1.50 balance customer points EOF ####*/

 

Save and close this file.

Now run a few test to let us know how it went.

also reads posts before in refer to paypal INP.

Share this post


Link to post
Share on other sites
I can not locate a checkout_process.inc.php ..... ??

V3.1.5 is the version im using however the points don't work with this, I realize I need to modify something similar to the one you mention for the other module, hoping you could maybe have an idea where to start.

i downloaded the version you use and found the file in the PayPal_Shopping_Cart_IPN_v3.1.5.tar


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
mmmm :'(

Did you open redemptions.sql with text editor that its language not english?

Did you had problem when downloading the zip?

what is your sql server version?

Anyway it looks like you are missing closing  ) in the statements.

You are doing a full install of  this module then....

If you downloaded the zip from osCommerce site then downloaded again from the demo site http://www.deep-silver.com/shop/

maybe the file got broken druing download.

then go to your phpMyadmin(your databse) and make sure that the last try to execute the statements in redemptions.sql did not made change to database as sometime sql server return sql error but still apply changes.

or Just restore your databse and try to execute the statements in redemptions.sql again.

For a better chances when executing the statements in redemptions.sql using phpMyAdmin make sure to do it when phpMyAdmin language is set to English (en-iso-8859) and not English(en-utf8) sometime utf-8 or other languages read the statements wrong.

Hope it will work fine for you.

Please let us know the results.

 

 

 

I didn't open any of the files except read me to follow the instructions. The download went quickly (it was the version ending in 12) and I used phpMyAdmin to run the file in my database.

 

I just installed SPPC and wasn't sure if there was a conflict between the 2 so I uninstalled it. I will redownload the package and start over again with SPPC and your suggestions.


Thanks!

Clesha

Share this post


Link to post
Share on other sites
mmmm :'(

Did you open redemptions.sql with text editor that its language not english?

Did you had problem when downloading the zip?

what is your sql server version?

Anyway it looks like you are missing closing  ) in the statements.

You are doing a full install of  this module then....

If you downloaded the zip from osCommerce site then downloaded again from the demo site http://www.deep-silver.com/shop/

maybe the file got broken druing download.

then go to your phpMyadmin(your databse) and make sure that the last try to execute the statements in redemptions.sql did not made change to database as sometime sql server return sql error but still apply changes.

or Just restore your databse and try to execute the statements in redemptions.sql again.

For a better chances when executing the statements in redemptions.sql using phpMyAdmin make sure to do it when phpMyAdmin language is set to English (en-iso-8859) and not English(en-utf8) sometime utf-8 or other languages read the statements wrong.

Hope it will work fine for you.

Please let us know the results.

 

 

Did a new download from the link you gave and I'm getting the same message. Can you tell me where to put the close ) so I can fix it?


Thanks!

Clesha

Share this post


Link to post
Share on other sites
i downloaded the version you use and found the file in the PayPal_Shopping_Cart_IPN_v3.1.5.tar

 

Okay, I found the file and did the changes but still no go, nothing going into points system.

Share this post


Link to post
Share on other sites
Okay, I found the file and did the changes but still no go, nothing going into points system.

Dose any other payments work for you?

Please read the Paypal IPN Modifications found in zip for this mod.

In short the paypal_ipn.php file integrates some of the code that would otherwise be found in other files e.g. checkout_process.php. In this case the code that can be found in checkout_process is replicated in the paypal_ipn file under the function: before_process()

 

So in order to maintain compatibility with the Points/Rewards Module V1.50 contribution you will need to remake those changes here.

just to get an idea where the problem is and maybe you will be able to find your way trough it.

as i wrote before..there are so many getaway payment modules out there so i can really answer tha.

t i will give support for my module to work with a fresh install as when i check the system its always on a fresh install.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
Did a new download from the link you gave and I'm getting the same message.  Can you tell me where to put the close ) so I can fix it?

what is your sql server version?

are you having problem executing any other statements (for other contributions)?

YES= check your coding.

NO= try this.

creat a new text file, name it redemptions so when you execute the statements you will look for redemptions.txt and NOT redemptions.sql.

open redemptions.sql with text editor and copy past the statements only into your

new redemptions.txt .

save and close it then try to execute the statements in redemptions.txt.

Did it solve the problem?

YES= kiss me

NO=(kiss me :-" ).

Try removing this from the statement.

#
# Table structure for table 'customers_points_pending'
#

Did it solve the problem?

YES= :thumbsup:

NO= :'( :'( :'(

Do it the hard way just break the redemptions.txt into single statement.

for example copy and past into redemptions.txt only the first line...

ALTER TABLE customers ADD customers_shopping_points decimal(15,2) NOT NULL default '0.00';

then execute the statement. if it goes well repeat this step for the rest of the statements ,

if one of them goes wrong you will no where the problem is.

Did it solve the problem?

YES= :thumbsup: post results here

NO= :( post results here


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
I just installed SPPC and wasn't sure if there was a conflict between the 2 so I uninstalled it.  I will redownload the package and start over again with SPPC and your suggestions.

What is SPPC(any way what ever it is you don't need it to run this module)


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

Hi there

 

Ive installed the module, but now it dosent show any new orders in the admin... When I look at the MySql the orders are there, even with the pending point for the new order. Could there be a problem with the checkout_confirmation.php Ive edited. Im also using the CREDIT CLASS SYSTEM. Can somebody look at the below code for me and tell me if its correct....

Also in the install.txt file you write

The idea is to add the below element so if the line above is different from yours try to add this...

 

&& (!$customer_shopping_points_spending)

 

somewhere before the last element in this line.

 

  require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

 $payment_modules->update_status();
//ICW ADDED FOR CREDIT CLASS SYSTEM
 $order_total_modules = new order_total;
//ICW ADDED FOR CREDIT CLASS SYSTEM
 $order_total_modules->collect_posts();
//ICW ADDED FOR CREDIT CLASS SYSTEM
 $order_total_modules->pre_confirmation_check();

// ICW CREDIT CLASS Amended Line
//  if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
 if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
 }
##### Points/Rewards Module V1.40 check for error BOF #######
 if (USE_REDEEM_SYSTEM == 'true') {
   if (!tep_session_is_registered('customer_shopping_points_spending'))
     tep_session_register('customer_shopping_points_spending');
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){
       $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending'];
     }
// customer can't use other then the exact amount when enabled         
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){
       $customer_shopping_points_spending = POINTS_EXACT_VALUE;
     }
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (!$customer_shopping_points_spending) && !is_object($$payment)){
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_EMPTY), 'SSL'));
     }
// register customer shopping points         
       $customer_shopping_points = tep_get_shopping_points();
// customer can't use invalid points amount         
     if ($customer_shopping_points < $customer_shopping_points_spending) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL'));
     }
// customer can't use points over the max allowed         
     if ($customer_shopping_points_spending > POINTS_MAX_VALUE) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL'));
     }
 } 
//force customers to select other payment method if the points total not enough to cover the cost.
 if (tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL'));
 }
// customer can't use points over the order total         
  if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) {
    $customer_shopping_points_spending = 0;
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));
 }
// if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
  if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) && (!$customer_shopping_points_spending) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
 }
########  Points/Rewards Module V1.40 EOF #################*/

 if (is_array($payment_modules->modules)) {
   $payment_modules->pre_confirmation_check();
 }

Share this post


Link to post
Share on other sites
Hi there

 

Ive installed the module, but now it dosent show any new orders in the admin... When I look at the MySql the orders are there, even with the pending point for the new order. Could there be a problem with the checkout_confirmation.php Ive edited. Im also using the CREDIT CLASS SYSTEM. Can somebody look at the below code for me and tell me if its correct....

Also in the install.txt file you write

You have part of the code *2, you mixed up the code for checkout_confirmation.php check your coding.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
what is your sql server version?

are you having problem executing any other  statements (for other contributions)?

 

nope, no other problems

 

YES= check your coding.

NO= try this.

creat a new text file, name it redemptions so when you execute the statements you will look for redemptions.txt and NOT redemptions.sql.

open redemptions.sql with text editor and copy past the statements only into your

new redemptions.txt .

save and close it then try to execute the statements  in redemptions.txt.

Did it solve the problem?

YES= kiss me

NO=(kiss me :-" ).

 

Try removing this from the statement.

#
# Table structure for table 'customers_points_pending'
#

Did it solve the problem?

YES= :thumbsup:

NO= :'(  :'(  :'(

 

didn't work. different error came up each time.

 

 

Do it the hard way just  break the redemptions.txt into single statement.

for example copy and past into redemptions.txt only the first line...

ALTER TABLE customers ADD customers_shopping_points decimal(15,2) NOT NULL default '0.00';

then execute the statement. if it goes well repeat this step for the rest of the statements ,

if one of them goes wrong you will no where the problem is.

Did it solve the problem?

YES= :thumbsup: post results here

NO= :(  post results here

:*

 

 

This actually did work so here's your kiss as requested. :*

 

But, now I have a new problem. I edited all of the files in the instructions and it won't install from the admin. When I hit the install button, nothing happens. I do have Special Pricing Per Customer (SPPC) installed as well. Both mods require editing of the english file. Here's the part where they both come after the same tag line:

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// customers box text in includes/boxes/customers.php

define('BOX_HEADING_CUSTOMERS', 'Customers');

define('BOX_CUSTOMERS_CUSTOMERS', 'Customers');

define('BOX_CUSTOMERS_ORDERS', 'Orders');

define('BOX_CUSTOMERS_POINTS', 'Customers Points');// Points/Rewards Module V1.50

define('BOX_CUSTOMERS_POINTS_PENDING', 'Pending Points');// Points/Rewards Module V1.50

// BOF Separate Pricing Per Customer

define('BOX_CUSTOMERS_GROUPS', 'Customers Groups');

// EOF Separate Pricing Per Customer

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Could this cause a conflict between the 2 mods or is there another reason for the non install?


Thanks!

Clesha

Share this post


Link to post
Share on other sites

Hi! thank's for customising POINTS AND REWARDS for creloaded 6.15.

I've tried to install points and rewards on a fresh installation of creloaded and i've descovered some problems:

 

if u want to try live http://www.megadiscount.ro/oscart u can use username : test pw: textx

 

1. The menu with informations about customers points does not appear in the admin/customers

 

2. i get an error when i confirm the order (final step)

 

Fatal error: Call to undefined function: get_redemption_awards() in /home/exter/public_html/oscart/checkout_process.php on line 177

 

3.when i whant to check My points Information i get this at the top of the window, but everything else is ok.

 

/* $Id: my_points.tpl.php v 1.50 2005/AUGUST/10 15:17:12 dsa_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2005 osCommerce Released under the GNU General Public License */ My Points Information

4. the file loaded615/create_account.php does not exist in the clean_install dir from you contrib

 

5. I does not add new points to customers for their orders, i think because of the problem from point 2.

 

Hope you will consider these problems...Thank's again for the time u invest in this...

 

sorry for my english...

Share this post


Link to post
Share on other sites
You have part of the code  *2, you mixed up the code for checkout_confirmation.php check your coding.

 

Well can you please help me where the mistake is??

 

Thanks

Steven

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×