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>classes>currencies
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: admin>classes>currencies
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
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
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?
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
- php 8.2.18
Now working on taking a short rest
-
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
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.
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
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
- php 8.2.18
Now working on taking a short rest
-
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
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>
So with autoloading currencies.php is autoloaded throughout, both front and back end and is no longer needed in any othe file anymore and if used in an admin file will cause an error
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>
So with autoloading currencies.php is autoloaded throughout, both front and back end and
Code: Select all
require('includes/classes/currencies.php');Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest
- php 8.2.18
Now working on taking a short rest