How to add Magento 1 meta description programmatically. I have to add all product meta description in my Magento 1 store.
-
I found a solution here for add meta description in CSM page. Check here: magento.stackexchange.com/questions/75139/…– Pankaj SharmaCommented Aug 24, 2018 at 7:58
-
how to create csv for this?– user68853Commented Aug 24, 2018 at 8:01
-
first column would be page title and add your meta data in second column.– Pankaj SharmaCommented Aug 24, 2018 at 8:08
-
that is for cms page meta. He wants to change product meta.– jscarCommented Aug 24, 2018 at 8:12
-
okay jscar, Let me check if I can do anything for you.– Pankaj SharmaCommented Aug 24, 2018 at 8:21
1 Answer
Export products (System>Import/Export) and that gives you the csv structure. You can delete all columns but keep sku, store and meta description. Put the data you want into the csv. Save it as UTF-8 (don't use MS excel!) and import (System>Import/Export) replacing existing data. Make sure you try this on a dev site first and use the 'check data' function to make sure everything is correct before importing. Good luck.
Edited: I realise this isn't doing it programmatically but you really don't need to write any code for this. Magento import handles it OK.
-
is there any other option which i directly add meta description directly through programming? Commented Aug 24, 2018 at 8:17
-
of course, you could write something to get the data from a data source, load a product collection, filter the sku and loop through to get the relevant meta description values but you'll have to create the data source and in that case why not do it through magento import? Is there any reason you need to do it programmatically?– jscarCommented Aug 24, 2018 at 8:21