I just purchased PT this week and have been working on imnplementing it into my site tonight. Thanks for such a great product. It is going to do exactly what I was looking for, as soon as I can get it running correctly.
When I registered and imported my first feed the Price search worked fine but now that I have modified a few of the php files, if I click on a product link to go to the price page, I get the following error:
Price: $ from
Warning: Invalid argument supplied for foreach() in /usr/local/www/virtual2/66/175/9/109/html/www2/shopping/html/product.php on line 26
I looked in product.php, but I am a total novice at PHP (this is my learning experience) and can't readily see anything wrong. I hadn't even touched product.php at the time that the error started occuring.
Any help would be greatly appreciated - the temp location while I am setting this up on my site is:
http://www.forcecollectors.com/www2/shopping/ Just drill down to any product and you will see the error.
Thanks,
Rich
Hi David,
Your suggestions fixed it right away. Thanks for the super fast service!
Rich
Hi Rich,
The problem won't actually be in html/product.php, that is just where it manifests itself because of how the script works. They way i've designed the script, information for display is loaded into global variables within the main scripts (the files in the root directory), and then displayed by the files in the html/ directory.
What this means therefore, is that in changing the files in the main directory, you will have overwritten the variable used to display the prices; which is why the "invalid argument" error is displayed.
It is most likely that the variable $product has been either overwritten or corrupted by your changes in the main main product script products.php. Check through this script for any changes you might have made that could have affected this variable, and if necessary adjust your code to use different names. Remember that the variable must remain intact until at least the call to require("html/product.php"); - and ideally thereafter as well.
If you're not able to find where it is becoming overwritten, feel free to email me your modified products.php (assuming that this is one of the files you have changed) and I'll check it over for you. Reply to your reg code or forum registration email is the easiest way to get me!
Hope this helps,
Cheers,
David.