You are here:  » 2nd installation on same domain - some questions

Support Forum



2nd installation on same domain - some questions

Submitted by npaitken on Wed, 2010-01-20 11:24 in

Hi David,

I want to expand a site to include a new section using a 2nd installation of PT. As the categroies, brands and layout requirements are different from the existing installation, I think it's the way to go for me. Existing install and new install are / will be in subfolders of my site. Something like:

mysite.com/shopping/ (existing)
mysite.com/travel/ (new install)

As well as doing the new install I'm also thinking about implementing some mods to both installs (dynamic category mapping, brandFilter, etc) as per forum threads I've read about here. And, I'd also like to get a couple of the NEW FEATURES from the latest PT distribution.

Further to this, the existing install is heavily modified and has a custom theme. I'd like to use this custom theme again on the new install too, albeit with a slighty modified layout.

So, is it best to get the existing install modified and bang up to date first?

And, when I create the 2nd installation should I use original PT files (clean, unmodified, i.e. originals from you) to create the install, or can I copy existing install files (modified and custom themed) over and use them? I'll be creating a new database for the 2nd install.

Hope that makes sense.

Thanks,
Neil

Submitted by support on Wed, 2010-01-20 11:38

Hi Neil,

I'd go with the first option - get the existing installation up to date and patched up with any new features you want, and then simply copy everything (except feeds of course) to your new installation folder(s), change database settings in config.php, run setup.php again and away you go.

There is one slight caveat to this, which is whether any modifications you have made have included database changes; in which case setup.sql would no longer be valid. If you have done, it's straight forward to make a new setup.sql using the Export feature of phpMyAdmin (export "structure" only in .sql format) - but let me know if you need any help with that if necessary.

Regarding the mods, dynamic category and product mapping is a straight forward patch to includes/admin.php so if you want to send me that file i'll make the changes for you.. and if you let me know in your email which other features from the new distribution you'd like i'll let you know which files I'll require...

Cheers,
David.

Submitted by npaitken on Wed, 2010-01-20 13:21

Hi David,

Thanks for the reply and confirmation of best approach. Regarding the caveat with respect to database changes, I have made a small change to the user review fields. I'll use the Export feature in phpMyAdmin as you suggest - cross that bridge later right?

If it's possible David I'd like to do the following upgrades.

Mods:

- Dynamic Category Mapping

New Features in 11/09A Version:

- Keyword based Category Mapping
- Keyword based Product Mapping
- Database Tool (Backup and Restore)
- Password protection for admin directory
- Strip HTML filter (description field no longer cleansed by default)
- Minimum (minPrice) and maximum (maxPrice) URL parameters supported by search.php

The only thing I'm not entirely sure about is the Dynamic & Keyword (new) mapping features. Can they both be implemented together? Is it the same thing? If not, my preference would be to have control of Category and Product in the backend rather than in the code.

Do you need additional files to includes/admin.php

Thanks,
Neil

Submitted by support on Wed, 2010-01-20 13:31

Hi Neil,

Dynamic Category Mapping is about looking for keywords in the product name and assigning a specified category if any are found; whereas the keyword based category mapping is an enhancement to the existing category mapping functionality whereby you don't need to specify an exact match for a mapping to be applied. If you still think you require the former it is a code based mod at the moment but I can look at an /admin/ interface to it for you...

In terms of the new features, files required are:

search.php
includes/admin.php
includes/filter.php
admin/admin_menu.php

Regarding the new setup.sql; yes do an .sql export of structure only; and email the file to me so that I can double the check the format with regards to how the setup script applies the table prefix...

Cheers,
David.

Submitted by npaitken on Wed, 2010-01-20 16:14

Hi David,

Thanks very much for the patch, much appreciated.

Just a couple of questions about the USAGE of
- Keyword based Category Mapping
- Keyword based Product Mapping

I got the following description from this post

These mods remove the need to provide every single alternative category / product name; when, for example, a single keyword (such as a product model number) is sufficient to link identical products.

Slightly worried now as I have a lot of existing product mapping for many products! Presumably if I try to import a feed now, with the old product mapping left in place, the new mapping logic will be applied to those long full title product descriptions and it could be very messy!

Typlical existing mapping example looks like:

