Dirty Butter Posted June 23, 2015 Share Posted June 23, 2015 I tried UPDATE `CubeCart_inventory` SET description_short=seo_meta_description but it did not work.I use long detailed descriptions on our estates collectibles, but I already have a fairly short meta description. I would like to copy the meta description to the short description. I'll still want to do some editing to short, but it will be easier if I have a starting point with the meta description. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 23, 2015 Share Posted June 23, 2015 I am going to assume that in SQL, anything following an equals sign could be interpreted as a string literal. If that is plausible, then I would suggest a query where the column names are enclosed in backticks.UPDATE `CubeCart_inventory` SET `description_short` = `seo_meta_description`Knowing that you probably have dome something similar in the past, I would think the "limiter" flag is not enabled for this database engine. The limiter flag says, "Do not do anything that would affect every record in the table without a where clause." If this database engine limiter flag is enabled, then you must add: WHERE 1=1 to the query. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 23, 2015 Author Share Posted June 23, 2015 I had tried the back ticks, but not the WHERE 1=1. That worked beautifully and saved me a lot of copy pasting to get started with a proper short description! Thank YOU!! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Author Share Posted June 24, 2015 (edited) One of the uses I had hoped to put the description_short to was in the Google_Base feed, so I used description_short in the array in the admin.product.import.format.php hooks file of the module. BUT it does not work properly! $header_fields = array('id', 'product_type', 'google_product_category', 'link', 'title', 'description', 'image_link', 'price', 'condition', 'shipping_weight', 'upc', 'ean', 'jan', 'isbn', 'availability', 'brand', 'gtin', 'mpn', 'identifier_exists'); $fields = array('product_id', 'store_category', 'google_category', 'url', 'name', 'description_short', 'image', 'price', 'condition', 'product_weight', 'upc', 'ean', 'jan', 'isbn', 'availability', 'manufacturer', 'gtin', 'mpn', 'identifier_exists'); This gives a feed that looks correct in csv, but in Excel I can see that the <p>description_short</p> is NOT filling the correct column. The only thing in the correct column is <p>.id product_type google_product_category link title description image_link price condition shipping_weight upc ean jan isbn availability brand gtin mpn identifier_exists2 Advertising Home & Garden > Kitchen & Dining > Tableware > Drinkware > Mugs https://dirtybutterestates.com/1957-coca-cola-route-salesman-s-mug-mn.html 1957 COCA-COLA Route Salesman's MUG MN <p> Heavy white mug with a red band around the sides, depicting the salesman's red, white, and mustard gold 50's Chevy with the Coca-Cola trademark on the door panels.</p> https://dirtybutterestates.com/images/source/cokesalesmanmug042005xxx1.jpg 4.875 used 2.000 in stock Houston Harvest FALSEIs there some delimiter or such that I need to add to CC code to get this to work? It seemed so simple Edited June 24, 2015 by Dirty Butter added screenshot Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Author Share Posted June 24, 2015 AH!!! I answered my own question!! In the hooks file there is this line that needs to be changed to description_short $field_keys_to_wrap = array('description_short'); 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.