Jump to content
kgtee

Autoloader question

Recommended Posts

Does autoloader.php loads the core classes files only once and will not re-load even the file is modified?

The reason I ask is because I have tried to change the code of shopping_cart class, and everything I changed in there just would not make any impact and have no effect at all.

Share this post


Link to post
Share on other sites
Posted (edited)

Just tried deleting the entire content of admin/includes/classes folder...hahaha...the shop still function as normal!!??. That's crazy!

No wonder some old add-ons from the appmarket cannot be removed cleanly and the shop keeps throwing out errors after removing.

Edited by kgtee

Share this post


Link to post
Share on other sites

If you're trying to change the shopping cart class file on the shop side it is in the folder...includes/system/versioned/1.0.0.0/.  Depending on what you're doing you might also be able to add your own class so it doesn't get clobbered on you in future updates.  I haven't tried to do that yet but I see folks posting about it in the club.

Dan 

 

Share this post


Link to post
Share on other sites

The catalog side has no dependencies on admin/includes/classes

In admin, I think that you will find that uploads won't work.  Also you may have problems with message stack messages, active rows, and the modules pages. 

1 hour ago, kgtee said:

The reason I ask is because I have tried to change the code of shopping_cart class, and everything I changed in there just would not make any impact and have no effect at all.

Which one?  The one that matters is the most recent one under includes/system/versioned (currently under 1.0.0.0 ). 

Note that admin/includes/classes/shopping_cart.php was removed.  But even before that, it would only affect things on the admin side. 

If you want a custom version for the catalog side, put it in includes/system/override

The autoloader loads a fresh copy every time that a page is loaded.  It has no caching between requests. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

 @Dan Cole and @ecartz thanks for the pointer. I will try that.

 

So, it seems if one is not in the club, he will have to try harder to write his own code. 😕

Share this post


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

So, it seems if one is not in the club, he will have to try harder to write his own code. 😕

I don't know about that but you'll certainly be missing out on a lot of good information and the support, that is provided there.

Dan

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, kgtee said:

 @Dan Cole and @ecartz thanks for the pointer. I will try that.

 

So, it seems if one is not in the club, he will have to try harder to write his own code. 😕

it seems so logical to limit add-on for an open source project😂

Edited by hungryfrank

Share this post


Link to post
Share on other sites
3 hours ago, ecartz said:

If you want a custom version for the catalog side, put it in includes/system/override 

This works! Thanks very much for the pointer! @ecartz

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

×