Zen Cart Logo
Forums / General Questions / Location of subcategory files?

Location of subcategory files?

Views: 2,590

Results 1 to 20 of 25
23 Apr 2013, 9:33 PM
#1
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Location of subcategory files?

I am trying to find the files that contain my subcategory html pages so I can edit the html directly in the file itself instead of going to the admin to edit it. TIA!

23 Apr 2013, 9:46 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Location of subcategory files?

There are no subcategory HTML pages in Zencart. Everything is built from PHP files and database entries. Let us know exactly what you want to change, and we might be able to help.

23 Apr 2013, 10:18 PM
#3
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

Thanks stevesh. I am building custom subcategory pages & Zencart is limiting how long the page can be. If it goes over a certain length, the code gets scrambled. Is there a way around this?

24 Apr 2013, 8:02 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Location of subcategory files?

hflsales:

Thanks stevesh. I am building custom subcategory pages & Zencart is limiting how long the page can be. If it goes over a certain length, the code gets scrambled. Is there a way around this?

There aren't any "subcategory pages"... "Pages" - in the sense of static HTML pages - do not exist. Content and Information is stored in the DATABASE - not in any "files" - so your hunting for HTML files will lead you nowhere.

All category INFORMATION and CONTENT is contained in the database, and you add your content there (for categories, it is via the category EDIT function.)

There is technically NO LIMIT to the quantity of data you add, so if you wanted a category description to run to the length of Tolstoy's "War And Peace", this is quite possible (though impractical).

"Pages" are built on-the-fly by the PHP code, which gathers up the data and resources (such as images and DEFINE VARIABLES) and ASSEMBLES each page for the user - depending on what the user REQUESTS.

The "page" is delivered to the browser, and when the visitor clicks a link or performs an action, that "page" EVAPORATES FOREVER, and a NEW page is built by the PHP, which is then delivered to the browser.

Along the way, calculations can be made (and data stored), but EACH PAGE is made up for EACH UNIQUE VISITOR. And when they move around in the site, these pages "vanish" and new ones are made in their place.

24 Apr 2013, 9:38 AM
#5
denniszc avatar

denniszc

New Zenner

Join Date:
Mar 2013
Posts:
95
Plugin Contributions:
0

Re: Location of subcategory files?

i believe the length is set in the database, go to your database and edit for the subcategory, and increase the length it would accept. for example, say the sub category is set as VARCHAR(32), change this to VARCHAR(64) or anything longer

24 Apr 2013, 9:49 AM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Location of subcategory files?

denniszc:

i believe the length is set in the database, go to your database and edit for the subcategory, and increase the length it would accept. for example, say the sub category is set as VARCHAR(32), change this to VARCHAR(64) or anything longer

Just wondering how is this relevant to the question?

Cheers
Rod

24 Apr 2013, 10:38 AM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Location of subcategory files?

hflsales:

Thanks stevesh. I am building custom subcategory pages & Zencart is limiting how long the page can be. If it goes over a certain length, the code gets scrambled. Is there a way around this?

It may be i don't know what you mean by 'subcategory pages'. If you mean the product listing, there's an option in Admin - Configuration - Product Listing - Display Product Description that allows you to set the maximum length of the description . The default is 150 characters.

24 Apr 2013, 2:53 PM
#8
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

I went into the database and found the html for the category_description. But the html I need to edit is a sub category of a sub category. Does anybody know where I can find that? It is exactly what I need but not sure how to find it.

24 Apr 2013, 3:27 PM
#9
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

I found it but it says "Because of its length, this column might not be editable". Does anybody know how to make the text length of a column longer in the database?

24 Apr 2013, 3:28 PM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Location of subcategory files?

hflsales:

I went into the database and found the html for the category_description. But the html I need to edit is a sub category of a sub category. Does anybody know where I can find that? It is exactly what I need but not sure how to find it.

ALL categories are stored in the CATEGORIES table.. (this includes SUB-categories)

The BIGGER question is WHY are you editing the category description in the categories TABLE when there is an entire admin section that allows you to CREATE and EDIT categories where you can do this????

24 Apr 2013, 3:32 PM
#11
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

Because when I try to edit in the admin area in zencart, I am being limited on the length. Now I see that the length is limited in the database so would like to know how to make the max length in a column longer in the database.> DivaVocals:

ALL categories are stored in the CATEGORIES table.. (this includes SUB-categories)

The BIGGER question is WHY are you editing the category description in the categories TABLE when there is an entire admin section that allows you to CREATE and EDIT categories where you can do this????

