ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Any good schema guys around?

June 07, 2012 8:31am

Subscribe [2]
  • #1 / Jun 07, 2012 8:31am

    Abbas Jaffar Ali

    29 posts

    Hello everyone-

    I’m in the process of evaluating EE and have a few requirements. I’ll mention what I want to do and how I’m currently thinking of doing it in EE. However, I’m sure there a lot of really smart guys who can probably use their experiences to possibly make it much better as far and I would really appreciate your comments.

    1) I have set up a channel for companies. For example, Apple, Dell, Nokia. Each company has a set of fields like name, about, URL etc. and then I’m using the Matrix to define an indefinite number of locations for them such as offices, service centers and retail stores- each of which has a location and tel number.

    I could set up retailers such as Amazon.com, BestBuy etc. within the same channel but am not sure if I should use a separate channel instead. I’ll give my reason a bit below.

    2) Next I have Products such as desktops, tablets and hard drives etc. Each type of product has its specific set of fields. For example, desktop could have CPU speed, RAM while tablet could have screen size, connectivity and hard hard drive could have storage capacity, speed etc.

    I am a little confused on whether I should set up just one channel for all products which would result in a LOT of custom fields most of which will be irrelevant when inputting any   any single product type or set up multiple channels- each for a product type. Reason I’m not sure if choosing multiple categories is coming up below

    3) The third channel of the database is articles which could be news, reviews, blogs etc. related to tech and gadgets. Let’s take an example of me writing a comparative review between the iPhone and Galaxy SII Smartphones.

    This article will need to be related to two companies: Samsung and Apple. This article could also be related to multiple retailers like Best Buy or Amazon. Finally, this article will be related to two products- iPhone and Galaxy. Within the article, I would also like to pull up a table comparing the specs of these two products as defined in the products.

    So how would you guys go about choosing the relationships between the channels. Should I be making one channel for all companies (including retailers) as well as products or do I make separate ones? Same for products. If I make separate ones, then what happens if I write a blog comparing Laptop, Smartphones and tablets- there will be three channels that I will need to tie it up to?

    Would appreciate a bit of help by anyone who is good with schemas.

    Thanks

  • #2 / Jun 07, 2012 9:17am

    Rob Allen

    3114 posts

    1. Companies and retailers
    I would set up 2 channels but use the same Custom field group. This would allow you to display Companies and Retailers in a combined entries list, or as separate entries (either company or retailer). You could also use a common category group to describe the type(s) of business they are.

    2. Products
    This one could swing either way!

    If you use one Channel and one Custom field group then calling product data into pages is straightforward. You could modify the publish page layout and put different spec types into tabbed pages so the author would simply add whatever data is needed for each product. It’s perfectly fine to have empty fields.

    If you use multiple Channels and multiple Custom fields groups that makes setting up templates a lot more fiddly, but keeps your publish pages more specific.

    I’d go for the one channel/single field group myself. The main reason being flexibility, eg if you add a new custom field you only have to update publish page and templates once, using several channels could be a long job to update.

    3. Relating products/companies to articles
    Use the Playa addon, that will allow you to select and relate any number of products/companies/retailers entries. This will work both ways as well, in that you can “reverse relate” say companies and show a list of articles they are mentioned in.

  • #3 / Jun 07, 2012 10:35am

    Abbas Jaffar Ali

    29 posts

    Thanks Rob-

    Considering how the number of products grow over time, do you think it wont become a UI issue for the editor ro add products to articles? Or is there a way Playa can show products based on their category?

  • #4 / Jun 07, 2012 11:42am

    Rob Allen

    3114 posts

    The actual number of products doesn’t really matter - EE can handle as many as you want 😊

    Apart from generic product fields such as descriptions, images etc, how many custom fields do you think you’ll need to hold specification data for all the types of product you are going to manage? Consider what you need now and what you may need in say 2 years time.

  • #5 / Jun 07, 2012 11:50am

    Abbas Jaffar Ali

    29 posts

    At the moment, I have about twenty types of products with each one having specs of 8-12 fields. So we’re already looking at roughly 200 fields. This could possibly increase to 30 products in the next couple of years but I’l try and keep the amount of specs per product less than 12.

  • #6 / Jun 07, 2012 2:59pm

    Abbas Jaffar Ali

    29 posts

    Also worth mentioning that I don’t mind buying an add-on that can help assist with creating products.

  • #7 / Jun 07, 2012 3:27pm

    Rob Allen

    3114 posts

    Hmmm - putting thinking cap on 😊

    So you could be looking at 300ish custom fields for the whole site, that shouldn’t be a problem but sometimes MySQL limits raise their ugly heads so might be best to get some EE support staff to confirm.

    Another approach here is to look at how the data in the custom fields is going to be used. If you’re going to use specific values, such as RAM, for search/filtering purposes, then a RAM custom field makes sense, but if you have a lot of general specification fields that aren’t used for search, or rarely used, it’s worth offering a simple textarea field for “additional info” where the author can add info not covered in a specific field, or you could use the ever useful Matrix addon so authors can craete custom spec lists.

    I think what I’d do is make a list of every product specification you’d like (by product type), then prioritise:

    1. Absolutely necessary (eg used for search/filtering)
    2. Nice to have
    3. Not strictly necessary ( could go in a general free text field)

    See how many you get in each group, and see what the landscape looks like then.

  • #8 / Jun 07, 2012 3:31pm

    Abbas Jaffar Ali

    29 posts

    Thanks again for your response Rob-

    The idea is to move from Wordpress to EE so that data can be compared between products mostly. For that, I think setting up separate fields will be necessary for each product spec.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases