D8 generate double URL for commerce product I need to create double URL alias for commerce product. I tried with code below :

function mymodule_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
    if($entity-&gt;getEntityTypeId() == 'commerce_product'){
        $alias = '/store/'.$entity-&gt;getTitle();
        $source = '/product/' . $entity-&gt;id();
        $path = \Drupal::service('path.alias_storage')-&gt;save($source, $alias, "en");
    }
}


but doesn't work. My alias is overridden by pathauto and I have 2 equal alias.
I need to create /catalog/[commerce_product:title] and /store/[commerce_product:title] URLs.

The first one is set with pathauto pattern and created succesfully. The second one is create with the code above.

After updating the product i have 2 equal URLs:


/catalog/product-title
/catalog/product-title


why do not I have


/catalog/product-title 
/store/product-title 


how can I save double different alias?

Thanks in advance.
In your hook_entity_update() do like below

    function mymodule_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
      if($entity-&gt;getEntityTypeId() == 'commerce_product'){
        $language = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
        $aliasStorage = \Drupal::service('path.alias_storage');
        $source = '/product/' . $entity-&gt;id();
        if ($aliasStorage-&gt;aliasExists($source, $langcode)) {
          // alias already exist. So save your second alias here.
          $aliasStorage-&gt;save('/product/' . $entity-&gt;id(), YOURNEWALIAS, $language);

        }
        else {
           $aliasStorage-&gt;save('/product/' . $entity-&gt;id(), YOURNEWALIAS_1, $language);
           $aliasStorage-&gt;save('/product/' . $entity-&gt;id(), YOURNEWALIAS_2, $language);
        }
        }
    }