You are here:  » Subcategories Revisted

Support Forum



Subcategories Revisted

Submitted by cascadeclimbers on Tue, 2010-04-13 07:01 in

Hi David,

I bought pricetapestry longer ago then I'd like to admit, mainly because only now I'm getting around to implementing it. I've spent considerable time reading this forum over the last couple months and the level of support you provide being incredible would be a gross understatement.

I'm looking at implementing a rather large site covering lots of different outdoor sports categories. Trying to figure out how to organize such a site has required a lot of thought. The last couple days I believe I've stumbled across the answer and I want to get your opinion before I put the pedal to the medal and start implementing this.

One of the largest problem for large sites that I've read is how to map your categories. Additionally how to use subcategories effectively. It seem the solution to subcategories has been to use different pricetapestry installations for each category, with the caveat being that you cannot search across the entire site. This last fact was a big hurdle for me to wrap my brain around.

A lot of my affiliate feeds are coming from US based AvantLink which has the best affiliate tools I've dealt with. They allow you to pick and choose what you want in your feed, either by department, category, etc. From doing this I discovered that I could potentially create a feed for each department, map the categories by 'subcategory' or 'product group', and I would have a lot of subcategories for each "category feed". It seems in a previous thread you have said that there is a mod for each merchant having multiple feeds.

Ok, so now you have a bunch of sub categories, where do you go from there. My first idea was just to create a static page where I manually entered in all the sub-categories under master categories, but I quickly realized this could become somewhat of a nightmare. Then the idea came of mapping the subcategories to categories using an array, enabling you to dynamically generate not only the category page, but allow you to create a breadcrumb as well for each product page. This would best recreate the feel of a product catalog and allow for easier management.

Now, the first problem I encountered in this idea is not all affiliate feeds are as great as avantlinks with the ability to split feeds, and that would mean for implementing the above I would have to create a script that would take a feed and essentially split it into separate feeds for each category, and then import those. Yes it's a lot of work but I think it's worth the end result of having a easily searchable site with lot of control of subcategory naming and mapping.

So, in summary this is what I'm thinking. 1) Create a script that can split feeds into multiple feeds based on category. 2) Modify PT to allow sub-category mapping to master categories with breadcrumbs and all.

What do you think?

Cheers, Jon

Submitted by support on Tue, 2010-04-13 07:41

Hello Jon,

There is actually a neat solution to searching cross-category which I can help you to set-up. It involves create a search form and drop-down box containing each top level category, plus an "All" option. When the form is submitted, if a category is selected, the form simply re-directs to /category/search.php to perform the usual search within that category; but if "All" is selected, the script sequentially does a result count query into each sub-directory installation and displays a list of each category with the number or results in brackets; the category name of course actually being a link to the results in that category.

If you want to give this approach a go; the best thing to do is to get started on your installation with a couple of category installation, then email me the installation URL and take a look and let you know which files I'll need to create to the multi-search box html for you.

Remember that you can use a common /feeds/ directory with the latest version of Price Tapestry, so if your layout was something like

/Camping/
/Clothing/

etc., you could also have at your top level

/feeds/

And then in config.advanced.php of each of your installations, instead of:

$config_feedDirectory = "../feeds/";

...you could use:

$config_feedDirectory = "../../feeds/";

...which means only one group of feeds to ultimately automate, and the appropriate categories can be imported from each using Drop Record If Not (RegExp) filter on the category field, using the format:

(Category 1|Category 2|Category 3|etc. etc.|)

Cheers,
David.

Submitted by cascadeclimbers on Tue, 2010-04-13 21:07

Thanks David,

I'll email you in a couple days when I have this setup. I appreciate the help.

Has anyone implemented or is there a current solution for what I suggested in creating split up feeds based on category or department?

Cheers, Jon
----------
$> cd /pub
$> more beer

Submitted by cascadeclimbers on Wed, 2010-04-14 06:20

Sorry rereading this I'm realizing it's not necessary to split feeds.

Cheers, Jon

$> cd /pub
$> more beer

Submitted by mtc123 on Mon, 2010-05-10 09:06

Hi David,

Do you have a general script for this cross-categories/subcategories search with a drop-down category box for us to try? My site is not up for real production yet and I want to try this off line using http://localhost/categories.... Is there a way for me to try on this test site?

I do have the same problem importing large feeds like Jon had earlier. How do I use the DELETE and TRUNCATE features as you have mentioned above? Right now, it may take me more than 20 hours just to import a feed of 800K records on my Celeron CPU with 1GB ram.

Many thanks,

Submitted by support on Mon, 2010-05-10 09:11

Hi,

If you'd like to email me the following files from your installation:

includes/admin.php
scripts/import.php
html/searchform.php
search.php

...i'll add the category drop-down to your search form for you, and incorporate the import to temporary table modification so that there is no down-time for your site when using import.php @ALL (from the command line)...

Cheers,
David.

Submitted by mtc123 on Mon, 2010-05-10 11:32

Thank your for your great support David!
I have just emailed you the required files.

Thanks,

Submitted by mtc123 on Wed, 2010-05-12 06:01

Hi David,

The files that you fixed for me work greatly. I can see the speed for querying improved a lot. I used to be very frustrated when querying. I still once in a while receive the time out exceed 60 second message when querying from ALL Categories, especially, on 3-letters words, but not as often as before. I think I messed up files between different installations of PT somewhere. Query speed is very fast now.

I will keep an eye on how you and other members do on "Query Speed (Fulltext + Group By) on Very large Database.

Thanks for your help and supports for the last few days.