Jump to content
swguy

Why were TABLE_ defined constants removed?

Recommended Posts

What's the reasoning behind this decision?  Because it sure did create a lot of work for people who are trying to keep their mods current. 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
Posted (edited)

To allow the ethos of "no core code changes".  

Already covered in depth, multiple times, over the years ;) - there's some threads you can read more buried in the forum.

Note also that FILENAME_* are gone too...

Edited by burt

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

It's part of an overall strategy to make addons easier to install for shopowners, preferably without changing any code at all.

It's better that addon publishers do the work instead of all the shopowners installing the addon each doing some (and having problems)

 


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
11 minutes ago, burt said:

Already covered in depth, multiple times, over the years ;) 

Can you point me to a specific post?  I'm genuinely curious. 

I'm talking about defines for core tables in osCommerce like TABLE_CONFIGURATION.  Also, doesn't this kill the use of prefixes? 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
Just now, swguy said:

Can you point me to a specific post?  I'm genuinely curious. 

I'm talking about defines for core tables in osCommerce like TABLE_CONFIGURATION.  Also, doesn't this kill the use of prefixes? 

You'd need to search for them, they date back to 2014 or earlier.

Who cares about pre-fixes?  Databases are cheap.


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
4 minutes ago, burt said:

Who cares about pre-fixes?  Databases are cheap.

I definitely wouldn't support prefixes if I was starting a project today, but what if someone is upgrading an osCommerce 2.3 installation with prefixes?  Do they have to rename all their tables?  


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
Just now, swguy said:

I definitely wouldn't support prefixes if I was starting a project today, but what if someone is upgrading an osCommerce 2.3 installation with prefixes?  Do they have to rename all their tables?  

Yes.  That'd take...a minute or two ?  In this instance...who runs osCommerce with prefixes?  1 in 1000 shopowners? 

I get what you're saying, but to do positive things...sometimes means a perceived negative thing has to be lived with.

I did actually have a branch with full pre-fixing capability - but there was very little interest in it, so it got deleted.   


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
Quote

Yes.  That'd take...a minute or two ?

in an ideal world, yes.
in reality, just require the old files (filenames.php / database
_tables.php) into application_top.php,where they previously were, to keep older addons using defines running.

 

 


 

 

Share this post


Link to post
Share on other sites
45 minutes ago, Stephan Gebbers said:

in reality, just require the old files (filenames.php / database
_tables.php) into application_top.php,where they previously were, to keep older addons using defines running.

Avoid core code changes...you could instead use a Hook...  Try it in Phoenix with one of the pre-placed sitewide hooks ;) 


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, you have done a Yeoman's job of taking care of osCommerce.  Way better than I could have done. 

But this decision seems unwise.  You have completely broken all existing mods, even ones that didn't modify includes/database_tables.php. 

And the file still exists in the admin folder!  If you really wanted to get rid of the file, why didn't you just put these defines in the configuration table so existing mods would continue to work? 

Shouldn't there have been a pinned thread somewhere saying, "Hey, modders, update your stuff!" so I wouldn't have to learn about this from a bug report?   


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites

Cheers.

  1. wasn't my decision
  2. decision was made in 2014 or maybe earlier - 5 *years* ago at least - I know I was on my holidays when the first argument about it got out of hand
  3. announcement was made years ago in forum
  4. work has been ongoing ever since to get osc updated, work has not yet started in admin area hardly - waiting on more shopowners, developers, conultants and businesses to actively support forward movement.

<blunt>addon compatibility, that's up to addon makers</blunt>

Maybe your focus is elsewhere - which is 110% cool - hence why you haven't come across this in the past 5 years ?


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

I apologize, I thought you were the one championing it.  Oh well, I guess I had better get on board if this is the new direction.  

I'd love to be more involved in osCommerce, but the demand from paying clients just isn't there.  Who knows, maybe Phoenix will breathe new life into the project. 

 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


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

maybe Phoenix will breathe new life into the project

Things do generally seem more positive since the release of Phoenix.  It's solved some of the points that some people liked to regularly quibble about;

  • lack of "official" acceptance
  • lack of versioning
  • ease of updating

Joined the Phoenix Club


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

Is there guidance on updating from 2.3? 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
7 hours ago, burt said:

Avoid core code changes...you could instead use a Hook...  Try it in Phoenix with one of the pre-placed sitewide hooks ;) 

ok, you are right, sitewide hooks is a new option to add things like that.


 

 

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

×