Taxonomy select to filter next taxonomy select
Hi,
I Want to add select items for inputting address.
In the catalog i wil create fields for an address. the country, region, and county fileds of the address will be select options. I want the user to select a country and then this will change the options availiable in the region selection options based on sub sections of country in the taxonomy.
I have set up a list in the taxonomy module for place in the UK.
UK Locations
-Scotland
- England
-- North East
--- County Durham
--- Northumberland
--- Tyne And Wear
- North West
--- Cheshire
--- Cumbria
--- Greater Manchester
--- Lancashire
--- Merseyside
-Wales
-Northern Ireland
I want to allow the user to add a catalog item and then select:
1st : the country (England, Scotland, Wales)
2nd: the region (for england: North East, North west, south East etc)
3rd: the County (for the North East: Tyne and Wear, Durham, Northumberland)
When the 'counrty' is selected it will alter the 'region' selection options to only sub catagories of this 'country'.
when the 'region' is selected it will alter the selection options to only sub catagories of this 'region'.
once a 'region' has been selected the county options for this 'region' will be availiable to selcet in the county field.
Is this possible?
Thanks
Ben
Re: Taxonomy select to filter next taxonomy select
The next release (which you can download the alpha from google code) has a treeview where you can select parents/children or just children in the tree view (as below). This works for any table, not just taxonomy.
We are considering dynamic items, but since the option list is dynamically created AND dependant on the item you're editing, the optionlist will be reset when you're not editing the item. probably not a train smash, except for filters, etc.
[attachment=0:gfy0ccp7]new-select-tree.jpg[/attachment:gfy0ccp7]
Re: Taxonomy select to filter next taxonomy select
would i just overwrite the existing catalog module with this version (after backing up) or is this version so different that i'd have to start again?
Cheers
Re: Taxonomy select to filter next taxonomy select
you can't use it from the repository (not yet). you can download it, but you have to also install the DynamicTable driver (used by FormAuto in the repository) as this is now used instead of DC_Catalog.php.
Archive your existing /catalog and /catalog_ex folders, and delete them, then simply install the new catalog folder. Remember that you also have to use the NEW backend_tabletee as things have changed for TL 2.7.
Remember to run install before you continue to update the DB manually.
You wouldn't lose anything, except your image thumnail settings when you have a FILE field and you've specified image width/height (its not 1 combo-field, before it was 2 fields).
DO NOT try this on a production site!
Re: Taxonomy select to filter next taxonomy select
Thanks for the instructions. I'll give it ago.
when you release the new version through the repository will I be able to update old catalogs i have made through the repository?
Or will this be a completely new catalog system?
Cheers
Re: Taxonomy select to filter next taxonomy select
no its backward compatible, you just have to manually remove the catalog_ex folder, but a warning for that will be given if you haven't done it, as the catalog won't continue. The new catalog has all the catalog_ex files merged into the catalog folder.
Re: Taxonomy select to filter next taxonomy select
Great, look forward to it's release. :D
Ben
Re: Taxonomy select to filter next taxonomy select
Hi,
I gave that a go but got this error when running the typolight install.php
Code:
Fatal error: Uncaught exception Exception with message Query error: Key column 'id' doesn't exist in table (ALTER TABLE `tl_catalog_types` ADD PRIMARY KEY (`id`);) thrown in D:\webservers\xampp\htdocs\golf2\system\libraries\Database.php on line 519
#0 D:\webservers\xampp\htdocs\golf2\system\libraries\Database.php(162): Database_Statement->execute()
#1 D:\webservers\xampp\htdocs\golf2\typolight\install.php(284): Database->execute('ALTER TABLE `tl...')
#2 D:\webservers\xampp\htdocs\golf2\typolight\install.php(767): InstallTool->run()
#3 {main}
No worries though. I'll just wait till it's availiable through the repository. If however you need a beta tester let me know and i'll be more than happy to help.
Re: Taxonomy select to filter next taxonomy select
it does work. just ensure that you have backup/removed catalog_ex/ and then you are only left with the NEW catalog folder from the distribution on google code.
I'm not sure about that error, because the ID field should exist, as you didn't delete your catalog tables and data, right?
Re: Taxonomy select to filter next taxonomy select
I didn't delete any catalog fields or tables.
I removed both folders and just added the new 'catalog_ext' folder from google code.
The new catalog folder is called 'catalog_ext', should i rename this to catalog? and delete the original catalog and catalog_ext?
Edit: just tried this too and didn't work, seems the typolight install tool doesn't want to:
Code:
ALTER TABLE `tl_catalog_types` ADD PRIMARY KEY (`id`);
Re: Taxonomy select to filter next taxonomy select
ummm... not correct... the new folder is catalog/ (not catalog_ex), so I'm not sure here you are downloading the alpha code from:
http://code.google.com/p/typolight-cata ... loads/list
Catalog 2.0 alpha 2
This download will contain folders & files. As you can see, there is no catalog_ex folder at all!
drivers/DC_DynamicTable.php
modules/backend_tabletree/
modules/catalog/
modules/catalogajaxratingfield/
modules/catalogitemhitsfield/
modules/catalogmultitextwizardfield/
modules/taxonomy/
Re: Taxonomy select to filter next taxonomy select
Well this may solve everything, haven't a clue how i've ended up with that other folder. I'll give this ago and see how i get on.
Thanks
Re: Taxonomy select to filter next taxonomy select
Good work!
Yep, all my fault. is there another catalog in google code? maybe i downloaded that. Sorry about that.
Anyway, It installed fine and works like a charm, it kept all the image links in the catalog items too.
I see there are some nice new functions in there like import and export csv, comments and more. I'll have a good play with it and let you know how i get on.
Do you have a rough time scale of when you will have a stable version?
Re: Taxonomy select to filter next taxonomy select
We've added a few more smaller features since the alpha 2 code, but the back-end is bascially done. This version also includes christian's work on custom-field types, so now you will have the ability to add ANY type of field designed and developed by any developer.
Now we're working on the front-end modules. There is still a bit of work to complete before that will be finished.
Re: Taxonomy select to filter next taxonomy select
Great stuuf, look forward to seeing it. Just came across 'searchable'. Does this mean that the typolight internal search will also search the catalog module data?
If so i do like that.
Do you have a list of new features?
Re: Taxonomy select to filter next taxonomy select
That feature has been in the catalog for quite a while ;-)
You can go to the Google Code page and it will list some of the features/bugs. Just remember to view the issue list as ALL tickets, so you can see what has been closed/open.
Re: Taxonomy select to filter next taxonomy select
I must have missed that when setting up this new site, I've not sone a site with the catalog for a while. It's good getting stuck into it again.
Re: Taxonomy select to filter next taxonomy select
Is there anywhere i can post feature requests? :D
Re: Taxonomy select to filter next taxonomy select
Just go to the Google Code link I gave you, there is an issues link and log an issue, at the bottom there are TAGS, the first tag can be used to flag an item as a "Type::Enhancement"