Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Converting Points and Rewards system for osC BS


Tsimi

Recommended Posts

18 minutes ago, raiwa said:

@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?

Do we need the last updated date in there?

Link to comment
Share on other sites

Maybe it's not so important, customers get always the relevant information when he earns points or redeems them.

On the other side it wouldn't be difficult to revert. I can undo the github update step.

Link to comment
Share on other sites

I wonder if it would be possible to update the last_modified columns by a function like "tep_cfg_disabled" or "tep_cfg_select_option".

I Googled and searched the forum, but couldn't find anything.

 

Link to comment
Share on other sites

@Tsimi, @LeeFoster,

I pushed the new payment module and all other changes for alternative bug 2 fix to GITHUB. (needs hardcore check)

Modifications in checkout payment and checkout confirmation are now hooked.

Please check and have also a look to the new language definition for select payment module in the hook language file. I'm not native english speaker :-)

 

Edited by raiwa
Link to comment
Share on other sites

@raiwa

I probably wouldn't use the Last update part in my shop. If I ever would want something like that I would probably write it manually inside the language definition, like I would do for the AGB (terms & conditions). You can remove that part which would also require to remove the last modified part from all the module DB queries since that doesn't seem to work anyway.

I will now test that new payment module of yours...later. :smile:

Link to comment
Share on other sites

19 minutes ago, Tsimi said:

I probably wouldn't use the Last update part in my shop. If I ever would want something like that I would probably write it manually inside the language definition, like I would do for the AGB (terms & conditions). You can remove that part which would also require to remove the last modified part from all the module DB queries since that doesn't seem to work anyway.

OK, that keeps things easier.

20 minutes ago, Tsimi said:

I will now test that new payment module of yours...later. :smile:

I thought to add some modifications today:

- optimize the "points_selection" function and move it to hook

- hook the checkout_process.php

So maybe better to wait until the entire checkout is updated. Or if you have a time left and wish, just check.

Link to comment
Share on other sites

Just now, raiwa said:

So maybe better to wait until the entire checkout is updated. Or if you have a time left and wish, just check.

Cool, then I wait till you get those changes uploaded to github. And btw. no hurry, I have 3 days off and we have a typhoon coming this way so I won't be going anywhere besides sitting here. Plenty of entertainment at home, video games, tv series, osC.... :biggrin:

Link to comment
Share on other sites

4 hours ago, Tsimi said:

I probably wouldn't use the Last update part in my shop. If I ever would want something like that I would probably write it manually inside the language definition, like I would do for the AGB (terms & conditions). You can remove that part which would also require to remove the last modified part from all the module DB queries since that doesn't seem to work anyway.

@Tsimi, @LeeFoster,

another thought on the last update message and last modified db entry:

Even the standard configuration entries (Admin/configuration) do update the last modified entry, they do it each time when a configuration entry is saved. Doesn't matter if the value is changed or left the same. So the messages "last updated" could easy show wrong information. Definitely much better Tsimi's suggestion to add it manually in the language file if someone wish to give that info.

Create a sophisticated custom function to compare old value to new value and update last modified only if different, sounds me overengineered for that purpose.

I'll remove it and simplify the whole my_points_help.php file.

Edited by raiwa
Link to comment
Share on other sites

@Tsimi, @LeeFoster,

I pushed the complete update for the checkout with the new payment module.

If you can give it a try, please.

Link to comment
Share on other sites

@raiwa

Just had a look at the new payment module.

It does show only when you have enough points to cover for the order and if not then the only the other modules are showing and you have to tick the checkbox which is so far working as it should.
However on the checkout confirmation page the points are not deducted from the order. No matter if I can pay everything with points or only partially.

I have tried to install the new files only and make the necessary changes to the checkout_confirmation, checkout_payment and checkout_process files. Maybe I messed something up, kinda hard to keep an overview at the moment.

I have currently 5 hooks showing in my test shop is that correct?

