Bulk add specification attributes

3 months ago
Hello,
We have a store with over 13,000 products and 10,000 attributes and need to add a specification which can be filtered "Next Day Delivery" so customers can see which products they can order today for next day delivery.
So far easy, however, this needs to be done for certain brands (manufacturers)  and there are over 6,500 products covering 18 of the brands that meet this criteria.
Therefore, my question is, is it possible to assign a specification by a brand in bulk, for example, Brand A, all products are assigned to the specification, available the next day and can be filtered?
The only way I can do it now is one product at a time.
Any help is appreciated.


3 months ago
1. you can search products by the manufacturer
2. export products
3. add specifications
4. import again

//Rashed
3 months ago
Hi Rashed,
Thank you for this, I did have a look at doing this, however, I cannot see how you can add the specification to all the products at once other than inserting the two additional specification rows for each product one at a time which would take a long time also (even copying and pasting 6500 products).
The way I see it working is you would insert these additional two rows for every product;
AttributeType  SpecificationAttribute  CustomValue  SpecificationAttributeOptionId  AllowFiltering  ShowOnProductPage  DisplayOrder
0  15  Next Day Delivery  244  TRUE  FALSE  0
Am I correct or is there a quicker way of doing this in excel?
Many thanks,
James
3 months ago
if you want to add the same specification option for a huge number of products.
run it from SQL script is a better way. but it needs SQL knowledge.
From Excel, you need to add rows for each product as a child table
//Rashed
3 months ago
Hi James,

Currently there's no other way apart from what Rashed already suggested. May be you can ask your developer to do that for you since it is a very small job for any developer if you know what needs to be done exactly or you can do it yourself if you know how to write SQL queries otherwise the only option is to change the export / import settings from here yourstoreurl/Admin/Setting/Catalog to have less clumsy excel and perform an excel import after adding rows manually.

Best regards,
Atul
3 months ago
You can inquire if this plugin can do it:
https://selectsystems.com.au/bulk-edit-products
3 months ago
Hi Dennis,
This doesn't allow you to manage attributes mapping.

New York wrote:
You can inquire if this plugin can do it:
https://selectsystems.com.au/bulk-edit-products


Best regards,
Atul
3 months ago
Thank you all for the input, I will go down the SQL route.
Best regards,
James
3 months ago
Hi James,

To help with MS-SQL queries, please see below queries.

First make sure that the product(s) or product id's are returned properly as you needed using this query as an example:
SELECT P.[Id] FROM dbo.[Product] P JOIN dbo.[Product_Category_Mapping] PCM ON PCM.[ProductId] = P.[Id] JOIN dbo.[Category] C ON C.[Id] = PCM.[CategoryId] WHERE C.[Id] = 2;


In the above example, I have returned product id's for category id 2. You can change mappings as needed. Then incorporate above query in the insert query like below with the values as needed.
INSERT INTO dbo.[Product_SpecificationAttribute_Mapping] 
([CustomValue], [ProductId], [SpecificationAttributeOptionId], [AttributeTypeId], [AllowFiltering], [ShowOnProductPage], [DisplayOrder])
SELECT NULL, P.[Id], 1, 0, 1, 1, 1
FROM dbo.[Product] P JOIN dbo.[Product_Category_Mapping] PCM ON PCM.[ProductId] = P.[Id] JOIN dbo.[Category] C ON C.[Id] = PCM.[CategoryId] WHERE C.[Id] = 2;


Hope this will make your work easier :) Please vote answer if it helps!

Best regards,
Atul
3 months ago
Thank you, Atul, I will try this. Many thanks, James