Hi David
I want to have my datafeeds on and controlled by one site and all my sites accessing that. Each site then has Price Tapestry installed with the config.php pointing to the central datafeed.
Would it then be possible to add individual filters and a clickref for each site?
TIA
Jill
Hi Jill.
Sure - a number of users have setup similar; basically each "slave" installation requires its own `filters` and `products` tables. It's a bit of a search and replace operation i'm afraid but your text editor should have a Replace All search and replace function that you can use so shouldn't take too long.
First add a new database config variable to config.php on each slave site containing the database name for that slave site; which should be accessable using the same MySQL username and password as the master installation (for which all the other database configuration variables will point to), for example:
$config_databaseSlaveName = "slave1";
For the `filters` table:
Search:
`".$config_databaseTablePrefix."filters`
Replace:
".$config_databaseSlaveName.".`".$config_databaseTablePrefix."filters`
in:
admin/feeds_filters.php
admin/feeds_filters_configure.php
admin/feeds_filters_delete.php
includes/admin.php
For the `products` table
Search:
`".$config_databaseTablePrefix."products`
Replace:
".$config_databaseSlaveName.".`".$config_databaseTablePrefix."products`
in
brands.php
categories.php
merchants.php
search.php
products.php
sitemap.php
admin/feeds_import_slow.php
admin/finder.php
includes/admin.php
scripts/import.php
An alternative to separate database for each slave would be a separate slave table prefix, in which case create a new config variable as follows, for example:
$config_databaseSlaveTablePrefix = "slave1_";
And then as an alternative search and replace (for the filters table) it would be:
Search:
`".$config_databaseTablePrefix."filters`
Replace:
`".$config_databaseSlaveTablePrefix."filters`
and for the `products` table:
Search:
`".$config_databaseTablePrefix."products`
Replace:
`".$config_databaseSlaveTablePrefix."products`
In either case, before changing the config to point to the slave you would need to make the master database variables be the slave settings whilst running setup (to create the tables - even though most of them won't be used but don't worry about that) and then after running setup.php change the slave variable as required...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com