Upgrade from 2.80 to 3.20 - Remove associated product name added in 3.10 upgrade script

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hello,

I am working on going from 2.80 to 3.20 and I badly need the upgrade script for 3.10 to not add the parent grouped product name to the simple products that are associated, for what were previously products with multiple variants.

Unmodified I have no issue executing the upgrade script 3.0 --> 3.10 --> 3.20

I know 3.10 Upgrade script does the above starting at line 4070:

--insert a product variant (now we name it an associated product)
      DECLARE @AssociatedProductName nvarchar(1000)
      SELECT @AssociatedProductName = [Name] FROM [Product] WHERE [Id]=@ProductId
      --append a product variant name
      IF (len(@Name) > 0)
      BEGIN
        SET @AssociatedProductName = @AssociatedProductName + ' ' + @Name
      END


If I remove "@AssociatedProductName + ' ' " from line 4076 like so:

--insert a product variant (now we name it an associated product)
      DECLARE @AssociatedProductName nvarchar(1000)
      SELECT @AssociatedProductName = [Name] FROM [Product] WHERE [Id]=@ProductId
      --append a product variant name
      IF (len(@Name) > 0)
      BEGIN
--modification to script here, remove parent grouped product name leave only old variant name
        SET @AssociatedProductName = @Name
      END


It works at removing the parent grouped product name, but I get a lot of the following errors:

Msg 8152, Level 16, State 13, Line 34
String or binary data would be truncated.
The statement has been terminated.


I would really appreciate if someone could help me figure out how to modify that line so that I don't get the errors, but am still able to remove the grouped parent product name. I can't realistically manually update the 25,000 parts we have in our database.

Or do I even need to be concerned about that error?

Thanks,

Shane
10 years ago
I figured out an alternative way to adjust it. Basically this is what I did:

1. Run my above adjusted script on a temporary database that I use just for the Product table. (because it causes errors, I believe due to seo slugs for products, not entirely sure)

2. Run the unmodified upgrade script for the production database.

3. Import the Product table from the temp database as Product_Update to the production database.

4. Run the below T-SQL to transfer the product names that I want from the temp Product_Update table for the production Product table.

USE production_db
UPDATE Product
SET Product.Name = Product_Update.Name
FROM Product
JOIN  Product_Update
ON Product.Id = Product_Update.Id
WHERE ((Product.Id=Product_Update.Id) AND (Product.SKU = Product_Update.SKU) AND (Product.ParentGroupedProductId > 0));
10 years ago
Hi,

I am having issue, upgrading from 2.8 to 3.2

So I updated the DB and ran the 3.00, 3.10 and 3.20 script without any errors.

Steps:
1. Remove all files from the previous version except App_Data\Settings.txt and App_Data\InstalledPlugins.txt
2. Upload new site files
3. Copy back App_Data\Settings.txt and App_Data\InstalledPlugins.txt files
4. I stored my pictures on the file system, So I copied back (\Content\Images\)

I am getting error Server Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.

What am I missing? Do I need to restart IIS or something else is missing. And one more thing I replaced my logo in the theme.
10 years ago
Hi,

I am having issue, upgrading from 2.8 to 3.2

So I updated the DB and ran the 3.00, 3.10 and 3.20 script without any errors.

Steps:
1. Remove all files from the previous version except App_Data\Settings.txt and App_Data\InstalledPlugins.txt
2. Upload new site files
3. Copy back App_Data\Settings.txt and App_Data\InstalledPlugins.txt files
4. I stored my pictures on the file system, So I copied back (\Content\Images\)

I am getting error Server Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.

What am I missing? Do I need to restart IIS or something else is missing. And one more thing I replaced my logo in the theme.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.