logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Monday, November 9, 2020 10:27:22 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Currently when you upgrade Gold to v9, all shipping methods are lost. And all shipping gateways are gone.

The problem comes when you upgrade a live site with unshipped orders. You cannot ship an order that doesn't have a valid ship method assigned to it. The Ship button isn't available.

You have to re-add the ship gateway(s), re-add all of the ship methods and then recreate all of your warehouse/group assignments. That's no small task in a bigger store.

Then you have to update every open order to set the new ship method assignment. In a small store with 5 orders a day, that's not such a big deal. But what about the stores that do 50 orders a day? 200 orders a day? 600 orders a day?

You can't expect them to manually pull up every single order and manually re-assign a ship method so it can be processed. And I haven't even explored the consequences of external integrations like ShipStation or WorldShip. They surely aren't going to like shipments with missing ship methods assigned to them.

It's like the upgrade design just stops after it converts the data - it doesn't take into account specific store configuration. And that's a big problem with big stores.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

jeffr_ca  
#2 Posted : Monday, November 9, 2020 11:10:06 AM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi Joe,

Further on this, the shipping button does still exist showing the method originally spec'd in the order. However the shipping method in the order may not match up to methods that must be redefined when adding the carrier gateway back into the new version.

When the shipping notification goes out, the tracking number showing in the message doesn't link up to the carrier site.

To fix this, the admin side would need to re-specify the shipping method for each order as you've noted so that proper notification and tracking links are established.

-Jeff
mazhar  
#3 Posted : Wednesday, November 11, 2020 4:08:04 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Hi,

We are able to reproduce this issue, it seems to happen when application tires to automatically locate and install the plugins needed for any configured provider. A workaround could be to manually request the plugins to be installed before starting the upgrade. For example if you have USPS gateway configured in gold and upgrading to v9 then you can update your /App_Data/InstallPlugins.xml file to look like

Code:

<?xml version="1.0" encoding="utf-8"?>
<InstalledPlugins>
  <Plugin>
    <PluginName>USPS</PluginName>
    <InstalledOn>2020-11-11T09:53:01.074379Z</InstalledOn>
    <Pending>true</Pending>
  </Plugin>
</InstalledPlugins>


Make sure to make some change in your web.config like putting an extra blank line at the end to make sure application restarts when you proceed with upgrade. This is required because we want plugin framework to stage the USPS for install during upgrade. Once upgrade is complete, go to admin -> plugins and you will be seeing a dialog requesting confirmation about installing the USPS plugin. Go ahead and proceed with plugin install, after successful plugin install you should be able to see your gateway data upgraded from gold.

Quote:

You can't expect them to manually pull up every single order and manually re-assign a ship method so it can be processed. And I haven't even explored the consequences of external integrations like ShipStation or WorldShip. They surely aren't going to like shipments with missing ship methods assigned to them.


One way to fix the data could be to install the plugin, setup gateway and ship methods. We have the ship method name label stored with shipments so what we can do is to rescan the ship methods and try to link them back with order shipments using their names. For example you can try the following script to fix the broken link between ac_OrderShipments and ac_ShipMethods.

Please make sure to backup your database before trying this script!

Code:

DECLARE OrderShipments CURSOR
    FOR (SELECT OS.OrderShipmentId, OS.ShipMethodName FROM ac_OrderShipments AS OS 
	INNER JOIN ac_Orders AS O ON OS.OrderId = O.OrderId WHERE O.ShipmentStatusId = 1 AND OS.ShipMethodId IS NULL AND OS.ShipMethodName IS NOT NULL);

	OPEN OrderShipments;
	DECLARE @OrderShipmentId INT;
	DECLARE @ShipMethodName VARCHAR(255);
	FETCH NEXT FROM OrderShipments INTO @OrderShipmentId, @ShipMethodName;

	WHILE @@FETCH_STATUS = 0  
    BEGIN

		print 'Fixing order shipment id ' + CAST(@OrderShipmentId AS VARCHAR) + ', locating ship method with name "' + @ShipMethodName + '"';
		UPDATE ac_OrderShipments SET ShipMethodId = ( SELECT ShipMethodId FROM ac_ShipMethods WHERE Name = '' +@ShipMethodName + '' ) WHERE OrderShipmentId = @OrderShipmentId

        FETCH NEXT FROM OrderShipments INTO @OrderShipmentId, @ShipMethodName;
    END;

	CLOSE OrderShipments;
DEALLOCATE OrderShipments;




Regards

Edited by user Wednesday, November 11, 2020 4:58:17 AM(UTC)  | Reason: Not specified

Joe Payne2  
#4 Posted : Wednesday, November 11, 2020 7:09:25 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Thank you for documenting a detailed workaround, it will help greatly in future upgrades.

So this issue can be fixed in a future release?
mazhar  
#5 Posted : Wednesday, November 11, 2020 7:56:08 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Quote:
So this issue can be fixed in a future release?

Yes, we will be working on a fix. The changes will be needed in front-end codes in /Areas/Install/Controller/DefaultController.cs file. A code workaround could be to disable a part of code to make sure it doesn't clear any gateways. This will need you to install the required plugins one by one after upgrade.

You can edit the /Areas/Install/Controller/DefaultController.cs file and locate following line of code
Code:

foreach (string classId in invalidProviders)

and update it like this
Code:

invalidProviders.Clear();
foreach (string classId in invalidProviders)


Now compile the website project and attempt the upgrade.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.