♥Tsimi Posted October 26, 2017 Author Share Posted October 26, 2017 (edited) Points and Rewards BS v1.1 released! https://apps.oscommerce.com/G5ep5&points-and-rewards-bs Change log ----------------- Version 1.1 Added PWA (Purchase Without Account) support Added Order Editor support to points payment module Added SWC (Sloppy Words Cleaner) support by renaming function names and converted functions to private (HT module) Added auto tick checkbox by order status feature (multiple choices possible, use comma to spearate ID numbers) Bug fix for wrong order total calculation when product total value is over $1000 For those of you with older versions please follow the update manual which is included with this package. Edited October 26, 2017 by Tsimi raiwa 1 Quote Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 Hi @Tsimi is this meant to function with paypal express? I get nothing happening after I select points to redeem and click the Continue button which is meant to take you tot he paypal page. Again this is on a clean copy of latest EDGE. to be more precise, i get a white page as per below. I also tried this on a live page just to make sure its not something to do with local copy being tested. works fine if you select payments like "cash on delivery" Quote Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 image didn't work :) Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 30, 2017 Author Share Posted October 30, 2017 (edited) 30 minutes ago, igorb said: Hi @Tsimi is this meant to function with paypal express? As far I know yes it should work with PP Express.WRONG STATEMENT REMOVED I don't have a online store anymore so I cannot simulate any live shop environment. Maybe @raiwa knows more? Edited October 30, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 30, 2017 Share Posted October 30, 2017 @igorb, It should work with PayPal express. Can you please try first if PayPal express works without points and rewards to be sure it is correct set up. It is possible to test paypal express on a local test installation in sandbox and live mode, always if you have a internet connection. Tsimi 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 @raiwa @Tsimi Paypal is definitely set up properly. Paypal works with the module installed but not using points in purchase. As soon as I select the points it stops. Quote Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 @raiwa @Tsimi i have been mucking around with paypal settings a bit. it seems to work with "in context" checkout flow but not with "classic". Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 30, 2017 Share Posted October 30, 2017 @igorb, can you please set error reporting to true or check your error log so we can see which exact error is thrown on the blank page. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 @raiwa didnt even realise this could be done :) this pops up on the previously blank page Fatal error: Uncaught Error: Call to undefined function tep_calc_shopping_pvalue() in C:\MAMP\htdocs\bootstrap2\includes\modules\order_total\ot_redemptions.php:57 Stack trace: #0 C:\MAMP\htdocs\bootstrap2\includes\classes\order_total.php(42): ot_redemptions->process() #1 C:\MAMP\htdocs\bootstrap2\ext\modules\payment\paypal\express.php(961): order_total->process() #2 {main} thrown in C:\MAMP\htdocs\bootstrap2\includes\modules\order_total\ot_redemptions.php on line 57 Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 30, 2017 Share Posted October 30, 2017 @igorb, then please try this: in: includes/modules/order_total/ot_redemptions.php find: function process() { global $order, $currencies, $customer_shopping_points_spending; // if customer is using points to pay if (isset($customer_shopping_points_spending) && is_numeric($customer_shopping_points_spending) && ($customer_shopping_points_spending > 0)) { replace with: function process() { global $order, $currencies, $customer_shopping_points_spending; require_once('includes/functions/redemptions.php'); // if customer is using points to pay if (isset($customer_shopping_points_spending) && is_numeric($customer_shopping_points_spending) && ($customer_shopping_points_spending > 0)) { Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
igorb Posted October 30, 2017 Share Posted October 30, 2017 Thx. I will check it out tommorow. Its 8.45pm down under :) Quote Link to comment Share on other sites More sharing options...
igorb Posted October 31, 2017 Share Posted October 31, 2017 @raiwa adding that line seems to make paypal go to IN CONTEXT checkout flow regardless of the option selected. hence it does work but not as expected. i found a bug with paypal as well. if you go though paypal, authorise transaction for lets say $100, (i do authorize rather than debit right away. ) then in osc you go and change your purchase, change quantity or add new items. go back to cart and select paypal as payment now showing an amount other than $100, it will no longer take you to paypal but it will automatically authorise the new amount. to make things worse, if you log out of your OSC account and log back in. The paypal transaction will still be authorised. and it shows up in the paypal developer account as authorised as well, so OSC is sending back paypal information of complete order. that shouldn't be happening. if you close and reopen the browser then it seems to clear wherever it was storing the authorisation and takes you back to paypal to confirm transaction. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 31, 2017 Share Posted October 31, 2017 (edited) 8 hours ago, igorb said: adding that line seems to make paypal go to IN CONTEXT checkout flow regardless of the option selected. hence it does work but not as expected. @igorb, I can't confirm this, for me it stays in classic mode using points and rewards. 8 hours ago, igorb said: i found a bug with paypal as well. if you go though paypal, authorise transaction for lets say $100, (i do authorize rather than debit right away. ) then in osc you go and change your purchase, change quantity or add new items. go back to cart and select paypal as payment now showing an amount other than $100, it will no longer take you to paypal but it will automatically authorise the new amount. to make things worse, if you log out of your OSC account and log back in. The paypal transaction will still be authorised. and it shows up in the paypal developer account as authorised as well, so OSC is sending back paypal information of complete order. that shouldn't be happening. if you close and reopen the browser then it seems to clear wherever it was storing the authorisation and takes you back to paypal to confirm transaction. Is this points and rewards related, can you please double check without points and rewards installed. Edited October 31, 2017 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted October 31, 2017 Share Posted October 31, 2017 @igorb, I checked more detailed the paypal payments and found the following: 1. PayPal standard has a bug and needs to be fixed. Please do not use it together with paypal express. It can produce issues. You should uninstall it. 2. PayPal express works for me fine even without the fix I posted for the function inclusion. Can you please ensure that you have all points and rewards modules properly installed. Especifically the header tag module. The points and rewards function should be included there for all pages. 3. Please double check also by the installation manual instructions if all the hook calls are properly included in your files. Especially check the checkout files. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted October 31, 2017 Share Posted October 31, 2017 @Tsimi, 1. Checking PayPal for the reported bugs, I found that paypal standard modifications are in the wrong section. It added the earned points for the actual order already in checkout confirmation. If going back to checkout payment, the points were already added to the points balance if auto credit is enabled. I fixed it moving the points code to the correct section. See GitHub. 2. I could not recreate and confirm the bugs posted by @igorb. So we'll await what he reports. 3. We should add a module for shiopping cart like the one used in checkout payment. This would allow to redeem points with PayPal express checkout button. I can go for it. Please have a look on GitHub, I updated the to do list for version 1.2. rgds Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 31, 2017 Author Share Posted October 31, 2017 (edited) @raiwa Roger that. I'll take a look at your repository. I won't release any new version though. Edited October 31, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 31, 2017 Share Posted October 31, 2017 Just now, Tsimi said: I won't release any new version though. Not right now, but paypal standard is a serious bug, it needs to be fixed. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 31, 2017 Author Share Posted October 31, 2017 So what you suggest? Release a bug fix and later another release for the shopping cart additon? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 31, 2017 Share Posted October 31, 2017 I meant to await all 3 points and then release. Tsimi 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 31, 2017 Author Share Posted October 31, 2017 Got it. Worst case, if someone needs the PP standard fix urgently he can check your github repository and apply your changes. raiwa 1 Quote Link to comment Share on other sites More sharing options...
igorb Posted November 1, 2017 Share Posted November 1, 2017 10 hours ago, raiwa said: @igorb, I checked more detailed the paypal payments and found the following: 1. PayPal standard has a bug and needs to be fixed. Please do not use it together with paypal express. It can produce issues. You should uninstall it. 2. PayPal express works for me fine even without the fix I posted for the function inclusion. Can you please ensure that you have all points and rewards modules properly installed. Especifically the header tag module. The points and rewards function should be included there for all pages. 3. Please double check also by the installation manual instructions if all the hook calls are properly included in your files. Especially check the checkout files. @raiwa Here is what i did 1. on a clean installation of edge without any other addons or settings changes other than what comes out standard installed. uninstalled points and rewards 2. paypal exhibits same behavior previously noted. ie keeps the authorization regardless of cart changing. Even when changing the transaction method to SALE from AUTHORIZE i get the same issue. this could be totally unrelated to points and rewards. 3. reinstalled points and rewards. manually checked every modified file for hooks. -all is ok except the admin/orders.php file has "echo $OSCOM_Hooks->call('orders', 'PointsOrderRemovePoints');" added after "tep_redirect(tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action'))));" not after "tep_remove_order($oID, $_POST['restock']);" as is in the manual. 4. observation, i dont know if it matters. i use a different name for admin directory. does "catalog\includes\hooks\admin\orders\points.php" path need to be amended accordingly. ie change admin folder to whatever my admin is called? 5. i am still having issues with the express checkout and that functions fix does make it go to IN CONTEXT checkout. 6. I don't use paypal standard so i never did modify or use that file. 7.changed my admin dir to admin. made no difference. so i guess point 4 does not matter. 8. i just downloaded the module again (in v1 and v1.1) in case i changed something by accident. extracted overwriting old files. still same issue with paypal express in both versions. i cant think of anything else to try here. im getting the same thing on a clean edge version. and on an edge version modified to suit my live website. and on the live website as i had this running. im still running it with IN CONTEXT checkout. hopefully somebody else can reproduce the error to confirm this is an issue as I cant think what it is that I am doing wrong. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted November 1, 2017 Share Posted November 1, 2017 @igorb, Point 2: not related to points and rewards, please post this bug in the official PayPalApp support forum. Point 3: Yes, confirmed. This is a bug which will be addresses in the next update. The correct place is after "tep_remove_order($oID, $_POST['restock']);" . Allthough this is not related to PayPal Point 4: admin directory name is not hardcoded. It is retrieved from the configuration constant. no issue. Point 5: I checked again and it works for me with both versions stable in classic mode. There is no logical reason why points and rewards should have any influence on IN_CONTENT or CLASSIC. Without the fix in ot module, do you still get always the blank/error page and where exact do you get ti. After click on continue button in checkout_payment.php? I PM my e-mail so you could send me a zipped copy of your test store and database. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted November 1, 2017 Share Posted November 1, 2017 @igorb, @Tsimi, I checked all the PayPAl express on a new fresh installation and can confirm the error for the redemption function. The change in ot_redemptions.php is required. The good code is this: function process() { global $order, $currencies, $customer_shopping_points_spending; // if customer is using points to pay if (isset($customer_shopping_points_spending) && is_numeric($customer_shopping_points_spending) && ($customer_shopping_points_spending > 0)) { if( !function_exists('check_points_redemtion') ) { require_once(DIR_FS_CATALOG . 'includes/functions/redemptions.php'); } Added it as bug 13 and fix to GitHub. I can not confirm the IN_CONTENT - CLASSIC problem. On my test store all works stable as it should. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted November 6, 2017 Share Posted November 6, 2017 (edited) @Tsimi, @LeeFoster, @igorb, @TITO4 and other interested users. Version 1.2 prepared for error check and tests. - added points redeem shopping cart module which allows using points with PayPAl express checkout button. Requires: Ship In Cart BS reloadedhttps://apps.oscommerce.com/YLYGm&ship-in-cart-bs-reloaded - fixed ot module wrong order total calculation if total amount is paid by points - points redeem and referral can be untoggled and removed in shopping cart module and checkout payment - selected redeem and referral option will be stored now in session. If ticked or filled in in shopping cart it will be also ticked and filled in on checkout payment and applied on checkout confirmation. (this is required for PyaPal express to work) - update instructions added for version 1.1 to 1.2 Please download from GitHub and see README.md and update 1.1 to 1.2 doc: https://github.com/raiwa/Points_Rewards_BS_BETA_GIT/archive/master.zip Thanks for testing and feedback Rainer Edited November 6, 2017 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted November 7, 2017 Share Posted November 7, 2017 (edited) Forgot to mention: you can try and test all new features and functionality without the need to have PayPal Express installed and configured. Of course except for the payment process itself. Edited November 7, 2017 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.