Post by kingsbathroom » Wed Oct 19, 2011 8:59 pm

Hello friends:

I want to know whether there is individual code page for every product or category, which directory is in?

Thank you in advance

Tina
Last edited by kingsbathroom on Thu Oct 20, 2011 4:54 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Oct 19, 2011 8:56 pm

Post by uksitebuilder » Wed Oct 19, 2011 9:19 pm

Hi Tina,

Sorry I dont quite understand your question. Could you explain a little more on what you are trying to do.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kingsbathroom » Wed Oct 19, 2011 9:33 pm

Hi Simon:

I would like to change every category individual using html or php code, I think the code of the every category or product might be stored in some directory in ftp. so do u know any information about it.

For example, if i have 5 different categories, I wound like they have different looking. I think i need to it individually. Hope you can understand me this time.

Thank you
Tina

Newbie

Posts

Joined
Wed Oct 19, 2011 8:56 pm

Post by uksitebuilder » Wed Oct 19, 2011 9:37 pm

Hi Tina,

All data is stored in the database and fetched depending on the link clicked which holds the id for that category. This is then served via a template for the category.

Not something that is going to be easily editable to have a different template for each category.

There may be an extension to do this in the extension store though.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Xsecrets » Wed Oct 19, 2011 9:37 pm

That is not possible at this time. There is no separate code they all use the same php files.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by kingsbathroom » Wed Oct 19, 2011 9:46 pm

do you mean they have to be the same theme, I can change the whole theme and i can not change them individually? like home page, where is the code file stored in ftp which is the same code when you open the website to view the source, normally it is index.html or index.php. but i can not find in our ftp.

sorry for all those silly questions.

Thank you
Tina

Newbie

Posts

Joined
Wed Oct 19, 2011 8:56 pm

Post by uksitebuilder » Wed Oct 19, 2011 9:58 pm

Xsecrets wrote:That is not possible at this time. There is no separate code they all use the same php files.
Isn't this the sort of thing http://www.opencart.com/index.php?route ... on_id=2359

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kingsbathroom » Wed Oct 19, 2011 10:03 pm

Hi simon:

It is similar idea, but i prefer to code my category individually. do you know where can i find the source code for it?

Thank you
Tina

Newbie

Posts

Joined
Wed Oct 19, 2011 8:56 pm

Post by uksitebuilder » Wed Oct 19, 2011 10:10 pm

It is going to be a little tricky because OpenCart uses MVC+L so you should ideally know the how MVC+L works and I have a feeling this will be new to you.

Doing it yourself, you will only be able to edit the single template which all categories will display.

Files for the category page can be found in the following locations

catalog/view/theme/default/template/product/category.tpl
catalog/controller/product/category.php
catalog/language/english/product/category.php
catalog/model/product/category.php

Basically MVC+L works a little like this

the template file gets it's data from the controller file
the controller file gets it's data from both the language file(s) and the model file
the model file gets it's data from the database

in addition both all files can use globally available data such as get and post requests plus any config data stored in the settings table of the database (plus a few other locations/methods)

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kingsbathroom » Wed Oct 19, 2011 10:14 pm

Hi Simon:

Thank you for your reply, I am really appreciate it. I think i got the general idea how it works.

Tina

Newbie

Posts

Joined
Wed Oct 19, 2011 8:56 pm
Who is online

Users browsing this forum: No registered users and 9 guests