1

I am working on one Magento Commerce store and want to change name of 45000+ products via single import. There are too many products on website with all CAPITAL product name.

This is creating big issue in Google merchant center data feed. So, I would like to make it proper via CSV import. I have compiled one CSV file which contain Product ID & Product Name with require format.

But, I am not able to import entire CSV file in Magento commerce Admin panel via Import / Export section. It shows me Time Out warning.

So, I have to split one CSV to multiple CSV files and continue this task. This is really frustrating to me. So, How do I change name of 45000+ products via single import?

1

Product name attribute value is stored in 'catalog_product_entity_varchar' table and you can update product names via query:

UPDATE `catalog_product_entity_varchar`
SET `value` = CONCAT(
    UCASE(LEFT(`value`, 1)),
    SUBSTRING(`value`, 2)
)
WHERE
    attribute_id =(
        SELECT
            attribute_id
        FROM
            eav_attribute
        WHERE
            attribute_code = 'name'
        AND entity_type_id =(
            SELECT
                entity_type_id
            FROM
                eav_entity_type
            WHERE
                entity_type_code = 'catalog_product'
        )
    )

After this query you should do indexation on "product flat data": admin->System->Index Management and click "Reindex Data" link on row "Product Flat Data".

  • 1
    2 Subselects ? , use 2 join instead – dweeves May 29 '13 at 13:15
  • @dweeves in that case subselect is more performance-able than the join. – mageUz May 29 '13 at 14:45
  • it should not, as there should be indexes on each join field.However eav_entity_type & eav_attribute tables being small tables, maybe the join is a bit less performant.But here, 3 full selects instead a single with joins, my guess is JOIN should win – dweeves May 29 '13 at 14:56
  • Everybody can write this solution more compact and with one line, but at this point I assumed an answer to be more understandable and simple. I agree with you – mageUz May 29 '13 at 15:14
1

This is not an answer to your question but it might be a solution to your problem.
If you want to transform the names of products from PRODUCT NAME to Product name you can do it with an sql update statement and not get tangled up in the Magento import process.
First you need to find the id of the name attribute.

select b.attribute_id, b.attribute_code from eav_entity_type a 
LEFT JOIN eav_attribute b 
    ON a.entity_type_id = b.entity_type_id 
    AND a.entity_type_code = 'catalog_product' 
WHERE b.attribute_code = 'name'

In my case it was 71. Then run this query that updates the names.

UPDATE `catalog_product_entity_varchar` 
    SET `value` = CONCAT(UPPER(SUBSTRING(`value`, 1, 1)), LOWER(SUBSTRING(`value` FROM 2)))
WHERE attribute_id = 71

Replace 71 with the id you get from the first query. Make sure you do a backup first.
Like I said, this only transforms titles from PRODUCT NAME to Product name. If you have brand names in the product name and want to keep them 'ucfirst' (PRODUCT NAME => Product Name) then ignore my answer.

  • Hi Marius, Thanks for your valuable reply! I am going to try on my website. If I will find out any issue on it so I will let you know about it. – Anand Mistry May 29 '13 at 8:22
1

Use Magmi , it is conceived to achieve such things (and many more).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.