Category structure

More
13 years 3 months ago #31359 by brandonking
Hello,

I am wondering which way is best for category structure with FC.
e.g. My current category(3 Level)
Usedcar
|_Brand BMW
|_ _ Model A
|_ _ Model B
|_ _ Model C
|_Brand FORD
|_ _ Model A
|_ _ Model B
|_ _ Model C

With this structure,
1. Creating new item - too many list in category selection
2. Importing items - importing items for each child category(if there are 100 child categories then I have to import 100 times, am I correct?)
3. Category filtering - I can only filter within child category, am I right?

So I am thinking of removing 3rd categories and use select field to save list all related models for Brand category.
With this way,
1. Creating new item - a few list in category selection and Model will be available in select field.
2. Importing items - can import many items at once
3. Category filtering - can use filtering for Models as well.

Am I on the way for category structure?

Edit: The only problem :) is that I have to create Type for each Brand to assign BMW Model select field for BMW category, am I right?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31364 by micker
Replied by micker on topic Category structure
Please for question use good part of this forum ...
IL move it

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31368 by ggppdk
Replied by ggppdk on topic Category structure
I am not sure i understand why you must import multiple times, CSV import can use catid column, also you could use COPY task in item's manager to duplicate your content


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31372 by brandonking
Replied by brandonking on topic Category structure
First, sorry micker, I thought that I put it in Documentation and Tutorials forum.

@ggppdk: Thanks for the tip. But I want to go with second option which allow me to filter Models in Brand category and selecting category from dropdown in frontend submission will be simple as well.
But the only concern is that I have to duplicate Type for each Brand category, sounds too bad. :(
I would really appreciate if you could give me a tip how to connect each Model select field to each Brand category then I don't need to duplicate Type.
What I mean is:
With UsedCar Type will have many Model select fields.
If I click BMW then only BMW Model select field will be displayed.
All other Model select fields will be ignored.
What do you think?

I always appreciate your help.
Regards,
Brandon

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31376 by ggppdk
Replied by ggppdk on topic Category structure
I am sorry , i am a little confused , why is content duplicated in the first place ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31377 by brandonking
Replied by brandonking on topic Category structure
Sorry ggppdk, I didn't make myself clear enough.
There is no content duplicated.

My current situations are as follow
Curent Category:
Usedcar
|_Brand BMW
|_ _ Model A
|_ _ Model B
|_ _ Model C
|_Brand FORD
|_ _ Model D
|_ _ Model E
|_ _ Model F
Type: UsedCar (only one Type used for all UsedCar items)

I want to change to below.
New Category:
Usedcar
|_Brand BMW
|_Brand FORD

Now I have to create FC select-field which will have a list of Model from each Brand.
BMW select-field(List of Models from BMW)
FORD select-field(List of Models from FORD)
TOYOTA select-field(List of Models from TOYOTA)
NISSAN select-field(List of Models from NISSAN)

But here is the problem.
With Only one Type(UsedCar) will show all select-fields that I created above.(in item submission form)
So I have to create a Type/Template for each Brand even if all Types/Templates will have exactly same setting/layout except above select-field.

So New Type will be like this.
New Type: BMW, FORD, TOYOTA, NISSAN,etc.

With this situation, I was asking you tips, instead of creating many Types/Templates, Is there any other way to associate certain select-field to certain Brand category then I don't need to create so many Types/Templates.

Maybe, multi-dimensional select-field, first group name is same as Category Name BMW and have list of models, second group name is same as Category Name FORD and have list of models.
Only show a group depends on selected category.
What do you think?

I hope I made myself clear.

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31381 by ggppdk
Replied by ggppdk on topic Category structure
Create a DB table with

TABLE NAME: car_models
TABLE COLUMNS:

CREATE TABLE IF NOT EXISTS
`dbprefix_carmodels` (
`model_id` int(11) NOT NULL auto_increment,
`model_name` varchar(255) NOT NULL,
`brand_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
) ENGINE=MyISAM CHARACTER SET `utf8` COLLATE `utf8_general_ci`;

in the above table , when inserting rows, the brand_id will be given the catid of of appropriate category, this means that each item will have as main category e.g. Brand BMW and category Usedcar,

Then use an SQL query to create the select field

SELECT model_id AS value, model_name AS text from #__carmodels WHERE brand_id={item->catid}

also maybe your brand_id could be {item->type_id} which Content Type id

NOTE if you SQL query with {item->...} inside it then this cannot be displayed as filter in category view


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31390 by brandonking
Replied by brandonking on topic Category structure
Hello ggppdk,

I really appreciate your help, I wish that I could do it, unfortunately I am not good at doing this and I am scared changing DB as well. Creating Types(about 13 Types) for each Brand is easier for me.
Many thanks for your time.
Best wishes,
Brandon

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31391 by ggppdk
Replied by ggppdk on topic Category structure
Ok , actually since the brand of cars is little, you could do this too , and actually 13 content types is very little, to be a performance problem or any other problem,

other than the initial time it takes to setup each of them


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31392 by brandonking
Replied by brandonking on topic Category structure
I realized that I have to create 13 menus(itemsubmission form) and makes more complicate.

Maybe it is better for me to create a custom select-field that has category recognition(compare category name with custom select-field name and display only if it matches otherwise discard).

Regards,
Brandon

Edit:Creating custom select-field with category recognition is out of my ability. :) I will just make 13 menus..

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save