Adidas Tour 360 4.0 Golf Shoes

MAPPING
Adidas Tour 360 40 Mens Golf Shoes BlackBlackMetallic Silver
Adidas Tour 360 40 Mens Golf Shoes Running WhiteBlackMetallic Silver
adidas Golf Shoe Tour 360 40 Black
adidas Golf Shoe Tour 360 40 White
Adidas TOUR360 40 White Golf Shoe

How will this existing mapping be treated with NEW Keyword based Product Mapping?

Thanks,
Neil

Submitted by support on Wed, 2010-01-20 16:17

Hi Neil,

With the "dynamic" versions of category and product mapping you can precede an alternative with = to specify an exact match - sorry, I should have mentioned this.

If you have more mappings and alternatives than is practical to do this manually, let me know and I'll create a script to modify all alternatives as approporiate.

(or the modification can easily be "undone" of course if you want to look at other options)

Cheers,
David.

Submitted by npaitken on Wed, 2010-01-20 16:32

Hi David,

Yes, just weighing things up. Going forward it'll be good to have the dynamic feature I think. But yes, looking back the way, I do have have more mappings and alternatives than is practical to do this manually.

Do you have a full list of modifiers to use with dynamic mapping? For example:
word
word anotherword
=exact full title looks like this
-ignore this

If you can explain the usage a bit more David that would be very helpful. With the =fix in place would the performance be same as before?

Thanks,
Neil

Submitted by support on Wed, 2010-01-20 16:52

Hi Neil,

"=" is the only operator supported by the distribution version of dynamic category and product mapping, so for any alternative line not beginning with "=", if all the individual words are present (in any order) then the mapping is applied. Performance would be little (if any) different to before as the exact matches are checked first before iterating through the other alternatives.

I'll put together an update script for you - in the mean time, are you in a position to make a back-up of the `categories` and `productsmap` tables? You could use the same Export procedure described above; but this time select only the categories and productsmap tables, and select both structure AND data to export...

Cheers,
David.

Submitted by npaitken on Wed, 2010-01-20 16:58

Hi David,
I did a full database backup already! Look forward to receiving the add "=" script.
Many thanks again,
Neil

Submitted by support on Wed, 2010-01-20 17:07

Hi Neil,

I just tested this, a couple of SQL statements does the trick (use the SQL tab in phpMyAdmin)...

UPDATE `categories` SET alternates = CONCAT('=',REPLACE(alternates,'\n','\n='));

...and

UPDATE `productsmap` SET alternates = CONCAT('=',REPLACE(alternates,'\n','\n='));

Cheers,
David.

Submitted by npaitken on Thu, 2010-01-21 11:59

Hi David,

Just to let you know the SQL statements worked perfectly on my database too.

Many thanks,
Neil

Submitted by npaitken on Mon, 2010-01-25 22:12

Hi David,

I'm experiencing something a bit unusual with search.php now!

After implementing the changes in this thread, I also added the brandFilter mod in this thread http://www.pricetapestry.com/node/212.

I then added some new category mapping using "=" exact category names, before re-importing 12 of the 13 feeds. Didn't import the 13th feed as I didn't think it would be affected by the changes.

Anyway, when I do a search now, it looks like all I can see in the search results is the products from the 13th feed that hasn't been re-imported since the changes.

The product mapping and category mapping all seems to be ok when I check. That is, if I navigate straight to a product that's mapped or a category that's mapped I can view ALL 13/13 feeds products. Also, the brandFilter mod seems to be working ok too.

I was beginning to think there was a problem with the modified search.php file you gave me but since it appears to be returning results ok for the feed that I didn't re-import I'm not so sure now.

Any thoughts on why search isn't working properly?

Thanks,
Neil

Submitted by support on Tue, 2010-01-26 10:16

Hi Neil,

Can you confirm that the 13th feed that you didn't re-import was 0800sports?

Cheers,
David.

Submitted by npaitken on Tue, 2010-01-26 10:17

Hi David,
Yes, that's correct.
Neil

Submitted by support on Tue, 2010-01-26 10:28

Hi Neil,

Could you possibly email me a link to your /admin/ area and any username / password required and I'll take a further look...

Cheers,
David.