Page 1 of 1

where to start with bolt ?

Posted: Sat Dec 12, 2015 4:13 pm
by gautamz07
Hey guys , i want to get started with bolt and here's what i'd like my first project to be:

My website will have 3 main categories: - dining , accessories , bedroom.

when i land on the index page i will see of ofcourse the home page , on the main menu there will be a tab called "products".

now when i click on "products" , i go to the products page and here i see items of all there categories I.E. dining , accessories , bedroom. this page will only have images , displayed in boxes .

Now when i click on any of the images i go to the backpage of that product , an example would be products->bedroom-> special kangaroo beds, so now i am on the "special kangaroo beds" page. now of course on each of the individual backpages i have to display a bit of information IE. product name , product description , product id , product code , etc.

Now how do u go about building this in bolt and where do i start ?? ofcourse there have to be admin panels too for the products. I just don't know where should i really start , i am just doing this for demo pupose , so i don't mind making mistakes and going wrong.

I know such a website in plain PHP would be quite easy , infact i have build a admin panel myself using PHP , with file upload functionality etc . but the purpose of this project is to start on bolt :D

Re: where to start with bolt ?

Posted: Sat Dec 12, 2015 4:56 pm
by Celauran
Start with the data. Always. Look at its properties. Look at the relationships between the various types of data. Once you've got that laid you, you can get started defining your content types in bolt and setting up the relationships.

Re: where to start with bolt ?

Posted: Sun Dec 13, 2015 6:09 am
by gautamz07
Start with the data. Always. Look at its properties.
,

did't quite understand you celauran , what data ?

Re: where to start with bolt ?

Posted: Sun Dec 13, 2015 7:38 am
by Celauran
Model your data. You've mentioned products and categories; what properties do these have? What other data needs to be represented on your site? Start with the DB schema and work from there.

Re: where to start with bolt ?

Posted: Sun Dec 13, 2015 7:48 am
by gautamz07
ok , thank you . will think about that.

Re: where to start with bolt ?

Posted: Tue Dec 15, 2015 4:40 am
by gautamz07
Here is what i want to create visually .. just taught i'd share my idea.

Home page: http://i.imgur.com/4sBcyq4.jpg

Product page: http://i.imgur.com/AZLS8DE.jpg

Category page: http://i.imgur.com/5Slwyyf.jpg (i have shown the accessories page here , there are 3 categories in total and all look the same only the images on the page changes.)

Indivisual product page: http://i.imgur.com/qIcKrjT.jpg (The most important and on this page i believe most of the databse functionality comes into play, see the table at the bottom, so ofcourse whatever data the admin enters in the front end , along with each indivisual product , gets displayed here.)

well , you''ll see this is a very simplistic design and most of the backpages are entirely image only , hardly any data to be displayed.

Now as far as the tables are concerned , heres what i have in mind:

Product table:
- category_id
- category_nm

Indivisual Product table:
- Id
- Images - (I believe the path of the images will be stored here , there might be anywhere between 12-24 images, i guess the actual images get stored in folders on the server.)
- Details
- Price
- Dimension
- Category (i believe this will have to be a foreign key.)

Do tell me know if my plan sounds concrete enough and well were do i go from here, does bolt allow to create custom admin panels ? do i go ahead and create the database now ?

Thanks alot for your help.

Re: where to start with bolt ?

Posted: Tue Dec 15, 2015 7:01 am
by Celauran
Categories can either be a taxonomy or a separate data type, depending on your needs. Taxonomy would be fine for listing and categorization, maybe less suitable if categories have properties of their own. Products looks good. I'm not 100% certain how Bolt handles multiple images per content type as that's not a use case I have encountered. I know it stores the paths as an array in the DB, so it shouldn't be a problem. Also, you won't need a category_id column because Bolt stores its relationships in a single table. Not ideal, but that's one of the tradeoffs you make when using a CMS. It looks like a pretty simple site, so you should be able to prototype it in Bolt rather quickly.

Re: where to start with bolt ?

Posted: Wed Dec 16, 2015 1:01 am
by gautamz07
Thanks celauran , i will look into everything u've said , not started yet , but will start on this soon.

Re: where to start with bolt ?

Posted: Fri Dec 18, 2015 5:45 am
by gautamz07
Categories can either be a taxonomy or a separate data type, depending on your needs. Taxonomy would be fine for listing and categorization, maybe less suitable if categories have properties of their own.
i did''t quite get that , can you emphasis ?

Re: where to start with bolt ?

Posted: Fri Dec 18, 2015 6:19 am
by Celauran
https://docs.bolt.cm/taxonomies

That page explains taxonomies pretty well. If you need for your categories to have functionality beyond that, additional properties (such as a description), then you might be better defining a separate content type for them and relating your products to this category type rather than to a taxonomy.

Re: where to start with bolt ?

Posted: Sat Dec 19, 2015 4:50 pm
by gautamz07
I guess the section HEREhttps://docs.bolt.cm/contenttypes-and-r ... news-items explains how to create a custom admin panel :D i tried it and it worked , I.E. i created a admin panel , with exactly the feild defined in the .yml file

Code: Select all

news:
    name: News
    singular_name: Newsitem
    fields:
        title:
            type: text
            class: large
        slug:
            type: slug
            uses: title
        image:
            type: image
        text:
            type: html
            height: 300px
    record_template: newsitem.twig
Guess , i just need to go through the doc's for a while.