Bulk update Product Attribute Control Type ID in SQL DB

один месяц назад
Hi,

Hope somebody could help me, I'm in the middle of upgrading my nopCommerce store from v4.2 to v4.6 and I would like to chnage the Attribute Control type for my products from a dropdown list to radio buttons, have over 200 proucts in the DB is there an easy way to run a script against the DB to chnage the value for all my products with ID 1?



Many thanks as always, this community is great

Nick
один месяц назад
These are values of AttributeControlTypeId
    public enum AttributeControlType
        DropdownList = 1,
       RadioList = 2,
...

So in SQL that would be
UPDATE [Product_ProductAttribute_Mapping]
SET [AttributeControlTypeId] = 2
WHERE [AttributeControlTypeId] = 1


(But backup the table first ;)
SELECT *
INTO x_backup_Product_ProductAttribute_Mapping
FROM Product_ProductAttribute_Mapping
один месяц назад
Many thanks, that worked great, thankyou