1

I'm trying to migrate the code of my magento 1.9 store to 2.1, after a successfull data migration.

To this end, i'm using the code migration tool (https://github.com/magento/code-migration).

On the convertPhpcode step, i get a lot of warnings like the following :

←[0;33m[2016-08-22 15:20:33][WARNING]: Could not map alias checkout of type helper←[0m
←[0;33m[2016-08-22 15:20:33][WARNING]: Class not found for alias "checkout"←[0m
←[0;33m[2016-08-22 15:20:33][WARNING]: Can not map helper class: 'checkout/cart'←[0m
←[0;33m[2016-08-22 15:20:33][WARNING]: Could not map alias catalog of type model←[0m
←[0;33m[2016-08-22 15:20:33][WARNING]: Class not found for alias "catalog"←[0m

That is for this block of code :

        $cartHelper = Mage::helper('checkout/cart');
        $cartItems = $cartHelper->getCart()->getItems();
        foreach ($cartItems as $cartItem) {
          $attrDuration = Mage::getModel('catalog/product')->load($cartItem->getProduct()->getId())
            ->getDuration();
        if (isset ($attrDuration)) {
            $duration -= $attrDuration;
        }
    }

Now i understand that their is some missing mapping for the checkout/cart helper to be converted, but i'm not able to figure where i should add the mapping, and on what i should map, and my research didn't bring up anything to help me understand.

Do you have any idea, link, or tutorial that could be helpfull ? Thanks in advance !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.