Support Forums

Categories and Step1

This is a discussion on Categories and Step1 within the Technical Support forums, part of the Technical Support Forums category; Background: We have been operating a classified site for Oxfordshire (UK) for the last couple of months. Main category Oxfordshire ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-14-2009, 11:03 AM   #1
Member
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 45
Rep Power: 3
mark is on a distinguished road
Default Categories and Step1

Background:
We have been operating a classified site for Oxfordshire (UK) for the last couple of months. Main category Oxfordshire has about 150 sub categories. Now we are trying to get other counties/states loaded up as new main categories.
Using CPanel->phpMyAdmin and a bit of data manipulation, I have managed to load up all 150 sub categories into the next county (Berkshire) in one go. This will now work for uploading all counties.

All works fine and if anyone is interested I can explain how this is done.

Problem:
With 150 categories and more than one county, the category dropdown in Step1 of checkout is totally unusable due the quantity of sub categories. We have downloaded and installed the Category Tree Module from Larry Hotch but a little worried about the response times for this many categories, especially when we branch out into other counties.

In the Step1.tpl code, I can re-code just to get main categories into dropdown using cat.parent_id=0.
Is it possible to have 1st dropdown with main categories and depending on which main category is chosen then to get the sub categories just for that main category (cat.id) into a second dropdown.
I am thinking it would be using 'getcats' but I cannot see where I would use the ID of the main category as the criterea.

As always, any help is appreciated

Cheers

Mark

v4 Developer

Last edited by mark; 09-14-2009 at 11:12 AM.
mark is offline  
Old 09-14-2009, 11:34 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,932
Rep Power: 47
seymourjames has a spectacular aura about
Default

You are not going to like this answer but if you have this many geographies then using categories to hold them is not the way forward. You have your data structure the wrong way round. What you should do is have your categories describing the items. the advanced search then pulls up the geography (in your case by county) as people add in adverts from a geography or you could use the listings filter if you use templatecodes to filter on a country.
__________________
TemplateCodes.com for 68 Classifieds - Magento for Online Stores
seymourjames is offline  
Old 09-14-2009, 11:42 AM   #3
Member
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 45
Rep Power: 3
mark is on a distinguished road
Default

Hi James

Understand what you are saying, but we are keeping counties separate as the basis of the site is a local claasifieds and local information pages (when I get the time to develop).
Maffo had it summed up when he wrote an article about locations being locations and categories being categories. But the coding he did for this became obselete in the later 68 classifieds versions.

Still, as long as the SQL Db can take the large number of cats, is there any reason why this would not work?

Mark
mark is offline  
Old 09-14-2009, 11:48 AM   #4
Coder
 
Join Date: Mar 2006
Posts: 4,813
Rep Power: 118
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by mark
With 150 categories and more than one county, the category dropdown in Step1 of checkout is totally unusable due the quantity of sub categories. We have downloaded and installed the Category Tree Module from Larry Hotch but a little worried about the response times for this many categories, especially when we branch out into other counties.

response time is based on the number of categories of course and regardless if its html dropdown like the default cat chooser or my mod, the more cats the more data that has to get pulled from the database and sent to the browser.

For the cat tree mod, the category details are converted to xml (which by and large is very fast) but then, the xml cat data is handed over to javascript which runs on the clients PC and it parses the xml and creates the category tree. So in this regard the added overhead of processing the category list all falls on the client PC, slower PC will take longer to render the tree than faster ones.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-14-2009, 12:13 PM   #5
Member
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 45
Rep Power: 3
mark is on a distinguished road
Default

Hi Larry

Hope I wasn't discrediting the Cat Tree Mod, just still exploring all possibilities.

If the search criterea defined the parent category then the return data would always be a maximum of 150 cats whether in XML or other. I am guessing that the Cat Tree Mod returns the whole category list as XML and then parses for main and sub cats from there. If we were to extend to all UK counties (about 85) this would make 150 x 85 - which would make for an even larger XML download. My old laptop struggled with just the two counties.

I really like the Cat Tree Mod, just a bit worried about speed and user experience.

Mark
mark is offline  
Old 09-14-2009, 01:01 PM   #6
Coder
 
Join Date: Mar 2006
Posts: 4,813
Rep Power: 118
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by mark
My old laptop struggled with just the two counties.
The xml data that gets downloaded is only slightly more data than the html used to build the dropdown in the default template so its not the amount of data in terms of downloading its how much data the client PC has to process.

The default template just sends the categories as html dowpdown so the client doesnt have to do anything but display it. For the cat tree, the client actually has to build the display from javascript code which runs client side and why an "Old" pc will have a much slower response time.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-14-2009, 01:15 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,932
Rep Power: 47
seymourjames has a spectacular aura about
Default

If that is the case, why not filter by county and go through a browse process. Another solution is to make your counties an extrafield. That way it only drops down when you have selected a category in an advanced search. From a visitors point of view, does he really care if the item for sale is in one county or the one next door. He is more focussed on the item surely. If he lives in Luton (Beds) - LOL and he is looking for a motorbike then he is not going to worry if the bike he wants is for sale in Hitchin (Herts). In fact he will prefer it to the identical bike for sale in Sandy (Beds) which is a lot further away. Do you see my point. The seller and the buyer in most situations does not care about the geography unless it is a block to a transaction taking place. The only time I would say you have a good case for making categories into geographical locations is where you are really focussed on searching by geography. Something immovable like houses..
__________________
TemplateCodes.com for 68 Classifieds - Magento for Online Stores
seymourjames is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are we able to charge certain categories and keep other categories free? Success Technical Support 5 04-02-2008 05:49 PM
Static Categories and Sub-categories list Tim_A Technical Support 0 06-08-2007 09:41 AM


All times are GMT -4. The time now is 07:11 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0