Jack_mcs Posted December 16, 2009 Share Posted December 16, 2009 (edited) You would need to add database entries in the products table. Then add code to the admin/categories.php file to be able to set those new fields. Then the googlefeeder file has to be edited. The line you mentioned is just the option. Farther down in the code is the sql statement for loading in the data. That is where you have to setup the new fields that were added. It's not a very difficult job for someone with experience. Someone without experience in making such changes can do it, but it would require a lot more effort. There is a contribution named products extra fields, or something like that, that makes it so you can add such fields easily. It may not be completely compatible with Easy Populate though. I think that was being worked on but don't know the status. And you would still have to manually change the googlefeeder code. Edited December 16, 2009 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 16, 2009 Share Posted December 16, 2009 (edited) Hi Jack, I've only taken one database class. But it was years ago. I found new_field_everywhere contribution, I wonder if that will help. I'll also try those others you suggested, Thank you, Jason EDIT --- I think I'm going with that "Product Extra Fields" you mentioned. I don't use "easy populate" so that's no big deal to me. Thanks again, Jason Edited December 16, 2009 by rustyclockwork Quote Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 16, 2009 Share Posted December 16, 2009 The Products Extra Fields is referring to a section of code that Header Tags SEO is inside. So can I do this? /*** Begin Header Tags SEO ***/ if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); /*** End Header Tags SEO ***/ // BOF Extra Fields Contribution $products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']); while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) { $extra_field[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value']; } $extra_field_array=array('extra_field'=>$extra_field); $pInfo->objectInfo($extra_field_array); // EOF Extra Fields Contribution $pInfo->objectInfo($product); } elseif (tep_not_null($HTTP_POST_VARS)) { $pInfo->objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } Thanks for any ideas, Jason Quote Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 16, 2009 Share Posted December 16, 2009 Got everything working fine... I think. All that's left is to make the google feeder work with the new field Jason Quote Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 16, 2009 Share Posted December 16, 2009 (edited) Ok, so I have to have the google feeder sql code changed a little bit so that it will request products_extra_fields This is what the google feeder looks like as it is: $sql = " SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url, products_model AS prodModel, manufacturers.manufacturers_name AS mfgName, manufacturers.manufacturers_id, products.products_id AS id, products_description.products_name AS name, products_description.products_description AS description, products.products_quantity AS quantity, products.products_status AS prodStatus, products.products_weight AS prodWeight, FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price, CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url, products_to_categories.categories_id AS prodCatID, categories.parent_id AS catParentID, categories_description.categories_name AS catName FROM (categories, categories_description, products, products_description, products_to_categories) left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id ) left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date is NULL) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) ) 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.categories_id=categories_description.categories_id ORDER BY products.products_id ASC "; $catInfo = " SELECT categories.categories_id AS curCatID, categories.parent_id AS parentCatID, categories_description.categories_name AS catName FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id "; The database table entry that "extra product fields" created is called products_extra_fields and the field which I want google feeder to get is called product_extra_fields_name and the value it is given by me in admin was "Condition" Can someone steer me in the right direction for making the Google Feeder see a particular product that has the extra field for Condition and have it pull out "Used" or "New" (as written in admin)? Thanks, Jason Edited December 16, 2009 by rustyclockwork Quote Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 16, 2009 Share Posted December 16, 2009 Would this be the way to go about it? SELECT products_extra_fields.products_extra_fields_name Where define('OPTIONS_CONDITION, 'New'); //possible entries are New, Refurbished, Used The part 'New' might be to be replaced with a variable correct? Quote Link to comment Share on other sites More sharing options...
rustyclockwork Posted December 17, 2009 Share Posted December 17, 2009 (edited) The reason why the "condition" attribute is so important on this contribution is because Google is making the "condition" attribute a requirement. Google blog For shops like mine, where there are new, used and even some refurbished (restored) items available, making this step automated is pretty important. I plan on making a write-up for the contribution so that others can benefit. Jason Edited December 17, 2009 by rustyclockwork Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 17, 2009 Share Posted December 17, 2009 The condition field has been required for some time now. But this contribution can't assume everyone will have a field for it in the database, or even what that field would be named, so it isn't something that can be added without overly complicating the code for those shops that don't need each product marked. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 18, 2009 Share Posted December 18, 2009 Maybe this has been discussed before, but I had to make a couple of changes to my code in order to get it working for me correctly. Maybe I just misinterpreted the options settings. First, my shop is fully ssl secured. Not just the cart but all of it. So I added the option and conditional statement to set the URLs to https:// if the option is set to true. maybe you can consider that in a future release. And second, the option asked for domain name and not catalog root url so I entered just the domain name. The result was that all of the links were wrong in that none of them had the path correct. the /catalog/ was not included. But, I did not know, and still do not, if Google needs that domain name or if it is there just to build the URL in the script. Can you clarify that Jack? Excellent job again. Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 18, 2009 Share Posted December 18, 2009 First, my shop is fully ssl secured. Not just the cart but all of it. So I added the option and conditional statement to set the URLs to https:// if the option is set to true. maybe you can consider that in a future release. It's a mistake to use ssl for the whole shop so I wouldn't add that as an option to the contribution. And second, the option asked for domain name and not catalog root url so I entered just the domain name. The result was that all of the links were wrong in that none of them had the path correct. the /catalog/ was not included. But, I did not know, and still do not, if Google needs that domain name or if it is there just to build the URL in the script. Can you clarify that Jack? Google needs the domain name. The url should contain your shops location. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 18, 2009 Share Posted December 18, 2009 It's a mistake to use ssl for the whole shop so I wouldn't add that as an option to the contribution. Interested in your opinion as to why... Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 18, 2009 Share Posted December 18, 2009 It's been discussed many times on these forums and isn't a topic for this thread. You can search the forums and find the various threads. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
sunrise99 Posted December 24, 2009 Share Posted December 24, 2009 Hi Jack: Seems Google change something. This module can't work now. All upload have error "Disapproved" Would you please help to give some advise asap? Thanks & Best Regards, Sunrise Quote Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 Hi Jack: Seems Google change something. This module can't work now. All upload have error "Disapproved" Would you please help to give some advise asap? Thanks & Best Regards, Sunrise I uploaded earlier this morning. it works fine. There are a number of reasons your products could be marked as Disapproved, one being the quantity is zero. Copy the first three lines of your feed file and paste them here and lets have a look at it. Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
sunrise99 Posted December 24, 2009 Share Posted December 24, 2009 I uploaded earlier this morning. it works fine. There are a number of reasons your products could be marked as Disapproved, one being the quantity is zero. Copy the first three lines of your feed file and paste them here and lets have a look at it. Many thanks! Please help to check. link title description expiration_date price image_link label id condition http://www.hkfashionmall.com/christian-audigier-hats-p-895.html Christian Audigier hats Size:S.M.L 2010-01-22 39.00 http://www.hkfashionmall.com/images/10699_1_small.jpg Christian Audigier, Hats 895 New http://www.hkfashionmall.com/christian-audigier-p-896.html Christian Audigier Hat size Unique Color Assorted 2010-01-22 38.00 http://www.hkfashionmall.com/images/10648_small.jpg Christian Audigier, Hats 896 New http://www.hkfashionmall.com/christian-audigier-p-897.html Christian Audigier Hat size Unique Color Assorted 2010-01-22 38.00 http://www.hkfashionmall.com/images/10647_small.jpg Christian Audigier, Hats 897 New http://www.hkfashionmall.com/christian-audigier-p-898.html Christian Audigier Hat size Unique Color Assorted 2010-01-22 38.00 http://www.hkfashionmall.com/images/10646_small.jpg Christian Audigier, Hats 898 New Merry X' mas!! Best Regards, Quote Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 Nothing there jumps out at me... is it the entire feed that is disapproved or the individual items? Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 (edited) Jack, I enabled the Manufacture_ID option and it failed to work, but found that the conditional below when building the string used Manufacturer_id. Is that a known coding error? Changing it by adding the missing 'r' fixed it right up. Edited December 24, 2009 by mdtaylorlrim Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
sunrise99 Posted December 24, 2009 Share Posted December 24, 2009 Nothing there jumps out at me... is it the entire feed that is disapproved or the individual items? entire feed that is disapproved Quote Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 I had a feed once that I could not determine why it had been disapproved. On one of my attempts to fix it I set the expiration date one day less than in the code. This line, $feed_exp_date = date('Y-m-d', time() + 2592000 ); I changed to, $feed_exp_date = date('Y-m-d', time() + 2505600 ); It seemed to fix it although I still do not know why. It could have been something that has to do with my servers time zone, or an incorrect time on my server. You might try this, no guarantees, and it probably wont have any affect. Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 24, 2009 Share Posted December 24, 2009 link title description expiration_date price image_link label id condition The label column heading is no longer accepted. You should upgrade to the latest version and try again. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 24, 2009 Share Posted December 24, 2009 Jack, I enabled the Manufacture_ID option and it failed to work, but found that the conditional below when building the string used Manufacturer_id. Is that a known coding error? Changing it by adding the missing 'r' fixed it right up. Yes, that is a mistake. Good catch. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 Jack, is there a contribution of Google Feeder that works with the Specials contribution, so that when you put some items on special you can feed just those items to Google so that google Shopping reflects your specials prices? If not, interested in creating one? Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 24, 2009 Share Posted December 24, 2009 This contribution reads in the specials price already. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted December 24, 2009 Share Posted December 24, 2009 This contribution reads in the specials price already. I guess I didn't make it clear.... If I have 1000 products uploaded to Google already, good for 30 days, and I put 10 of them on special, I don't want to upload the entire 1000 articles. Just the 10 I put on sale. I guess it doesn't hurt to do the 1000 again... Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 25, 2009 Share Posted December 25, 2009 Yes, it would be wasted effort to add an option, or create a new script, just for that. You have to upload a new feed anyway so doing it a week or two sooner won't hurt anything. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons 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.