admin>classes>currencies

Open to all! Ask other shopowners for help.
Post Reply
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

admin>classes>currencies

Post by Xpajun »

Just been adding one of my addons and have found that currencies.php is missing from classes.
Is this not needed/used any more - has it been replaced or is it alright to delete the call?
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


Join The Code Co-op to get access to your library in the Code Co-op Forum
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: admin>classes>currencies

Post by raiwa »

Xpajun wrote: Thu Feb 08, 2024 6:46 pm Just been adding one of my addons and have found that currencies.php is missing from classes.
Is this not needed/used any more - has it been replaced or is it alright to delete the call?
Admin side is using now the common store side classes in includes/system/versioned/
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: admin>classes>currencies

Post by Xpajun »

I'm a bit curious now - what does this file actually do and is it really needed now? Especially in admin on a non - EU webstore.

I can see it's a file from osCommerce back in 2007

Anyone like to shed any light on it?
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: admin>classes>currencies

Post by ecartz »

Prior to autoloading, admin used a duplicate copy of the currencies.php file to show prices. Since autoloading, that isn't necessary unless admin needs a different behavior than catalog. In general, admin can use the catalog versions directly.

If you just delete the require line from the add-on, things will probably just work.
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: admin>classes>currencies

Post by Xpajun »

ecartz wrote: Sat Feb 10, 2024 2:49 am
If you just delete the require line from the add-on, things will probably just work.
Thank for the explaination Matt - it does work after deleting the require line which was the reason for my curiousity

Would that also apply to front end files using it?
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: admin>classes>currencies

Post by Xpajun »

Sorry - I'm going single minded at this putting it in relationship just to my addon
I've just had a further look at this and YES currencies.php is required - at least the fist half of the file - it was the EU part that threw me though - now have a better understanding of it, the first part names the countries that have the € after the price and the else applies to those countries that have € before the price but only if the EUR is default currencies <my thoughts are censored here> :D

So with autoloading currencies.php is autoloaded throughout, both front and back end and

Code: Select all

require('includes/classes/currencies.php');
is no longer needed in any othe file anymore and if used in an admin file will cause an error
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply