Jump to content
Tsimi

Converting Points and Rewards system for osC BS

Recommended Posts

If I well remember that's not a bug. A guest can opt in for a regular account on checkout success. Tha'ts why he also gets the points even he is a guest at checkout process.

If he doesn't opt in, these points should not do any harm.

Share this post


Link to post
Share on other sites

Raiwa ,

in our shops a customer guest account cannot opt later for an account. (using account_PWA mod)

I can see in my DB that this user is not added to the normal account table (normal behaviour). 

Hans

Share this post


Link to post
Share on other sites

Raiwa,

Nice new feature of PWA   But still the behaviour should not  be that if user choose NOT to take that option the points are added to the pending table. 

Hans

Share this post


Link to post
Share on other sites

The points are added before the user chooses. They could be deleted, but they really make no harm.

Please consider that PWA and Points and rewards are in use since years and no one complained until now about.

Share this post


Link to post
Share on other sites

I'm hoping to add some code that disables the points system for customers who are wholesale accounts - they already get good discounts.  I'm using your Pheonix Wholesale Pro module on a Phoenix build.

Are you planning on accounting for customer wholesale type in the points system in the future?

Since this is a complicated add-on with many modules, is there one location that would disable the entire system, or, do I need to add a check in every module/part of this add on?

Thanks! C


Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Share this post


Link to post
Share on other sites

Hello Corey,

You could just add a check if the customer is wholesaler to the checkout payment Points module and disable it. This will disable the possibility to redeem points.

If you would like to disable all info modules and the earn procedure, as well as the info in order mails etc, I'm afraid you'll have to add this check to all point &reward modules/hooks.

rgds
Rainer

Share this post


Link to post
Share on other sites
2 minutes ago, raiwa said:

If you would like to disable all info modules and the earn procedure, as well as the info in order mails etc, I'm afraid you'll have to add this check to all point &reward modules/hooks.

Got it, thanks.  Coffee time....


Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Share this post


Link to post
Share on other sites
Posted (edited)

I contacted Raiwa directly regarding this and he recommended I post on this thread in case others have this issue.

The install instructions say:

Quote

* Enable Points Expires Auto Reminder and set the numbers of days
prior points expiration for the script to run. 

I was trying to determine how this script works so that I could adapt it for our integration with a third-party email system (Oracle's Bronto).  However, I found no "Script" anywhere in the code that would make the points auto expire.  Looking for guidance.

I tried to find the script for auto expire by searching for the constant 'MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND' in the entire module package.  The only instances I found of this are in the install functions.  I did not find any other functions that check this value and then run a script.  

Does anyone use this feature?  

Edited by cdetdi

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Share this post


Link to post
Share on other sites
1 minute ago, cdetdi said:

I contacted Raiwa directly regarding this and he recommended I post on this thread in case others have this issue.

The install instructions say:

I was trying to determine how this script works so that I could adapt it for our integration with a third-party email system (Oracle's Bronto).  However, I found no "Script" anywhere in the code that would make the points auto expire.  Looking for guidance.

I tried to find the script for auto expire by searching for the constant 'MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND' in the entire module package.  The only instances I found of this are in the install functions.  I did not find any other functions that check this value and then run a script.  

It seems you didn't read my answer completely;

Quote

The constant "MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND" is only used as a language constant in the e-mails. You can find it in the language file:
catalog\admin\includes\languages\english\customers_points_pending.php
It should not have an influence on the correct working of this feature.

The relevant constant for the auto expire function to work is: "MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_AUTO_EXPIRES".

It is used in several files:

- catalog\admin\customers_points.php
- catalog\admin\customers_points_pending.php
- catalog\includes\functions\redemptions.php
- catalog\includes\languages\english\my_points_help.php

I do not use the Addon myself, so I have to find time to research on this. However no one reported until now that the feature is not working. Maybe something with your store installation.

Please let me know on the forum if you get it to work.

 

Share this post


Link to post
Share on other sites
Posted (edited)

Raiwa - 

I read your response, and I followed all the constants.  I think you are missing my question.

'MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND' is a CONFIGURATION KEY that, I assumed, would be used in a script to auto remind.  Accordingly I assumed it would be referenced in that script.

If it is only used in the language file in order to build constant. 'EMAIL_EXPIRE_INTRO' then I should be able to find the tep_mail function that uses that constant.  Searching/grepping for EMAIL_EXPIRE_INTRO yields no results other than the language files, so it isn't actually used anywhere that I can see.

I'm just looking for a simple yes or no really if this remind function exists.  I'll build it if not, just wanting clarification.

::EDIT FOR WORDINESS::

Edited by cdetdi

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, cdetdi said:

Raiwa - 

I read your response, and I followed all the constants.  I think you are missing my question.

'MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND' is a CONFIGURATION KEY, not just a language constant, so there's that. 

The language file uses that constant to build the constant. 'EMAIL_EXPIRE_INTRO'.  Searching/grepping for EMAIL_EXPIRE_INTRO yields no results other than the language files, so it isn't actually used anywhere that I can see.

I'm just looking for a simple yes or no really if this remind function exists.  I'll build it if not, just wanting clarification.

MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND is just used as a constant which holds the number of days and is used in the language definition. It is not used for functionality.

For functionality the constant MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_AUTO_EXPIRES  is used in the above mentioned files.

The functionality exists.

Example: my_points.php:

<?php
    if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_AUTO_EXPIRES)) {
      $expires_query = tep_db_query("select customers_points_expires from customers where customers_id = '" . (int)$customer_id . "' and customers_points_expires > curdate() limit 1");
      $expires = tep_db_fetch_array($expires_query);

 

Edited by raiwa

Share this post


Link to post
Share on other sites

To be more clear:

There is virtually no difference between a configuration constant and a text constant.

The only difference in OsCOmmerce is that a text constant is usually defined in a language file and only used to echo text. Meanwhile a configuration constant is usually defined in the database and used for condition checks and other functionality.

But it is not always like this. Language constants can be hold/defined in the database and viceversa configuration constants can be defined in a language file or for example in the configure.php files.

Hope this helps.

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, cdetdi said:

I'm just looking for a simple yes or no really if this remind function exists.  I'll build it if not, just wanting clarification.

O.K. I believe I got it now:

You do not ask for the general expire functionality, but for an e-mail to be sent advising that the points will expire and which would use the constant MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_EXPIRES_REMIND which holds the days.

I searched  my backup files including the old version on which this Bootstrapped version is based on and there was a admin file called customers_points_expire.php which was included in the first beta versions of the Bootstrap update, but not any more in the first released bootstrap version. I do not recall why and didn't found any reference in this thread.

The language definitions and days constant is a relict from that and has no functionality in the actual version.

Maybe I find time to research.

If you wish to research on your own, here the file I found:

customers_points_expire.php

Be aware that the constants in this file need to be updated to the header tag constants.

If it's this, sorry that it tooks me time to get it 🙂

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)

