Category structure

More
12 years 8 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...

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

More
12 years 8 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
12 years 8 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...

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

More
12 years 8 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.

More
12 years 8 months ago #31396 by ggppdk
Replied by ggppdk on topic Category structure
Did you try creating a single Joomla Menu Item of Type "item form submission" and not selecting any type ?

User will be asked to select Content Type in the form,
-- then after he/she clicks apply , he/she will be displayed with the custom fields


-- 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...

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

More
12 years 8 months ago #31400 by brandonking
Replied by brandonking on topic Category structure
I didn't know that. Thanks, But there is one problem, I don't want to show list all the Types.

Regards,

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.612 seconds
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