Jump to content
Tsimi

Converting Points and Rewards system for osC BS

Recommended Posts

15 minutes ago, Tsimi said:

I was just thinking about Lecarl. He wants to use this "maybe" in a live store and if he uses PP Standard he will have to do the necessary changes right?
Would be great if we could have a live shop guinea pig to test this out. :biggrin:

@Tsimi, @discxpress, yes sure, would be great.

I checked the modifications in paypal standard and found that some globals were misssing:

          // BOF POINTS REWARDS BS //-->
            if ((MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') && (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_REDEEM_SYSTEM == 'True')) {
          // customer pending points added
              global $customer_shopping_points_spending, $customer_referral;
              if ($order->info['total'] > 0) {

I just pushed the fix and added a modified ( PayPal App v5.018 ) file.

My paypal sandbox has a hickup right now, so it should be tested.

rgds

Rainer

 

Edited by raiwa

Share this post


Link to post
Share on other sites

@discxpress,

only paypal_standard requires modification. All other core payment modules use checkout_process.php and shouldn't need any additional modifications.

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa

While I was translating the FAQ I found this following sentence in FAQ4

Quote

During the checkout proccess, on the same page that you select a payment method, there will be a box to enter the amount of points you wish to redeem.  Enter the amount of points you would like to spend or tick the box to use all available points.

I thought it is not possible to "choose or write" the amount of points to be used, right?
It is all or nothing as far I can remember.

Share this post


Link to post
Share on other sites
1 hour ago, Tsimi said:

@raiwa

While I was translating the FAQ I found this following sentence in FAQ4

I thought it is not possible to "choose or write" the amount of points to be used, right?
It is all or nothing as far I can remember.

The way it is currently working is all or nothing. I don't see a reason to change this either, why would you only want to use some of your points and then pay?

Share this post


Link to post
Share on other sites

@discxpress

Thank you. :smile::thumbsup:

A very large part of the credit goes to @raiwa for his iron will and effort into this small project.
If he wouldn't come along and started his github repository this Points feature would most likely have been forgotten.

Also credits to @LeeFoster for joining us and fixing most of the bugs in a very short time.

Please fell free to change the looks of the messages or the appearance of the FAQ site or account part. We haven't had much time to play with the bootstrap code yet.
If you come up with something nice looking please share. 

Edited by Tsimi

Share this post


Link to post
Share on other sites
1 hour ago, Tsimi said:

My thought exactly. What would be a reason to separate the points? I can't think of any.

Then we need to fix the English text aswell.

This text might be left over from a previous version, if I well remember there was in an old version the possibility to introduce a partial amount of points to spent.

I agree, no need for this and I'll update the spanish translation.

Thanks all of you:smile::thumbsup:

 

Share this post


Link to post
Share on other sites

@raiwa

I just finished the German translation and added the files to my fork.
I also opened a pull request.... I think/hope.

I don't have German installed in my test shop at the moment so I would appreciate if you could quickly go over them to see if my German is not wrong spelled or expressed. This was by far the most tedious and disliked part of work (for me) in this project. :wacko:

Share this post


Link to post
Share on other sites

@Tsimi @raiwa @LeeFoster I have installed on a live site and so far smooth sailing. Easy to install and implement.

I do have a question and a bug report.

A customer signed up for an account and was immediately able to redeem points on first order. Is there a way to reward the points to be used on the second order? I want to at least encourage the customer to become a repeat buyer.

Bug report When I manually rewarded points in the admin, it sent the same email twice. Also, I gave the test account 50 points but it automatically doubled to 100 points on its own.

Share this post


Link to post
Share on other sites
10 hours ago, Tsimi said:

@discxpress

Thank you. :smile::thumbsup:

A very large part of the credit goes to @raiwa for his iron will and effort into this small project.
If he wouldn't come along and started his github repository this Points feature would most likely have been forgotten.

Also credits to @LeeFoster for joining us and fixing most of the bugs in a very short time.

Please fell free to change the looks of the messages or the appearance of the FAQ site or account part. We haven't had much time to play with the bootstrap code yet.
If you come up with something nice looking please share. 

@Tsimi I've attached a sample of how it looks on my live site. I've made some suggestions.

Take a look and I'm open to suggestions as well.rewards_sample.thumb.png.331fde3dc1312f73ce9c1827003cd242.png

Share this post


Link to post
Share on other sites
16 hours ago, discxpress said:

A customer signed up for an account and was immediately able to redeem points on first order. Is there a way to reward the points to be used on the second order? I want to at least encourage the customer to become a repeat buyer.

@discxpress, this is not directly implemented.

Some workarounds:

- You could set the minimum amount of points before redemptions to just one point above the new customre welcome points.
- Give very little welcome points to encourage the customer by the new shopping points he got from his first order to repeat.
- Do not to give welcome points at all.

16 hours ago, discxpress said:

Bug report When I manually rewarded points in the admin, it sent the same email twice. Also, I gave the test account 50 points but it automatically doubled to 100 points on its own.

I double checked on my develop installation and a new installation on a vanilla osc2.3.4BS where i check the spanish language files. All works correct, no double e-mails, no double amount.

It sounds like you have some installation parts duplicated. Did you have an older version installed before and did not remove it before new installation. This would at least explain the double welcome points.

Please check.

 

For the suggestions:

- add link to FAQ page sounds good and makes sense
- the other 2 design suggestions (icon, no bold) seems to me inside the category of design customization and should be done by each store owner following his taste and needs.

@Tsimi, @LeeFoster, the design of the text as an alert message maybe should be applied in the same way in the review module for coherency. Your thoughts?

Edited by raiwa

Share this post


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

@Tsimi, @LeeFoster, the design of the text as an alert message maybe should be applied in the same way in the review module for coherency. Your thoughts?

Agree.

What you think about the text/message in the product info page? Should that be also changed to an alert type message or keep it as label or maybe use Contextual backgrounds instead?

Oh and btw. I just installed the latest package and the warning messages in the admin area for the not installed modules is a genius move. Well done!

Share this post


Link to post
Share on other sites
21 hours ago, raiwa said:

You could set the minimum amount of points before redemptions to just one point above the new customre welcome points.

Not sure I understand...

 

21 hours ago, raiwa said:

- the other 2 design suggestions (icon, no bold) seems to me inside the category of design customization and should be done by each store owner following his taste and needs.

I forgot bootstrap is adjusted in the .css but I managed to get the icon in.

Also notice that the label is too large. The 1-12 settings in admin didn't adjust the length.

rewards_sample2.png

Share this post


Link to post
Share on other sites
1 hour ago, discxpress said:

Not sure I understand...

@discxpress,

 

try the following example:

Set: New signup customers Welcome Points amount to 50

Set: If you wish to limit points before Redemptions, set points limit to 51

When a new customer creates account he will have 50 points.

When he places his first order he cn't redeem points because he doesn't reach the minimum points of 51 to redeem

When he places his second order he will have shopping points earned from the first order and have more than 51 and can redeem.

Share this post


Link to post
Share on other sites

@Tsimi,

 

pushed language files with corrections. There was one important change in my_points_help.php Point TEXT_FAQ_4, regarding the use of ponts payment module.

Please have a look.

We have the following pending:

1. add version, developer and copyright info to header comments in all files.

2. write new installation user guide. (PDF/WORD) native english speaker?

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa

Quote

1. add version, developer and copyright info to header comments in all files.

I can do that if you tell me what copyright exactly you had in mind.
The current copyright includes a dead URL.
 

I am glad that my German was not as bad as I thought. I was sure that you will have to redo half of it. I am glad that wasn't the case. :biggrin:

Edited by Tsimi

Share this post


Link to post
Share on other sites
1 hour ago, Tsimi said:

@raiwa

I can do that if you tell me what copyright exactly you had in mind.
The current copyright includes a dead URL.
 

I am glad that my German was not as bad as I thought. I was sure that you will have to redo half of it. I am glad that wasn't the case. :biggrin:

@Tsimi,

Maybe copyright is not needed, we can just leave @oscommerce. Or we may add our web URLs if you agree.

I'll send you PM, I'm waiting also for the details of the spanish translation helpers.

Share this post


Link to post
Share on other sites

Roger that. I'll wait for your PM.
Meanwhile I will try to implement those jquery buttons in the admin files.

Share this post


Link to post
Share on other sites

When you guys were working on this (thanks and well done)...did you come across anything in the Core Code where a "change of code" would have made things easier for you?? 

Please let me know by PM or by a new thread or on this thread - whatever is easiest.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

@burt

Thanks! :happy:

The only thing that comes to mind at the moment is the ...modules/pages/tp_account.php site. That page is kinda awkward.
Wouldn't it be possible to have that coded like the other modules stuff.  For example like the navbar modules.
That would make adding pieces easier and consistent to other modularized pages.

@raiwa did most of the coding improvements (hooks and modules) so you'll have to ask him.

Share this post


Link to post
Share on other sites

@burt,

2 things I found could be improved:

1. modularization as always. In that project we missed it for product_info.php, product_reviews.php, product_reviews_write.php and reviews.php

2. hooks support could be improved and included a sistematic pattern:

- add hook registry to all relevant main files/pages in core
 naming and organizing hook directories by page file names instead of contribution or whatever names.

Example like in admin/orders.php :

  require('includes/application_top.php');

  $OSCOM_Hooks->register('orders');

or our create_account.php:

  require('includes/application_top.php');

  $OSCOM_Hooks->register('create_account');

This would allow/force to use the same hook register for different hooks (contributions) and force to use the same namespace for all add-ons using hooks.

Maybe it would make sense even to have the directories in includes/hooks/admin/ and includes/hooks/shop/ included already in core installation.

 

Share this post


Link to post
Share on other sites

Sure thing - let me know if you want this part of the conversation moved into its own thread;

1 hour ago, Tsimi said:

@burt

The only thing that comes to mind at the moment is the ...modules/pages/tp_account.php site. That page is kinda awkward.

Could you give an example of what was the problem in that page, or what you were trying to display in the page?

That page at first glance is a bit weird - but it is modular.  So you can add a "normal" module to it in the same sense as what can be done on the product page.  The only difference is that the output of an account module is just a list item (rather than something "bigger")...

Here is an example of such;

  function execute() {
      global $oscTemplate, $currencies;
      
      $store_credit = new store_credit(); 
      
      if ($store_credit->display_balance() > 0) {
        $oscTemplate->_data['account']['tags']['title'] = MODULE_CONTENT_ACCOUNT_CREDIT_BALANCE_PUBLIC_HEADING;
        $oscTemplate->_data['account']['tags']['links']['tag'] = array('title' => sprintf(MODULE_CONTENT_ACCOUNT_CREDIT_BALANCE_PUBLIC_TITLE, $currencies->format($store_credit->display_balance())),
                                                                       'link' => NULL,
                                                                       'icon' => MODULE_CONTENT_ACCOUNT_CREDIT_BALANCE_PUBLIC_ICON);
      }
    }

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

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

×