24 Apr 2013, 3:35 PM
#12
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Location of subcategory files?

hflsales:

Because when I try to edit in the admin area in zencart, I am being limited on the length. Now I see that the length is limited in the database so would like to know how to make the max length in a column longer in the database.

The length of what exactly.. the description??, the category title?? Where are you being limited and what is average length of what you are attempting to put in this column/field??

24 Apr 2013, 4:09 PM
#13
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

Here is the page that is being limited on my site.....http://www.p3america.com/shop/index.php?main_page=index&cPath=38_104_105 When I try to add more, the page becomes garbled, the footer goes on top, and the tables get completely messed up. Thank you for your help. > DivaVocals:

The length of what exactly.. the description??, the category title?? Where are you being limited and what is average length of what you are attempting to put in this column/field??

24 Apr 2013, 4:26 PM
#14
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Location of subcategory files?

The table type for categories_description in your database is TEXT, as mysql says:

"A TEXT column can hold 64K (65,535 bytes) worth of data; LONGTEXT can hold 4GB (4,294,977,295 bytes). "

there is a MEDIUMTEXT (who's capacity I don't know but would be between the two), change this under the 'structure' tab for this table

24 Apr 2013, 4:47 PM
#15
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

Thank you so much!!! This fixed my problem!> simon1066:

The table type for categories_description in your database is TEXT, as mysql says:

"A TEXT column can hold 64K (65,535 bytes) worth of data; LONGTEXT can hold 4GB (4,294,977,295 bytes). "

there is a MEDIUMTEXT (who's capacity I don't know but would be between the two), change this under the 'structure' tab for this table

25 Apr 2013, 6:58 AM
#16
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Location of subcategory files?

No problem.

BTW, I couldn't help but notice, when viewing your page source code that you have an erroneous </head> tag and a non-closed <body ...> tag at the start of your category description.

25 Apr 2013, 9:47 AM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Location of subcategory files?

simon1066:

there is a MEDIUMTEXT (who's capacity I don't know but would be between the two)

~16Mb.

Note to OP.

Changing from TEXT to MEDIUMTEXT can increase your database requirements/usage by about 250 times.
Changing it to LONGTEXT can increase the requirement by about 65,000 times.

This may or may not cause performance issues.

If this were a field length that I needed to increase, I'd be inclined to use the VARCHAR field type, and define it to be a little over the maximum length that I think I'll ever need. 128K (double that of a 'standard' TEXT field) would probably suffice.

Now having said that, I can't help wondering what kind of product_descriptions you are using that exceeds the original 64k limit. Are you embeding graphics into your descriptions or something?

Cheers
Rod

25 Apr 2013, 10:46 AM
#18
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Location of subcategory files?

RodG:

Now having said that, I can't help wondering what kind of product_descriptions you are using that exceeds the original 64k limit. Are you embeding graphics into your descriptions or something?

It looked as though they were adding products to the categories description's html. i.e wanting to have products and sub-categories in the same category. As that wasn't part of the question I thought I would wait, perhaps until they attempted to activate the cart buttons that have been added to the description. Probably had a reason for it doing it so.

25 Apr 2013, 12:07 PM
#19
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Location of subcategory files?

simon1066:

I thought I would wait, perhaps until they attempted to activate the cart buttons that have been added to the description

That wasn't particularly helpful, apologies for that. If this is what you intend then I think you will have problems, better to list products within categories rather than try to code them into a categories description.

25 Apr 2013, 3:13 PM
#20
hflsales avatar

hflsales

New Zenner

Join Date:
Mar 2009
Posts:
88
Plugin Contributions:
0

Re: Location of subcategory files?

If I use VARCHAR field type, how do I define it to be 28k? I have never had to edit the database before & wouldn't want to screw anything up. There are a few graphics embedded in the html. That is probably why it is so long but it needs to be the way it is. The cart buttons will eventually point to the items product page. We just haven't gotten that far yet. > RodG:

~16Mb.

Note to OP.

Changing from TEXT to MEDIUMTEXT can increase your database requirements/usage by about 250 times.
Changing it to LONGTEXT can increase the requirement by about 65,000 times.

This may or may not cause performance issues.

If this were a field length that I needed to increase, I'd be inclined to use the VARCHAR field type, and define it to be a little over the maximum length that I think I'll ever need. 128K (double that of a 'standard' TEXT field) would probably suffice.

Now having said that, I can't help wondering what kind of product_descriptions you are using that exceeds the original 64k limit. Are you embeding graphics into your descriptions or something?

Cheers
Rod