♥raiwa Posted September 14, 2017 Share Posted September 14, 2017 @Tsimi, I'm a bit busy today. I'll have a deeper look on the entire issue in both pages when I find some time. Maybe there is a solution without core changes or at least with hooks. 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...
LeeFoster Posted September 14, 2017 Share Posted September 14, 2017 7 minutes ago, raiwa said: @Tsimi, @LeeFoster, I had a look and believe that the first snippet can be moved to the ht, it doesn't matter when "customer_shopping_points_spending" is registered in session, or am I wrong? I integrated it to the ht, can you please check. The second modification, can you explain for what is this needed? Maybe no payment module needed to be selected if order total is covered by points? Then it would need to be done in checkout_confirmation indeed. I tried the new ht module and the bug is back. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 14, 2017 Share Posted September 14, 2017 @LeeFoster, OK, I'll recheck, you updated also checkout_confirmation.php? Just now, LeeFoster said: I tried the new ht module and the bug is back. 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...
LeeFoster Posted September 14, 2017 Share Posted September 14, 2017 Just now, raiwa said: @LeeFoster, OK, I'll recheck, you updated also checkout_confirmation.php? Yeah I did Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 14, 2017 Share Posted September 14, 2017 @Tsimi, @LeeFoster, OK, you are right, this can't be moved to ht neither the second part to hook. I updated checkout_confirmation with the fixes, but joined together both changes. So ther eis only one mod to apply in the core file. It works for me. Can you please confirm. 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 September 14, 2017 Author Share Posted September 14, 2017 (edited) @LeeFoster Regarding fix for Bug 6, I added your code change into the redemptions.php file and it does work and the points are showing now. The only thing I found disturbing is that it says Expire date: and next to it nothing since we haven't set any expire date. So I changed a bit of code inside the my_points.php to hide it if customers_points_expires is NULL. Additional to your code change inside the redemptions.php edit the following inside the my_points.php file FIND: <?php echo '<strong>' . MY_POINTS_EXPIRE . '</strong> ' . tep_date_short($expires['customers_points_expires']); ?> REPLACE WITH <?php if (tep_not_null($expires['customers_points_expires'])) { echo '<strong>' . MY_POINTS_EXPIRE . '</strong> ' . tep_date_short($expires['customers_points_expires']); } ?> Fix for Bug 4 works like a charm, thanks. Edited September 14, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 14, 2017 Share Posted September 14, 2017 Just now, Tsimi said: @LeeFoster@LeeFoster Regarding fix for Bug 6, I added your code change into the redemptions.php file and it does work and the points are showing now. The only thing I found disturbing is that it says Expire date: and next to it nothing since we haven't set any expire date. So I changed a bit of code inside the my_points.php to hide it if customers_points_expires is NULL. Additional to your code change inside the redemptions.php edit the following inside the my_points.php file FIND: <?php echo '<strong>' . MY_POINTS_EXPIRE . '</strong> ' . tep_date_short($expires['customers_points_expires']); ?> REPLACE WITH <?php if (tep_not_null($expires['customers_points_expires'])) { echo '<strong>' . MY_POINTS_EXPIRE . '</strong> ' . tep_date_short($expires['customers_points_expires']); } ?> Yeah I had the same issue, just hadn't gotten round to fixing it yet. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 14, 2017 Author Share Posted September 14, 2017 @LeeFoster I think this were all the bugs thus far right? No other bugs to look into except to find a better solution to implement code for Bug fix 2 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 14, 2017 Share Posted September 14, 2017 Just now, Tsimi said: @LeeFoster I think this were all the bugs thus far right? No other bugs to look into except to find a better solution to implement code for Bug fix 2 Yeah, I think that was all the known ones. I'll do some testing and see if anything else comes up. Tsimi 1 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 14, 2017 Author Share Posted September 14, 2017 (edited) @raiwa If no one is assigned for it yet, I'll take the information box module. Edited September 14, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 14, 2017 Share Posted September 14, 2017 1 hour ago, Tsimi said: If no one is assigned for it yet, I'll take the information box module. @Tsimi, OK @Tsimi, @LeeFoster, I was thinking about the modifications in checkout_payment.php and checkout_confirmation.php for bug fix 2. My idea: - create a real payment module called "points" (copy of "cod" module) - show it only if available points value >= order total - in that case, not show the tick box "redeem points" and change the info text to something like: "If you wish to pay the order with your points, select "Points" as a payment ...blablabla... - session register 'customer_shopping_points_spending' in checkout_confirmation.php in ht module. - remove bug2 fix modifications from checkout_confirmation.php - leave "required aria-required=true" in the payment module coding in checkout_payment.php - remove script in checkout_payment.php - remove modification in payment class - all other functionality for redeem points if less than order total as is. Could this work? 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...
LeeFoster Posted September 14, 2017 Share Posted September 14, 2017 20 minutes ago, raiwa said: @Tsimi, OK @Tsimi, @LeeFoster, I was thinking about the modifications in checkout_payment.php and checkout_confirmation.php for bug fix 2. My idea: - create a real payment module called "points" (copy of "cod" module) - show it only if available points value >= order total - in that case, not show the tick box "redeem points" and change the info text to something like: "If you wish to pay the order with your points, select "Points" as a payment ...blablabla... - session register 'customer_shopping_points_spending' in checkout_confirmation.php in ht module. - remove bug2 fix modifications from checkout_confirmation.php - leave "required aria-required=true" in the payment module coding in checkout_payment.php - remove script in checkout_payment.php - remove modification in payment class - all other functionality for redeem points if less than order total as is. Could this work? This would be the preferred option, I considered doing it but I don't know enough about how to do it. raiwa 1 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 14, 2017 Author Share Posted September 14, 2017 (edited) @raiwa Sounds logical and could work with far less complications. Burt also used a custom payment module in his version and it worked pretty good. That new points payment module should only show if the complete order can be covered by points else keep the current style with tick box for points available and regular payment method selection. Would something like that be possible without creating too complicate code? If yes then definitely go for it. Edited September 14, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 14, 2017 Share Posted September 14, 2017 @Tsimi, I believe it's not too complicate. Just add the condition "available points value >= cart total" to the enable check of the payment module. (I didn't use real code, just conceptual) 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...
♥raiwa Posted September 15, 2017 Share Posted September 15, 2017 @Tsimi, @LeeFoster, shall I give the payment module and related updates a try? Can you please have a look and check the modified my_points_help.php. I believe the option " Enable Products Model Restriction " could be removed. "Enable Categories ID Restriction" should do it. Your thoughts? 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...
LeeFoster Posted September 15, 2017 Share Posted September 15, 2017 26 minutes ago, raiwa said: @Tsimi, @LeeFoster, shall I give the payment module and related updates a try? Yes go ahead. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 3 hours ago, raiwa said: @Tsimi, @LeeFoster, shall I give the payment module and related updates a try? Yes, please go ahead. Why not keep the model number restriction? Maybe a shop owner wants to restrict the use of points on certain products and therefore use model number? With categories id you restrict the whole category and not only 1 product? Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 15, 2017 Share Posted September 15, 2017 42 minutes ago, Tsimi said: Why not keep the model number restriction? Maybe a shop owner wants to restrict the use of points on certain products and therefore use model number? With categories id you restrict the whole category and not only 1 product? I thought this too but couldn't work out how it worked. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 @LeeFoster To be honest I haven't touched that area of the addon yet. I just imagined how it could/would work. Maybe it is time to have a closer look at it. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 15, 2017 Share Posted September 15, 2017 (edited) @Tsimi, @LeeFoster, There are model (only one model possible) and product id (array list) to do the same. I mean only product id's (array) would do it. Category id's are another subject. Edited September 15, 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...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 Oh I see... yeah of course if product id is available no need for model number I guess. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 @raiwa Had a look at your new my_points_help files and at first it does look all good. But if I change anything in the admin the Last updated: date doesn't change to todays date. Here we have 15.9.2017 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 15, 2017 Author Share Posted September 15, 2017 @raiwa & @LeeFoster Added new Information with Points FAQ link boxes module. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 15, 2017 Share Posted September 15, 2017 (edited) 44 minutes ago, Tsimi said: Had a look at your new my_points_help files and at first it does look all good. But if I change anything in the admin the Last updated: date doesn't change to todays date. Here we have 15.9.2017 @Tsimi, it seems this is a core bug. Not any module (config group 6) updates the last_modified entrance in the database when a setting is changed. Other configuration entries do update the last modified date. I'll have a look if there is a possibility to trigger the update from the ht module. Otherwise we could revert back and use the standard configuration entries like in your original ot module. Edited September 15, 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 September 15, 2017 Share Posted September 15, 2017 @Tsimi, @LeeFoster, It seems there is no mechanism to update the modification dates in the modules config group 6. I believe the easiest way without touching core, would be to revert the configuration entries to Tsimis version, standard config entries under admin -> configuration in the ot module, as it was already done and revert the configuration constants. I would only add the optional database delete setting. Sorry wasn't aware of this, I never used last modification date in any contribution. Any other ideas? 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.