@cdetdi,

I found now the discussion about this removed feature during the update for Bootstrap:

Note that the original update was a teamwork of several forum members in which I took part. I only maintain it since then with updates for the newer BS and Phoenix versions.

Thank you for pointing on this. I'll remove the unused config and language constants in the next update.

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa when you get a chance, will you look at the detailed changes for Phoenix 1.0.7.6.? Checkout_confirmation.php, checkout_payment.php, and checkout_process.php have changed.

The edits are confusing. Thanks

Share this post


Link to post
Share on other sites

@raiwa Rainer I have just tried to install this on the latest 1.0.7.7. and received several errors when installing the headertags module as expected when reading the instructions. I know you normally do not upgrade your addons until a certain release point but thought I would just mention it. Here are the errors.

Quote

There was an error encountered when trying to add the points and rewards code to the file: "checkout_confirmation.php".
The original file has been recovered from the auto backup: "/points_backups/checkout_confirmation.php.bak" Please check the file and apply the required modifications manually.

There was an error encountered when trying to add the points and rewards code to the file: "checkout_process.php".
The original file has been recovered from the auto backup: "/points_backups/checkout_process.php.bak" Please check the file and apply the required modifications manually.

There was an error encountered when trying to add the points and rewards code to the file: "create_account.php".
The original file has been recovered from the auto backup: "/points_backups/create_account.php.bak" Please check the file and apply the required modifications manually.

There was an error encountered when trying to add the points and rewards code to the file: "create_account_success.php".
The original file has been recovered from the auto backup: "/points_backups/create_account_success.php.bak" Please check the file and apply the required modifications manually.

There was an error encountered when trying to add the points and rewards code to the file: "ext/modules/content/reviews/write.php".
The original file has been recovered from the auto backup: "/points_backups/write.php.bak" Please check the file and apply the required modifications manually.

I know you are busy, but if you could just look into one of the errors and point me in the right direction I could probably find the rest.

Also noticed that when installing the points payment module the text in the module says Enable Cash On Delivery Module. easy change I know.

I also believe that the PayPal page has also had changes made.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Hi Steve,

I'm working on the update for 1.0.7.7 and it is already very advanced. But I'm now pending on the next update to 1.0.7.8 for which Matt promised me to add support for checkout_process.php hooks which I would need. So I believe you should await this update. It's not worth to try to hotpatch the actual version for 1.0.7.7. There would be for sure more issues.

rgds
Rainer

Share this post


Link to post
Share on other sites

Points and rewards is something that I want to make use of. I wanted to see what it was like so added it to a copy of my test store.  I didn't think about it before but I could have added it to a copy of an earlier version. I have a few other addons that I need so have decided to upload the new store when I have all the basic bits available and after making sure that everything works ok then I  will add new features when they become available.

Thanks for the response though.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

PayPal IPN support added to the current version Points and Rewards Phoenix 3.0.1.

Update instructions are included.

Points and Rewards Phoenix 3.0.2.zip

Compatibility:
OSCOM Phoenix CE 1.0.3.0

Who is using PayPal standard and a Phoenix version up to aprox. 1.0.3.0, please test it and confirm if everything works as expected.

I'll then upload it.

Best regards
Rainer

Share this post


Link to post
Share on other sites

Points and Rewards 3.1.0 beta for Phoenix 1.0.7.8

Version 3.1.0.

 - Updated for Phoenix 1.0.7.8+
 - No more core file modifications
 - Deprecated Header Tag Module and moved all configuration entries into Order Total Module
 - Merged all Shop Hooks into one SiteWide hook
 - Replaced checkout payment content module with form hook
 - Bootstrapped Admin pages
 - removed alternative info footer and box module and provided modified language files instead
 - moved the reviews point info message module to product info page
 - updated all modules to abstract_executable_module
 - updated coding to match Phoenix 1.0.7.8 standards
 - added product info pi system modules
 - Integrated PayPal Standard IPN support into siteWide hook

Points and Rewards Phoenix 3.1.0_beta.zip

 

This is a beta version for testing. There are many changes and it requires a complete new installation. Please use the latest Phoenix 1.0.7.8 from GitHub at least from Tuesday 2020/09/01.

PayPal Standard requires some updates which are not yet available on GitHub.

Modify includes/modules/payment/paypal_satndard.php line 178-179:

          require 'includes/system/segments/checkout/build_order_totals.php';
          require 'includes/system/segments/checkout/insert_order.php';

 

Edited by raiwa

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

×