Hi,
I am getting errors with GTIN in Google Merchant. It sems that CS-Cart is adding the product ID to any black GTIN in the datafeeds, can this be stopped?
I am not using cs-carts google base feed I created my own.
Posted 07 August 2017 - 07:35 PM #1
Hi,
I am getting errors with GTIN in Google Merchant. It sems that CS-Cart is adding the product ID to any black GTIN in the datafeeds, can this be stopped?
I am not using cs-carts google base feed I created my own.
Posted 08 August 2017 - 06:42 AM #2
Your question is not quite clear. Why you cannot remove corresponding field from the fields map?
Posted 08 August 2017 - 10:46 AM #3
I have created a datafeed on 2 sites with cs-cart 4.5.2.
Both datafeeds are created from scratch.
When I specify GTIN in the product not all have GTIN code in them so some are left blank. When the datafeed is uploaded cs-cart seems to add product code field data to the blank GTIN fields. This causes errors with Google Shopping as the product code are not invalid GTIN codes.
Posted 08 August 2017 - 05:46 PM #4
If you have a custom generated feed, why don't you just check if GTIN is same as product ID and if it is, set the field to an empty string?
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 09 August 2017 - 10:19 AM #5
The GTIN field is blank in the product - confirmed.
CS-cart is adding the product id to the GTIN field in the daatfeed upload.
Posted 09 August 2017 - 05:55 PM #6
The GTIN field is blank in the product - confirmed.
CS-cart is adding the product id to the GTIN field in the daatfeed upload.
Got that. My point was that if you're doing your own custom export as stated in OP, then why not just manage the field youself by comparing its value to the product_id and if they're the same replacing it with an empty string (if that's what you want).
I believe (but not certain) that you will have to identify those products to Big-G as custom products not having a verifiable GTIN (UPC).
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 13 April 2018 - 08:39 AM #7
im having the same issue. You can flag a product that has no GTIN or MPN as false. However cs cart sends the productcode we use internally as a GTIN so the product is flagged as not valid by Google.
Im not sure how to fix this in the feed. I would like to turn it off totally.
is that possible?
Posted 13 April 2018 - 08:43 AM #8
Yes, I found a solution to the problem - I uninstalled CS-Cart and rebuilt with it WooCommerce.
Posted 13 April 2018 - 08:48 AM #9
Yes, I found a solution to the problem - I uninstalled CS-Cart and rebuilt with it WooCommerce.
hahahaa
Posted 13 April 2018 - 09:36 AM #10
Honestly, I found getting things fixed in CS took to long as opposed to my the newer software where fixes are availble on averge in a matter of days. I hope you find a solution cos the only thing CS told was it was working as designed, very helpful.
Posted 13 April 2018 - 09:45 AM #11
Your question is not quite clear. Why you cannot remove corresponding field from the fields map?
You cannot remove the field product code from the field map. Even if you remove it, or send a blank variable it remains there.
Posted 13 April 2018 - 11:22 AM #12
In /app/addons/google_export/func.php, edit the db_field to what you want or comment it out.
Array ( 'position' => 0, 'export_field_name' => 'gtin', 'field' => 'GTIN', 'avail' => 'Y', 'db_field' => 'product_code' ),
Posted 13 April 2018 - 12:43 PM #13
In /app/addons/google_export/func.php, edit the db_field to what you want or comment it out.
Array ( 'position' => 0, 'export_field_name' => 'gtin', 'field' => 'GTIN', 'avail' => 'Y', 'db_field' => 'product_code' ),Thanks, ill give that a try!
Posted 13 April 2018 - 01:52 PM #14
In /app/addons/google_export/func.php, edit the db_field to what you want or comment it out.
Array ( 'position' => 0, 'export_field_name' => 'gtin', 'field' => 'GTIN', 'avail' => 'Y', 'db_field' => 'product_code' ),Works! Thank you!
Posted 13 April 2018 - 07:09 PM #15
Note that there has been a hook requested to resolve this issue (http://forum.cs-cart...ndpost&p=298801) but no response from cs-cart.
It makes sense for making thing simple for many people, but it throws sand it the gears for others. It should be an option to pre-load GTIN from another field.
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 13 April 2018 - 07:12 PM #16
You cannot remove the field product code from the field map. Even if you remove it, or send a blank variable it remains there.
Commenting out the line should make the GTIN field empty by default on new Google data feeds.
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 17 April 2018 - 08:30 AM #17
In /app/addons/google_export/func.php, edit the db_field to what you want or comment it out.
Array ( 'position' => 0, 'export_field_name' => 'gtin', 'field' => 'GTIN', 'avail' => 'Y', 'db_field' => 'product_code' ),Works! Thank you!
I checked it again. But i was wrong. It still sends the productcode as GTIN if the GTIN field is left empty or flagged as false. I spotted this line:
if (!empty($data_product['product_code'])) { if (!empty($d_product[$lang_code]['GTIN'])) { $combination['GTIN'] = $data_product['product_code']; } elseif (!empty($feature_fields['GTIN']) && !empty($d_product[$lang_code][$feature_fields['GTIN']])) { $combination[$feature_fields['GTIN']] = $data_product['product_code']; } }
Im removing this to see what happens.
Posted 17 April 2018 - 08:38 AM #18
Commenting out the line should make the GTIN field empty by default on new Google data feeds.
So i need to create a new feed for this to work? Im sorry, i have not tried that.
Posted 17 April 2018 - 09:54 AM #19
i think i found it: in app/addons/data_feeds/func.php. Edit out this line.
// if ($field == 'GTIN' && empty($variants)) { // $variants[] = db_get_field( // 'SELECT product_code FROM ?:products WHERE product_id = ?i', // $product_id // ); // }
Posted 17 August 2019 - 09:02 AM #20
I did the above to data_feeds/func.php and it didn't seem to do anything, but then commented out the google export bit and think it's done it for me?
if (!empty($data_product['product_code'])) { if (!empty($d_product[$lang_code]['GTIN'])) { //$combination['GTIN'] = $data_product['product_code']; } elseif (!empty($feature_fields['GTIN']) && !empty($d_product[$lang_code][$feature_fields['GTIN']])) { //$combination[$feature_fields['GTIN']] = $data_product['product_code']; } }