points/points_hooks.php PointsCreateAccountMailMod
points/points_hooks.php PointsCheckoutPayment
points/points_hooks.php PointsCheckoutConfirm
points/points_hooks.php PointsCheckoutProcessAddPoints
points/points_hooks.php PointsCheckoutProcessUnregister

If this issue is only happening on my end I will try to reinstall the whole addon from scratch and see if it fixes it.

Edited by Tsimi
Link to comment
Share on other sites

@Tsimi,

it works for me too.

Your hook list is ok.

If the ot redeemed points doesn't show in checkout_confirmation.php, check the hook call in checkout_confirmation.php.

If points are not deducted from customer points after checkout success, it's the first hook call in checkout_process.php.

If it still doesn't work, try a new clean installation.

 

@Tsimi, @LeeFoster,

A few points to decide:

1. The points info in product_info.php is a content module, now the configuration setting " Display Points information in Product info page " can be removed. Store owner can just decide to not install/enable the content module instead.

2. The points info in product_reviews.php can be hooked or added by content module

  • hook:
    + no additional new files
    - 2 core file changes
  • content module:
    + only 1 core file change
    + consistent with modularization in other comparable files like product_info.php
    + col width can be set in module
    + separate language files
    - additional new files
    - module needs to be installed in admin

3. same for product_reviews_write.php

I prefer content modules. Please let me know your thoughts.

Edited by raiwa
Link to comment
Share on other sites

5 minutes ago, LeeFoster said:

I'd go with modules too

@LeeFoster, would this be a job for you, point 2+3? You could take the product_info module as an example.

 

@Tsimi, if you have a time and wish, you maybe could update and revise the other language files, german for example. Spanish I can do later on.

Edited by raiwa
Link to comment
Share on other sites

Great, I'll go for the other modules/hooks left in account and admin.

Link to comment
Share on other sites

@Tsimi, @LeeFoster, pushed a bunch of fixes and clean ups today. For my part store side is ok now, awaiting the review modules.

Please consider a complete update.

Link to comment
Share on other sites

I just wanted to install and test your latest package.
I did a complete new install in a clean shop.

It is missing the HT module file.
The old HT language file has been accidentally been put inside the includes/modules/HT/ section
That is why no HT module is showing to install.

As soon you upload the HT module file I can continue with testing.

Also,

Inside the modified files folders the application_top file still has the show all error feature activated

//  error_reporting(E_ALL & ~E_NOTICE);
  error_reporting(E_ALL);
 
//  if (defined('E_DEPRECATED')) {
//    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
//  }

 

And something that can be added/adjusted later is this

Inside includes/languages/english/hooks/shop/points/points_hooks.php

FIND

define('TEXT_REDEEM_SYSTEM_PAYING',  'Please select points payment to pay your entire order with your points. (%s points %s)  <i class="fa fa-arrow-right"></i>');

REPLACE WITH

define('TEXT_REDEEM_SYSTEM_PAYING',  'Please select the <strong>Points</strong> payment method to pay your entire order with your points. (%s points %s)');

 

 

Edited by Tsimi
Link to comment
Share on other sites

1 hour ago, Tsimi said:

It is missing the HT module file.
The old HT language file has been accidentally been put inside the includes/modules/HT/ section
That is why no HT module is showing to install.

As soon you upload the HT module file I can continue with testing.

Done

1 hour ago, Tsimi said:

Inside the modified files folders the application_top file still has the show all error feature activated


//  error_reporting(E_ALL & ~E_NOTICE);
  error_reporting(E_ALL);
 
//  if (defined('E_DEPRECATED')) {
//    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
//  }

 

That's good for testing. Application_top.php will be removed anyway in final version. :-)

1 hour ago, Tsimi said:

Inside includes/languages/english/hooks/shop/points/points_hooks.php

FIND


define('TEXT_REDEEM_SYSTEM_PAYING',  'Please select points payment to pay your entire order with your points. (%s points %s)  <i class="fa fa-arrow-right"></i>');

REPLACE WITH


define('TEXT_REDEEM_SYSTEM_PAYING',  'Please select the <strong>Points</strong> payment method to pay your entire order with your points. (%s points %s)');

 

Will do

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...