famaca Posted May 20, 2016 Share Posted May 20, 2016 Hi Jack, I have the same problem with brand. So I tried to find the code $row->brand and what I've found is: if(OPTIONS_ENABLED_BRAND == 1) $output .= "\t" . (isset($row->brand) ? strip_tags($row->brand) : (strlen(OPTIONS_BRAND) ? strip_tags($row->name) : "Not Supported")); And I don't know how to apply the code you say here. Could you tell me how to achieve it? Thank you Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 20, 2016 Share Posted May 20, 2016 My previous answer wasn't correct for the problem mentioned since @@TITO4 said the problem was the name and I focused on the brand. The following should work for fixing the name when used in the brand column. $output .= "\t" . (isset($row->brand) ? strip_tags($row->brand) : (strlen(OPTIONS_BRAND) ? htmlentities(strip_tags($row->name), ENT_COMPAT, 'UTF-8') : "Not Supported")); TITO4 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
TITO4 Posted May 23, 2016 Share Posted May 23, 2016 Many thanks, @@Jack_mcs !! Works perfectly! Regards Quote Shopowner, not coder, experienced copypaster :D Link to comment Share on other sites More sharing options...
nouveau9 Posted June 18, 2016 Share Posted June 18, 2016 Hello, first, thanks for this add-on very useful. I use the 3.5 version. But now Google wants, for color and size attributes, a new line product for each attribute... When I enable the OPTIONS_ENABLED_ATTRIBUTES, all the attributes are in the same line like this : Product....... color.................... size Shirt............black,white...........S,M,L,XL and Google wants : Product....... color.................... size Shirt............black......................S Shirt............black......................M Shirt............white......................M Shirt............white......................L etc... I use QTPro 4.6.1 too. It's a problem.... Regards. Quote Link to comment Share on other sites More sharing options...
yahalimu Posted June 22, 2016 Share Posted June 22, 2016 Hi, I've been using version 3 for a while, no problems, EXCEPT Specials didn't work for some treason, google complains about the price being wrong. I thought I upgrade to 3.5 to see if it fixed that but for some reason I am getting no products in the final file and no errors reported. I've gone over it with a fine tooth-comb to try find the error but to no avail. Can anyone tell me how to debug this problem? I have used all the same settings as in V3.0 which works fine. I am Osc ver 2.3.3 Setting part I have used is below, I have changed the FTP details etc.. Can anyone see an error or have any suggestions as to why no products are listed in the file? <?php// Title: Google Base Data Feeder// Version: 3.5 by Jack York (aka Jack_mcs) - www.oscommerce-solution.com// google feed requirements - http://www.google.com/support/merchants/bin/answer.py?hl=en&answer=188494chdir('../');include_once 'includes/application_top.php';$use_mysqli = false;if (function_exists('tep_get_version')) { $ver = tep_get_version(); if (isset($ver[4]) && $ver[4] > 1) { //only versions after 2.3.1 use mysqli $use_mysqli = true; }}$myfetch_mysql = ($use_mysqli ? mysqli_fetch_object : mysql_fetch_object); /*************** BEGIN MASTER SETTINGS ******************/define('SEO_ENABLED','true'); //Change to 'false' to disable if Ultimate SEO URLs is not installeddefine('FEEDNAME', 'xxx.txt'); //from your googlebase accountdefine('DOMAIN_NAME', 'www.justesting.co.uk'); //your correct domain name (don't include www unless it is used but do include the shops directory)define('FTP_USERNAME', 'username'); //created from within your googlebase accountdefine('FTP_PASSWORD', 'password'); //created from within your googlebase accountdefine('CONVERT_CURRENCY', '0'); //set to 0 to disable - only needed if a feed in a difference currecny is requireddefine('CURRENCY_TYPE', 'GBP'); //(eg. USD, EUR, GBP)define('DEFAULT_LANGUAGE_ID', $languages_id); //Change this to the id of your language if different than what is set as the default language in admindefine('QUOTES_CATEGORY_NAME',''); //if the Quotes contribution is installed, enter the name of the quotes category heredefine('SKIP_CATEGORY_ID', ''); //don't list any categories (or their products) listed here - separate each id by a commadefine('SKIP_PRODUCT_ID', ''); //don't list any products listed here - separate each id by a comma/*************** OPTIONS - IF ENABLED, ALSO SET THE SIMILAR OPTION FARTHER DOWN ******************/define('OPTIONS_ENABLED', 1);define('OPTIONS_ENABLED_AGE_GROUP', 0);define('OPTIONS_ENABLED_ATTRIBUTES', 0);define('OPTIONS_ENABLED_BRAND', 1); //if set, see options for this setting belowdefine('OPTIONS_ENABLED_CONDITION', 1);define('OPTIONS_ENABLED_CURRENCY', 0);define('OPTIONS_ENABLED_EXPIRATION', 1);define('OPTIONS_ENABLED_FEED_LANGUAGE', 0);define('OPTIONS_ENABLED_GTIN', 1); //if set, a database field named products_gtin must existdefine('OPTIONS_ENABLED_GOOGLE_PRODUCT_CATEGORY', 1); //http://www.google.com/support/merchants/bin/answer.py?answer=160081define('OPTIONS_ENABLED_GOOGLE_UTM', 0);define('OPTIONS_ENABLED_IDENTIFIER_EXISTS', 1); //set to 0 if required - https://support.google.com/merchants/answer/188494?hl=endefine('OPTIONS_ENABLED_ISBN', 0); //if set, a database field named products_isbn must existdefine('OPTIONS_ENABLED_LABEL', 1); define('OPTIONS_ENABLED_MADE_IN', 0);define('OPTIONS_ENABLED_MPN', 1); //if set, see options for this setting belowdefine('OPTIONS_ENABLED_PRODUCT_MODEL', 0); //displays the product modeldefine('OPTIONS_ENABLED_PRODUCT_TYPE', 1);define('OPTIONS_ENABLED_SHIPPING', 0);define('OPTIONS_ENABLED_INCLUDE_TAX', 2); //0 = no tax, 1 = uses google method, 2 = UK Vatdefine('OPTIONS_ENABLED_UPC', 0); //if set, a database field named products_upc must existdefine('OPTIONS_ENABLED_WEIGHT', 1);//some of the following only work if the matching option is enabled above.define('OPTIONS_AGE_GROUP', 'Adult'); //or Kidsdefine('OPTIONS_AVAILABILITY', 'quantity'); //in stock - Include this value if you are certain that it will ship (or be in-transit to the customer) in 3 business days or less. //available for order - Include this value if it will take 4 or more business days to ship it to the customer. //out of stock - You’re currently not accepting orders for this product. //preorder - You are taking orders for this product, but it’s not yet been released. //if empty (no entry), the data will be loaded from the database. A field in the products description table named products_availability is required //if "quantity," the field will be populated via the quantity: 0 or less = out of stock, greater than 0 = in stock //if "status," the field will be populated via the status field. in or out of stockdefine('OPTIONS_BRAND', 'manu'); //leave blank to load from the database field named products_brand, set to "name" to substitute the products name, manu to substitute the manufactueres name or model to substitute the products modeldefine('OPTIONS_CONDITION', 'new'); //possible entries are New, Refurbished, Used or blank, which loads from the database field named products_conditiondefine('OPTIONS_CURRENCY', 'GBP');define('OPTIONS_CURRENCY_THOUSANDS_POINT', ','); //this is the thousands point as in $1,000.define('OPTIONS_DATE_FORMAT', 'Y-m-d'); //change how the date is formatteddefine('OPTIONS_FEED_LANGUAGE', 'en');define('OPTIONS_GOOGLE_UTM', '?utm_source=GoogleBase1&utm_medium=BaseFeed1&utm_campaign=products'); //see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55578define('OPTIONS_GOOGLE_PRODUCT_CATEGORY', '4485'); //enter db to load from a database field named google_product_category enter or enter a specific google category - see taxomy - http://www.google.com/support/merchants/bin/answer.py?answer=160081define('OPTIONS_GOOGLE_PRODUCT_CATEGORY_DEFAULT', '4485'); //enter the google gategory to be used if the database entry is emptydefine('OPTIONS_GTIN', '');define('OPTIONS_ISBN', '');define('OPTIONS_LABEL', '');define('OPTIONS_MADE_IN', 'UK');define('OPTIONS_MPN', 'model'); //leave blank to load from the database field named products_mpn, set to "name" to substitute the products name, manu to substitute the manufactueres name or model to substitute the products modeldefine('OPTIONS_PRODUCT_TYPE', ''); //full means the full category path (i.e., hardware,printers), anything else, or blank, means just the products category (i.e., printers)//the following is for the shipping override option - enter multiple values separated by a comma//Format entries follow. A colon must be present for each field, whether it is entered or not.// COUNTRY - OPTIONAL - If country isn't included, we'll assume the shipping price applies to the target country of the item. If region isn't included, the shipping price will apply across the entire country.// REGION - OPTIONAL - blank for entire country, otherwise, us two-letter State (CA), full zip code (90210) or wildcard zip code (902*)// SERVICE - OPTIONAL - The service class or delivery speed, i.e. ground// PRICE - REQUIRED - Fixed shipping price (assumes the same currency as the price attribute)define('OPTIONS_SHIPPING_STRING', 'US:FL:Ground:7.00'); //says charge shipping to US for residents of Florida at 5% and don't apply tax to shippingdefine('OPTIONS_TAX_RATE' , '20.0'); //default = 0 (e.g. for 20.0% tax use "$taxRate = 20.0;") //only used in the next linedefine('OPTIONS_TAX_CALC', (OPTIONS_ENABLED_INCLUDE_TAX == 2 ? (OPTIONS_TAX_RATE/100) + 1 : '1')); //UK. US tax rate - US is ignorded since it is 1//the following is for the tax override option - enter multiple values separated by a comma//Format entries follow. A colon must be present for each field, whether it is entered or not.// COUNTRY - OPTIONAL - country the tax applies to - only US for now// REGION - OPTIONAL - blank for entire country, otherwise, us two-letter State (CA), full zip code (90210) or wildcard zip code (902*)// TAX - REQUIRED - default = 0 (e.g. for 5.76% tax use 5.76)// SHIPPING - OPTIONAL - do you charge tax on shipping - choices are y or ndefine('OPTIONS_TAX_STRING', 'US:FL:5.00:n'); //says charge tax to US for residents of Florida at 5% and don't apply tax to shippingdefine('OPTIONS_UPC', '');define('OPTIONS_WEIGHT_ACCEPTED_METHODS', 'kg'); //Valid units include lb, pound, oz, ounce, g, gram, kg, kilogram.//the following allow skipping certain itemsdefine('OPTIONS_IGNORE_PRODUCT_PRICE', 0); //0 = include products with price of 0 in output, 1 = ignore products with price of 0define('OPTIONS_IGNORE_PRODUCT_ZERO', 0); //0 = include products with qty of 0 in output, 1 = ignore products with qty of 0/*************** END MASTER SETTINGS ******************/?> Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 22, 2016 Share Posted June 22, 2016 @@nouveau9 The current version doesn't have the code necessary to do what you want. It can be changed to do that but it isn't a simple change. But be aware that if you change the code to do this, google wants the images to match. So if you sell a shirt that comes in blue or red, you will need two rows in the feed for them and the images would have to show the short in the proper color. That could be a lot of work, maybe not even possible for some shop owners, so you may want to consider that. I suppose you could just create a new copy of the image and rename it since that is probably how google will check it. Though they do have real people check sites so that may not work. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 22, 2016 Share Posted June 22, 2016 @@yahalimu The code may not be getting to your database. Try changing this line $myfetch_mysql = ($use_mysqli ? mysqli_fetch_object : mysql_fetch_object); to this $myfetch_mysql = mysqli_fetch_object; or this $myfetch_mysql = mysql_fetch_object; yahalimu 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted June 22, 2016 Share Posted June 22, 2016 Nice One, The second one did it, thanks. Will this version handle special prices? Just re-visiting it as now Google insist on 96% of my products having a GTIN, I knew it was coming, just crept up on me! Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2016 Share Posted June 23, 2016 It has the code for specials and gor GTIN, though the latter requires that filed to be present in your products table. If you don't have that, you will need to add it and populate it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 Hi, The GTIN code is all working fine. Not so the specials. Google complains about wrong prices still. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2016 Share Posted June 23, 2016 @@yahalimu It could be a number of things. For example, they may be saying that the feed as the special price but the shop is showing the full price or vice versa. You need to look at the feed to see if the price is correct and if it is the price shown on the page. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 (edited) Hi, Many thanks for the suggestion, I've tracked down the issue. One last thing, although as you can see in my previous post of the config i set ('OPTIONS_ENABLED_IDENTIFIER_EXISTS', 1), (TRUE I take it) Google complains that 'Product identifiers provided but 'IDENTIFIER_EXISTS' is set to false'. These items have no GTIN but do have MPN & Brand. . The output file has 'FALSE' in 'identifier exists' on most items, even if they have a brand and MPN but models with a GTIN just have a space there. Your thoughts? Edited June 23, 2016 by yahalimu Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2016 Share Posted June 23, 2016 The way I read googles page on this is that if the GTIN doesn't actually exist for a product, the identifies should be FALSE. If you are sure the product that is failing really doesn't have a valid GTIN, then maybe there is something wrong with the code. Read through that page to see if you see a mistake. They also provide ways you can use to check for GTIN's so that may help. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 (edited) Hi,That's interesting, the way I read this is that if no GTIN is recorded, or available, you must have MPN & Brand to form an identifier. The page suggests identifier exists should only be false for any product with neither a GTIN nor MPN. I have checked and the products complained about do NOT have a GTIN. In either case I can see from the code it checks the MPN field for an MPN, my MPN is filled from the model field as a fix because I did not record MPN. In my experience google has only demanded a GTIN if either MPN & brand is blank, or it can tell or thinks that from other customers feeds that a GTIN is available for that product. For example for all large value products with a brand recorded it will ask for a GTIN and also any products our competitors sell and also list on google shopping. Edited June 23, 2016 by yahalimu Quote Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 Sorry I'm getting confused. It is saying FALSE because MPN in enabled but the field is empty. (it doesn't exist) This will be true for all my products as MPN is filled from model.. My thoughts is it should say FALSE if either GTIN doesn't exist OR MPN & Brand is incomplete. I could be reading it wrong though. Quote Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 To quote from that page above: In the rare situation where your product has neither a GTIN nor MPN (for example, made-to-order or handmade items), set 'identifier exists' to 'FALSE' to indicate that you have no identifier for the product. It also states later there may not be a Brand so I think it just relies on those two being present.. I shall add a field to my db. and add to admin I suppose, already done it for GTIN numbers. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2016 Share Posted June 23, 2016 Brand, MPN and GTIN are unique identifies in google base. If you enable any of those options and don't have entries for them, the identifier column will have FALSE in it. if the values are just ones you've made up, then the identifier option should be off. Maybe try turning that off, or some of the unique identifier fields to see what happens. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted June 23, 2016 Share Posted June 23, 2016 MPN output is filled with 'model' by the 'define('OPTIONS_MPN', 'model');' statement. Yet the database field MPN is empty/doesn't exist so will always say 'FALSE' in the identifier column. No worries I shall just create the field and change that define back to '' Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 24, 2016 Share Posted June 24, 2016 You don't need to create that files. See the instructions next to the setting that will allow you to change it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
nouveau9 Posted June 26, 2016 Share Posted June 26, 2016 @@nouveau9 The current version doesn't have the code necessary to do what you want. It can be changed to do that but it isn't a simple change. But be aware that if you change the code to do this, google wants the images to match. So if you sell a shirt that comes in blue or red, you will need two rows in the feed for them and the images would have to show the short in the proper color. That could be a lot of work, maybe not even possible for some shop owners, so you may want to consider that. I suppose you could just create a new copy of the image and rename it since that is probably how google will check it. Though they do have real people check sites so that may not work. Thanks for your answer. The image is not a real problem I think : the image I use is a package of the product. I don't think that Google wants the real image with the real color of the product. If I use for each attribute the same image (the package) I dont' think that Google refuse it. I understand that change the program is not easy. The obligation for show the color and the size is the septembre 16. After, all the product will be refused. I think I'll modify your program like this (if I can) : I obtain the first attribute for the color and the first attribute for the size and exit, I'll insert in the row and finalize the product with only one combination of the attributes. So my product will appears on Google Shopping. But only one product with only one combination of the attribute. I you could indicate me the modification in your program for this result, it would be very useful. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 26, 2016 Share Posted June 26, 2016 (edited) Google states, somewhere, that if a color variant is used, the color shown in the image needs to match it. I don't recall if they say that is required or just a suggestion, though I suspect the former. You don't need a code change to have one line with the product attribute showing. There is a place in the code where you can list the attributes that you want to show. Change that to just color and size (whatever names you are using) and that is all that will show for that product. You can change this addon, any addon, in any way you like. Edited June 26, 2016 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. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
nouveau9 Posted June 26, 2016 Share Posted June 26, 2016 1) Google states, somewhere, that if a color variant is used, the color shown in the image needs to match it. I don't recall if they say that is required or just a suggestion, though I suspect the former. 2) You don't need a code change to have one line with the product attribute showing. There is a place in the code where you can list the attributes that you want to show. Change that to just color and size (whatever names you are using) and that is all that will show for that product. You can change this addon, any addon, in any way you like. For the 1) : Some companies have the same image for differents attribute actually in Google Shopping. I don't hink it's a real problem for me. For the 2) : I have changed this addon like you indicate, but with QtPro, when I select the two attributes Color and Size the results are like this when I have multiple combination of products : Product....... color.................... size Shirt X............black,white...........S,M,L,XL and Google wants one line by combination (not all the combinations on the same line) like this : Product....... color.................... size Shirt X............black......................S Shirt X............black......................M Shirt X............white......................L Shirt X............white......................XL etc.. A solution is modify the addon to have only one combination like this and jump to the next product: Product....... color.................... size Shirt X............black......................S Tight Y............black......................L etc... Google will accept this. The problem is : I show on Google Shopping only one combination. This may be down enough to bring the customer ... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 27, 2016 Share Posted June 27, 2016 The code can't do that as it is written. You would have to change it to work as you need. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mikepo Posted August 6, 2016 Share Posted August 6, 2016 @@Jack_mcs, google is changing the required mimimum image size from 35x35 to 100x100. My image size is 100x80, which is stored as a URL in table products. This addon uses that URL. Can this addon be modified to use the first large image, which is stored in table products_images? thanks Mike Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
Mikepo Posted August 16, 2016 Share Posted August 16, 2016 @@Jack_mcs, the issue with image size is solved, I managed to code a solution. My larger image files have a 'L' added to the filename, so that is just want I did, added 'L' to the image URL. Simple when I thought about ! Mike Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) 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.