gottaloveit Posted December 22, 2003 Share Posted December 22, 2003 Forgive me if this has been talked about, but I could not find a solution, so I figured I would post it. I particularly did not want to worry about sending my data feed to Google / Froogle once a month, as they expire your listings monthly, unless you resend your feed. Also, per their feed requirements, and because my store is relatively small and simple, I needed to modify what Easy Contribute outputted. I decided to set up a CRON job that actually runs every 3 weeks, just to stay a little ahead of Google expiring my listings. The CRON calls a MySQL script that I wrote to export my products. A couple notes so I don't get too flamed B) The product line in our store does not change that often, so I did not incorporate limiting the export to ACTIVE products. If you have inactive products, you might need to change the script. Also, my category levels are only 2 deep, and the 2nd level would not make too much sense to Froogle. Again, if you have a different method for your categories and naming, you might need to change the script. Also, even though I got my feed approved / validated by Google, please make sure to go through the process to get it validated by Google for your store. mysql -uXXXX -pXXXXX -DXXXXX -e "select concat('http://YOUR_DOMAIN_GOES_HERE/product_info.php?products_id=',products.products_id) AS product_url, products_description.products_name AS name, products_description.products_description AS description, FORMAT(products.products_price,2) AS price, CONCAT('http://YOUR_DOMAIN_GOES_HERE/images/',products.products_image) AS image_url, categories_description.categories_name AS category FROM categories, products, products_description, categories_description, products_to_categories WHERE products.products_id=products_description.products_id AND products.products_id=products_to_categories.products_id AND products_to_categories.categories_id=categories.categories_id AND categories_description.categories_id=IF(categories.parent_id='0',categories.categories_id,categories.parent_id)" > /tmp/FILENAME_PER_GOOGLE_SPECS.txt; Once the script is performed, I have CRON FTP the file to Google. Now, I never have to worry about it :D domiosc, Infowaway, LiallyNix and 1 other 4 Quote GottaLoveIT PHP5 Fixes Cancelled Orders Faster Page Loads, Less DB Queries Enhanced Vendors Category Images / Folders Tree Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.