Orionsbelter Posted October 17, 2011 Share Posted October 17, 2011 i have found a free script that allows me to create an xml data feed file for googles products search however i don't know how to build the function getProducts to get the product info from my table can anyone help? // Gets the array of product data, replace this with the correct function for your CMS... $products = $productClass->getProducts('subcategory,category,name'); // Now loop through each product foreach ($products as $key => $value) { // Check Stock level and set the required stock msg, again replace this with the correct function for your CMS... $stockMsg = 'in stock'; // Swap your category names for the relevent Google Taxonomy Term detailed in their documentation if ($value['subcategory'] == '19') { $googleCategory = '> Billiard Balls'; } else if ($value['subcategory'] == '20') { Quote Link to comment Share on other sites More sharing options...
xyph Posted October 17, 2011 Share Posted October 17, 2011 This is a PHP help forum, not a 'code for me' forum. Quote Link to comment Share on other sites More sharing options...
requinix Posted October 17, 2011 Share Posted October 17, 2011 This is a PHP help forum, not a 'code for me' forum. Pikachu moved it here from Coding Help. Quote Link to comment Share on other sites More sharing options...
xyph Posted October 17, 2011 Share Posted October 17, 2011 Pikachu moved it here from Coding Help. Yes, I replied to it while it was in Coding Help. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 17, 2011 Share Posted October 17, 2011 It's code that was found online, so this would be the more appropriate location. I would have moved it to the "please write free code for me" forum, but that doesn't exist. Quote Link to comment Share on other sites More sharing options...
xyph Posted October 18, 2011 Share Posted October 18, 2011 I don't know about that... PHP Coding Help feels like it at times [/offtopic] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.