arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Migrate Umbraco Commerce Checkout

Detailed steps on how to migrate the Checkout package from Vendr to Umbraco Commerce.

Throughout the following steps, we will migrate the Checkout package from Vendr to Umbraco Commerce.

  1. Make a backup of any custom templates and Vendr UI configuration files.

  2. Make a note of all configuration values on the Vendr.Checkout Checkout node.

  3. Delete Vendr.Checkout generated checkout nodes.

    • Checkout

      • Customer Information

  4. Delete all Vendr.Checkout generated Document Types.

    • [Vendr Checkout] Page

      • [Vendr Checkout] Checkout Page

  5. Delete all Vendr.Checkout generated Data Types.

    • [Vendr Checkout] Step Picker

    • [Vendr Checkout] Theme Color Picker

  6. Uninstall the Vendr.Checkout Nuget package:

  1. Delete any remaining files and folders in the ~/App_Plugins/VendrCheckout directory.

  2. Install the Umbraco.Commerce.Checkout package:

  1. Locate the Umbraco Commerce Checkout dashboard in the Settings section

  2. Click the "Install" button to reinstall the Checkout components in the previous location.

  3. Copy any custom configuration files back into the solution.

Shipping Method
  • Payment Method

  • Review Order

  • Process Payment

  • Order Confirmation

  • [Vendr Checkout] Checkout Step Page

    Copy any custom Views into the ~/Views/UmbracoCommerceCheckout/ folder.
    dotnet remove package Vendr.Checkout
    dotnet add package Umbraco.Commerce.Checkout

    Migrate custom Payment Providers

    Follow the steps outlined below to migrate your custom payment providers to Umbraco Commerce.

    Throughout the following steps, we will migrate custom payment providers used for Umbraco Commerce into Umbraco Commerce.

    1. Remove any installed Umbraco Commerce packages

    dotnet remove package Umbraco.Commerce.Core
    1. Install the Umbraco.Commerce packages for the payment providers.

    dotnet add package Umbraco.Commerce.Core
    1. Update any namespace references.

    2. Update project framework to net7.0.

    The final step in the migration is to update all abstract async methods exposed by the base class. It needs to be updated to accept an additional CancellationToken cancellationToken = default parameter as the final method argument. Your Integrated Development Environment (IDE) should provide feedback on all the methods that have been updated.

    Migrate from Vendr to Umbraco Commerce

    Learn how to migrate a Vendr solution to Umbraco Commerce.

    This guide provides a step-by-step approach to migrating a default Vendr solution to Umbraco Commerce.

    circle-exclamation

    Upgrade to the latest version of Vendr before continuing with the migration.

    You can upgrade your installation by installation the latest versionarrow-up-right on top of the existing one.

    You can find details on migrating the Checkout package as well as custom Payment Providers in the of this article.

    hashtag
    Key changes

    Before outlining the exact steps, there are a few key changes to be aware of.

    These changes will dictate the steps to take in the process of migrating to Umbraco Commerce.

    hashtag
    Project, Package, and Namespace changes

    Vendr
    Umbraco Commerce
    chevron-rightC# Class changeshashtag
    • Namespace changes as documented above.

    • All classes containing the Vendr keyword are now updated to UmbracoCommerce.

    chevron-rightJavaScript changeshashtag
    • All vendr modules have changed to umbraco.commerce modules.

    • All vendr

    chevron-rightUI Changeshashtag
    • All static UI assets are served via a Razor Compiled Library (RCL) and are no longer found in the App_Plugins folder.

    • The folder within App_Plugins still exists for the static assets that are user configurable.

    hashtag
    Step 1: Replace dependencies

    In this first step, we will be replacing all existing Vendr dependencies with Umbraco Commerce dependencies.

    1. Remove any installed Vendr packages (including Payment Providers):

    1. Take a backup of any Vendr-specific templates and config files you will want to reuse:

    2. Delete the Vendr App_Plugins folder:

    1. Install Umbraco.Commerce:

    1. Install Umbraco Commerce packages including any payment providers previously removed.

    2. Reapply any backed-up config files in their new App_Plugins location.

    3. Move any backed-up templates into the ~/Views/UmbracoCommerce/Templates/ folder.

    hashtag
    Step 2: Update namespaces and entity names

    Based on the outlined above update all Vendr references to the new Umbraco Commerce alternatives. Ensure you update any Views/Partials that also reference these.

    hashtag
    Step 3: Update the database

    In this step, we will cover updating the database for Umbraco Commerce.

    1. Backup your database

    2. Rename database tables using the following query:

    1. Swap Vendr property editors for Umbraco Commerce property editors:

    1. Swap the Vendr variants editor for the Umbraco Commerce variants editor in the block list data entry:

    1. Swap Vendr price/amount adjustments to Umbraco Commerce price/amount adjustments:

    1. Update template paths:

    1. Update the migrations log:

    1. Update the activity logs:

    hashtag
    Step 4: Finalizing the migration

    1. Delete any obj/bin folders in your projects to ensure a clean build.

    2. Recompile all projects and ensure all dependencies are restored correctly

    3. Delete the existing Vendr license files in the umbraco\Licenses folder.

    1. Update any payment gateways that use a global webhook:

    1. Run the project.

    It is highly recommended to ensure everything works as expected, before moving on to migrating packages and custom payment providers.

    hashtag
    Further Migrations

    If you have been using the Vendr Checkout package, you will need to follow some additional steps to migrate this package to Umbraco Commerce. Follow the link below for a complete guide:

    Any custom payment providers used with Vendr also need to be migrated to Umbraco Commerce. Follow the link below to find detailed steps on how to perform this migration:

    hashtag
    Common Issues

    hashtag
    DB Migration Issue Due to Column Constraints

    Some users have reported issues running the Umbraco Commerce migrations resuling in an error along the lines of:

    The issue generally revolves around the default constraints not having the expected name. To resolve this you should identify the table and the problematic constraint and manually drop the constraint:

    This will remove the constraint allowing the migrations to run which should re-add the constraints with the correct name.

    Vendr.Umbraco

    Umbraco.Commerce.Cms

    Vendr.Umbraco.Web

    Umbraco.Commerce.Cms.Web

    Vendr.Web

    Umbraco.Commerce.Web

    Vendr.Web.UI

    Umbraco.Commerce.Web.StaticAssets

    Vendr.Umbraco.Startup

    Umbraco.Commerce.Cms.Startup

    Vendr

    Umbraco.Commerce

  • Examples: IVendrApi is now IUmbracoCommerceApi and AddVendr() is now AddUmbracoCommerce().

  • prefixed directives, services, and resources are now prefixed with
    uc
    .
  • All vendr prefixed events now follow this format: Umbraco.Commerce.{target}.{action}.

  • The folder with App_Plugins has been renamed from Vendr to UmbracoCommerce.

  • UI Config files have changed from .js files to .json.

  • Rename any config files with a .json file extension rather than the previous .js.

  • Compile your project against .NET 7.0.

  • Add your new Umbraco.Commerce license key to the appSettings.json file:

    Vendr.Common

    Umbraco.Commerce.Common

    Vendr.Core

    Umbraco.Commerce.Core

    Vendr.Infrastructure

    Umbraco.Commerce.Infrastructure

    Vendr.Persistence

    Umbraco.Commerce.Persistence

    Vendr.Persistence.Sqlite

    Umbraco.Commerce.Persistence.Sqlite

    Vendr.Persistence.SqlServer

    Umbraco.Commerce.Persistence.SqlServer

    Further Migrations section
    Key Changes
    Migrate Umbraco Commerce Checkoutchevron-right
    Migrate custom Payment Providerschevron-right
    dotnet remove package Vendr
    rmdir App_Plugins\Vendr
    dotnet add package Umbraco.Commerce
    sp_rename vendrCurrency, umbracoCommerceCurrency;
    sp_rename vendrTaxClass, umbracoCommerceTaxClass;
    sp_rename vendrStock, umbracoCommerceStock;
    sp_rename vendrOrderStatus, umbracoCommerceOrderStatus;
    sp_rename vendrEmailTemplate, umbracoCommerceEmailTemplate;
    sp_rename vendrPaymentMethod, umbracoCommercePaymentMethod;
    sp_rename vendrShippingMethod, umbracoCommerceShippingMethod;
    sp_rename vendrCountry, umbracoCommerceCountry;
    sp_rename vendrRegion, umbracoCommerceRegion;
    sp_rename vendrCurrencyAllowedCountry, umbracoCommerceCurrencyAllowedCountry;
    sp_rename vendrPaymentMethodAllowedCountryRegion, umbracoCommercePaymentMethodAllowedCountryRegion;
    sp_rename vendrPaymentMethodCountryRegionPrice, umbracoCommercePaymentMethodCountryRegionPrice;
    sp_rename vendrPaymentMethodPaymentProviderSetting, umbracoCommercePaymentMethodPaymentProviderSetting;
    sp_rename vendrShippingMethodAllowedCountryRegion, umbracoCommerceShippingMethodAllowedCountryRegion;
    sp_rename vendrShippingMethodCountryRegionPrice, umbracoCommerceShippingMethodCountryRegionPrice;
    sp_rename vendrTaxClassCountryRegionTaxRate, umbracoCommerceTaxClassCountryRegionTaxRate;
    sp_rename vendrDiscount, umbracoCommerceDiscount;
    sp_rename vendrDiscountCode, umbracoCommerceDiscountCode;
    sp_rename vendrOrder, umbracoCommerceOrder;
    sp_rename vendrOrderProperty, umbracoCommerceOrderProperty;
    sp_rename vendrOrderLine, umbracoCommerceOrderLine;
    sp_rename vendrOrderLineProperty, umbracoCommerceOrderLineProperty;
    sp_rename vendrGiftCard, umbracoCommerceGiftCard;
    sp_rename vendrOrderAppliedDiscountCode, umbracoCommerceOrderAppliedDiscountCode;
    sp_rename vendrOrderAppliedGiftCard, umbracoCommerceOrderAppliedGiftCard;
    sp_rename vendrStoreAllowedUserRole, umbracoCommerceStoreAllowedUserRole;
    sp_rename vendrStoreAllowedUser, umbracoCommerceStoreAllowedUser;
    sp_rename vendrFrozenPrice, umbracoCommerceFrozenPrice;
    sp_rename vendrGiftCardProperty, umbracoCommerceGiftCardProperty;
    sp_rename vendrActivityLog, umbracoCommerceActivityLog;
    sp_rename vendrOrderPriceAdjustment, umbracoCommerceOrderPriceAdjustment;
    sp_rename vendrOrderAmountAdjustment, umbracoCommerceOrderAmountAdjustment;
    sp_rename vendrProductAttribute, umbracoCommerceProductAttribute;
    sp_rename vendrProductAttributeValue, umbracoCommerceProductAttributeValue;
    sp_rename vendrTranslatedValue, umbracoCommerceTranslatedValue;
    sp_rename vendrProductAttributePreset, umbracoCommerceProductAttributePreset;
    sp_rename vendrProductAttributePresetAllowedAttribute, umbracoCommerceProductAttributePresetAllowedAttribute;
    sp_rename vendrOrderLineAttribute, umbracoCommerceOrderLineAttribute;
    sp_rename vendrPrintTemplate, umbracoCommercePrintTemplate;
    sp_rename vendrExportTemplate, umbracoCommerceExportTemplate;
    sp_rename vendrStoreEntityTag, umbracoCommerceStoreEntityTag;
    sp_rename vendrMigrations, umbracoCommerceMigrations;
    sp_rename vendrStore, umbracoCommerceStore;
    ALTER TABLE vendrCurrency RENAME TO umbracoCommerceCurrency;
    ALTER TABLE vendrTaxClass RENAME TO umbracoCommerceTaxClass;
    ALTER TABLE vendrStock RENAME TO umbracoCommerceStock;
    ALTER TABLE vendrOrderStatus RENAME TO umbracoCommerceOrderStatus;
    ALTER TABLE vendrEmailTemplate RENAME TO umbracoCommerceEmailTemplate;
    ALTER TABLE vendrPaymentMethod RENAME TO umbracoCommercePaymentMethod;
    ALTER TABLE vendrShippingMethod RENAME TO umbracoCommerceShippingMethod;
    ALTER TABLE vendrCountry RENAME TO umbracoCommerceCountry;
    ALTER TABLE vendrRegion RENAME TO umbracoCommerceRegion;
    ALTER TABLE vendrCurrencyAllowedCountry RENAME TO umbracoCommerceCurrencyAllowedCountry;
    ALTER TABLE vendrPaymentMethodAllowedCountryRegion RENAME TO umbracoCommercePaymentMethodAllowedCountryRegion;
    ALTER TABLE vendrPaymentMethodCountryRegionPrice RENAME TO umbracoCommercePaymentMethodCountryRegionPrice;
    ALTER TABLE vendrPaymentMethodPaymentProviderSetting RENAME TO umbracoCommercePaymentMethodPaymentProviderSetting;
    ALTER TABLE vendrShippingMethodAllowedCountryRegion RENAME TO umbracoCommerceShippingMethodAllowedCountryRegion;
    ALTER TABLE vendrShippingMethodCountryRegionPrice RENAME TO umbracoCommerceShippingMethodCountryRegionPrice;
    ALTER TABLE vendrTaxClassCountryRegionTaxRate RENAME TO umbracoCommerceTaxClassCountryRegionTaxRate;
    ALTER TABLE vendrDiscount RENAME TO umbracoCommerceDiscount;
    ALTER TABLE vendrDiscountCode RENAME TO umbracoCommerceDiscountCode;
    ALTER TABLE vendrOrder RENAME TO umbracoCommerceOrder;
    ALTER TABLE vendrOrderProperty RENAME TO umbracoCommerceOrderProperty;
    ALTER TABLE vendrOrderLine RENAME TO umbracoCommerceOrderLine;
    ALTER TABLE vendrOrderLineProperty RENAME TO umbracoCommerceOrderLineProperty;
    ALTER TABLE vendrGiftCard RENAME TO umbracoCommerceGiftCard;
    ALTER TABLE vendrOrderAppliedDiscountCode RENAME TO umbracoCommerceOrderAppliedDiscountCode;
    ALTER TABLE vendrOrderAppliedGiftCard RENAME TO umbracoCommerceOrderAppliedGiftCard;
    ALTER TABLE vendrStoreAllowedUserRole RENAME TO umbracoCommerceStoreAllowedUserRole;
    ALTER TABLE vendrStoreAllowedUser RENAME TO umbracoCommerceStoreAllowedUser;
    ALTER TABLE vendrFrozenPrice RENAME TO umbracoCommerceFrozenPrice;
    ALTER TABLE vendrGiftCardProperty RENAME TO umbracoCommerceGiftCardProperty;
    ALTER TABLE vendrActivityLog RENAME TO umbracoCommerceActivityLog;
    ALTER TABLE vendrOrderPriceAdjustment RENAME TO umbracoCommerceOrderPriceAdjustment;
    ALTER TABLE vendrOrderAmountAdjustment RENAME TO umbracoCommerceOrderAmountAdjustment;
    ALTER TABLE vendrProductAttribute RENAME TO umbracoCommerceProductAttribute;
    ALTER TABLE vendrProductAttributeValue RENAME TO umbracoCommerceProductAttributeValue;
    ALTER TABLE vendrTranslatedValue RENAME TO umbracoCommerceTranslatedValue;
    ALTER TABLE vendrProductAttributePreset RENAME TO umbracoCommerceProductAttributePreset;
    ALTER TABLE vendrProductAttributePresetAllowedAttribute RENAME TO umbracoCommerceProductAttributePresetAllowedAttribute;
    ALTER TABLE vendrOrderLineAttribute RENAME TO umbracoCommerceOrderLineAttribute;
    ALTER TABLE vendrPrintTemplate RENAME TO umbracoCommercePrintTemplate;
    ALTER TABLE vendrExportTemplate RENAME TO umbracoCommerceExportTemplate;
    ALTER TABLE vendrStoreEntityTag RENAME TO umbracoCommerceStoreEntityTag;
    ALTER TABLE vendrMigrations RENAME TO umbracoCommerceMigrations;
    ALTER TABLE vendrStore RENAME TO umbracoCommerceStore;
    UPDATE umbracoDataType
    SET propertyEditorAlias = REPLACE(propertyEditorAlias, 'Vendr.', 'Umbraco.Commerce.')
    WHERE propertyEditorAlias LIKE 'Vendr.%'
    UPDATE umbracoPropertyData
    SET textValue = REPLACE(textValue, 'Vendr.VariantsEditor', 'Umbraco.Commerce.VariantsEditor')
    WHERE textValue LIKE '%Vendr.VariantsEditor%';
    UPDATE umbracoCommerceOrderPriceAdjustment
    SET type = REPLACE(type, 'Vendr.', 'Umbraco.Commerce.')
    WHERE type LIKE '%Vendr.%';
    UPDATE umbracoCommerceOrderAmountAdjustment
    SET type = REPLACE(type, 'Vendr.', 'Umbraco.Commerce.')
    WHERE type LIKE '%Vendr.%';
    UPDATE umbracoCommerceEmailTemplate
    SET templateView = REPLACE(templateView, '/App_Plugins/Vendr/templates/email', '/Views/UmbracoCommerce/Templates/Email')
    WHERE templateView LIKE '%/Vendr/%';
    UPDATE umbracoCommercePrintTemplate
    SET templateView = REPLACE(templateView, '/App_Plugins/Vendr/templates/print', '/Views/UmbracoCommerce/Templates/Print')
    WHERE templateView LIKE '%/Vendr/%';
    UPDATE umbracoCommerceExportTemplate
    SET templateView = REPLACE(templateView, '/App_Plugins/Vendr/templates/export', '/Views/UmbracoCommerce/Templates/Export')
    WHERE templateView LIKE '%/Vendr/%';
    UPDATE umbracoCommerceMigrations
    SET migration = REPLACE(migration, 'Vendr.', 'Umbraco.Commerce.')
    WHERE migration LIKE 'Vendr.%';
    UPDATE umbracoCommerceActivityLog
    SET eventType = REPLACE(eventType, 'vendr/', 'commerce/')
    WHERE eventType LIKE 'vendr/%';
    "Umbraco"" {
      "Licenses": {
        "Umbraco.Commerce": "YOUR_LICENSE_KEY"
      }
    }
    https://{site_url}/umbraco/commerce/payment/callback/{payment_provider_alias}/{payment_method_id}/
    SqlException: The object 'remainingAmount_default' is dependent on column 'remainingAmount'.
    ALTER TABLE ALTER COLUMN remainingAmount failed because one or more objects access this column.
    Umbraco.Commerce.Persistence.Migrations.DbUpUmbracoCommerceMigrationsRunner.MigrateUp()
    ALTER TABLE [dbo].[umbracoCommerceGiftCard]
    DROP CONSTRAINT remainingAmount_default;