Hi David,
I just recently purchased the script, and I'm working on getting it to do what I have in mind.
I would like to index more fields (apart from Product Name, Product Description, Image URL, Buy URL and Price), and followed the instructions here, but I didn't manage to make it work.
I have added the new tables to the database, but I get lost after that. The lines and script mentioned in that thread does not correspond fully to the script I have, and I get errors all the time.
Could you please help me with that? I spent a whole evening trying to figure it out. I would like to add a Country and City fields, as I need to perform a hotel search.
Another question: Does the forum not have a "search" function?
Many thanks,
Charlie.
Million thanks, it looks much easier now!
I´ll give it a try and let you know. It's no problem to re-install from the distribution, and the time spent was useful to get used to the script anyway.
Thanks for the quick answer, really appreciate it.
Hi again,
It worked like a charm, so easy this way.
Just a thing: In Registration Step 2 I get 3 "notices", it still works, but I guess they shouldn't be there at all.
- Under 'Merchant name' or use field.. I get the following notice: Notice: Undefined index: merchant in \admin\feeds_register_step2.php on line 133
- Under the new created 'country' field: Notice: Undefined index: country in \admin\feeds_register_step2.php on line 133
- Under the new created 'city' field: Notice: Undefined index: city in \admin\feeds_register_step2.php on line 133
Any idea as to why?
Thanks again, just had the script for one day, but I find it extremely useful.
Hi,
Thanks for pointing that out - it is only happening because of the maximum warning level configured in your PHP installation; I will fix it in the distribution but the modification is straight forward. On line 133 you will find...
if (is_array($config_commonFields[$name]))
...simply REPLACE with;
if (isset($config_commonFields[$name]))
if (is_array($config_commonFields[$name]))
(no semi-colon on the end of the first line as the entire second IF statement needs to be conditional upon it)
Cheers,
David.
Yes, that solved it!
Thanks David, you're a star.
Regards,
Charlie
Hi David, it would be great if you could include this isset line in the next distribution.
The default security settings on my WAMP install (on Windows 7 Ultimate) seems to display lots of these kind of errors.
Slow Import page:
Notice: Undefined index: feedname.csv in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Notice: Undefined index: feedname2.xml in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Notice: Undefined index: feedname3.csv in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Notice: Undefined index: feedname4.csv in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Notice: Undefined index: feedname5.xml in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Notice: Undefined index: x in Z:\wamp\www\pt\admin\feeds_import_slow.php on line xxx
Also had similar to the above poster on the 'register feeds step 2' page
the isset modification fixed the problem in that case
What would I need to add to the feed_import_slow.php page to remove those errors?
the line in question seems to be:
if ((substr($filename,0,1) <> ".") && ($feeds[$filename]["format"]))
Hi Jim,
Sorry about that - I try hard to make sure there are no undefined variable warnings but this one slipped through. To fix this instance, REPLACE the line that you identified with:
if ((substr($filename,0,1) <> ".") && (isset($feeds[$filename])))
Cheers,
David.
--
PriceTapestry.com
no need to apologise :) thanks a million that fixed it
Hi david, i am trying to add some fields and i followed your "new" instructions changed the config.advanced.php and created the dbmod.php script.. the extra fields were created successfully ..but after submiting the form in registretion step2 the products aren't registered.. when i try to register with the original config.advanced.php the products are registering successfully.. what am i doing wrong..i need some help please.. thank you..
Hello konpapdo,
Enable database debug mode by changing line 6 in config.advanced.php to:
$config_databaseDebugMode = TRUE;
...and then try the register / import process again. The debug information should indicate what is wrong - if you are not sure, let me know what is displayed...
Thanks,
David.
--
PriceTapestry.com
hey, david
after registering/importing the following are displayed:
[INSERT INTO `pt_feeds` SET filename='webgainsproducts.xml', registered='1300096504', format='xml|PRODUCTS/PRODUCT/', merchant='', field_merchant='PRODUCT', field_name='PRODUCT_NAME',field_description='DESCRIPTION',field_image_url='IMAGE_URL',field_buy_url='DEEPLINK',field_price='PRICE',field_category='MERCHANT_CATEGORY',field_brand='',field_tmp='', user_category='', user_brand='' ][Unknown column 'field_tmp' in 'field list']
Warning: Cannot modify header information - headers already sent by (output started at /home/motion/public_html/price/includes/database.php:55) in /home/motion/public_html/price/admin/feeds_register_step2.php on line 75
Hi konpodo,
That implies that you previously added a new field to your site "tmp", but the current database
doesn't have field_tmp in the feeds table. Create a file called dbmod.php containing the
following:
<?php
require("includes/common.php");
$sql = "ALTER TABLE `".$config_databaseTablePrefix."feeds`
ADD `field_tmp` VARCHAR(255) NOT NULL";
database_queryModify($sql,$result);
$sql = "ALTER TABLE `".$config_databaseTablePrefix."products`
ADD `tmp` VARCHAR(255) NOT NULL";
database_queryModify($sql,$result);
print "Done.";
?>
Upload to your main Price Tapestry installation folder and browse to dbmod.php once, then
delete the file.
Don't forget to disable database debug mode by setting $config_databaseDebugMode back to
FALSE at line 6 in config.advanced.php as intentional errors can be
generated during import as part of the duplicate prevention process...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Hi Charlie,
Welcome to the forum!
I'm really sorry for any wasted time - the thread you mentioned described an earlier method for adding fields relating to the previous distribution of Price Tapestry. Instructions for the new version - it's much easier now, can be found here...
I hope you don't have any problems undoing the changes you made in relation to the old thread; don't hesitate to email me any files you get stuck with of course; although if these are the first changes you've made you can always re-install from the distribution. Your database changes won't have been a waste of time as they are the same - field_xxxx in the `feeds` table and xxxx in the `products` table.
The forum is well indexed by Google - you'll find a site search form here...
http://www.pricetapestry.com/forum/
Cheers,
David.