Magento 2 Generate Product Url Key Rating: 9,5/10 1942 votes

Nov 03, 2016  I've been trying to update/save a specific category but get the message 'URL key for specified store already exists.' I don't know if you can replicated it as it's very specific. Recreate go to Products Categories Select th. Create the Rewrite. On the Admin sidebar, go to Marketing Search & SEO URL Rewrites. Before you proceed, do the following to verify that the request path is available. In the search filter at the top of the Request Path column, enter the URL key of the page to be redirected and click Search. Product Feed Generator Extension Key Features List for Magento 2: We give Category mapping feature for the Google and eBay feed. We provide templates for below feeds, so users just select this feed and generate products feed to submit into it.

This article shows the complete, technical and functional way to import Categories, Attributes and Products lists in Magento 2 CE ecommerce, using REST API interface and C# .NET code.

At bottom you will find some Magento Backup and Recovery tips.

You will find how-to step-by-step guide with examples codes to:

  1. Upload The Categories;
  2. Upload The Product Custom Attributes;
  3. Upload Configurable Products;
  4. Upload Simple Products;
  5. Associate Configurable Product Options to Configurable Products and to Simple Products;
  6. Create Product Configurations;
  7. Link Simple Products to Configurable Product;

The examples in this guide has been tested for the following versions:

  1. Magento CE 2.2.6
  2. Mysql 5.7.21
  3. Php 7.1.14

For more information on the Magento 2 CE installation prerequisites, you can find the official documentation here: https://devdocs.magento.com/guides/v2.0/install-gde/prereq/prereq-overview.html

Magento 2 exposes three main implementable interfaces for uploading and managing data:

  1. Rest API Interface
  2. SOAP API Interface
  3. Object Manager + Object Model Interface

By using these methods, you can easily add products lists from a generic data source to the magento ecommerce and you can maintain synchronization of the same.

PHP – ObjectManager:

It is possible to develop custom PHP code, for Plugins, Modules or generic scripts, and integrate it with Magento.The ObjectManager service allows you to implement the Object Model Interface in your code and to instantiate your objects at bootstrapping of the application.This is done by exploiting the peculiarities of Dependency injection .

You can choose not to use dependency injection and Magento bootstrapping simply by creating “Newable / non-injectable” objects, modifying Bootstrap, instantiating the Object Manager and invoking resources (Framework classes) whenever they are needed. With the modalities described above, using the Object Model , Magento data can be loaded and manipulated.

SOAP APIs:

Magento 2 generate product url key for windows 7

Magento endpoints are protected and accessible only with authentication.To generate a proxy it is necessary to download the WSDL (eg.: http://<site url>/magento2/soap/default?wsdl=1&services=storeStoreRepositoryV1 ) of the requested service, by using a software that allows SOAP requests with authentication (es Postman). After you saved the WSDL with dedicated utilities it is possible to generate C# and VB .NET client-side proxy classes (In Visual Studio the most common tool is Svcutil.exe).

REST APIs:

Each Magento installation has a complete set of REST endpoints to interact with CMS data and structures.

The most convenient way to take advantage of Magento REST API is to use HTTP calls. In addition, you must generate a local data model and instantiate a REST Client.
An example of code written in C #:

RestClient is a Restsharp package that can be downloaded from the NuGet Package repository.

There is a endpoint for managing each Magento 2 CE entity.For each entity there is an interface to create a “data model” through which to build a request in JSON format.

You can find the complete list of available services here:http://devdocs.magento.com/guides/v2.0/rest/list.html Monster hunter generations ultimate g2 key quests.

To transform a data model into a Json string (serialization), you can use the .NET Newtonsoft.Json Library, as shown in the following code:

Sequence of steps to be follow for a standard and complete data loading within Magento are:

  1. Creation of Categories;
  2. Creation of AttributeSet;
  3. Creation of Custom Product Attributes, AttributeSet Assignment, AttributeGroup assignment;
  4. Option assignment to individual Custom Product Attribute;
  5. Creating Configurable Products;
    1. Contextual assignment to AttributeSet;
  6. Creation of Simple Type Products;
    1. Contextual assignment to AttributeSet + Product Attributes Custom Option;
  7. Option of Attribute assignment to the Configurable Product for use in the products combinations;
  8. Option of Attribute assignamento to simple products for use in the products associations ;
  9. Simple Products association to the relative Configurable Product (products linking);

Point 1:

Magento 2 Generate Product Url Key For Free

The Magento installation creates a root category, not visible either in the back-end or in the front-end, called ” Root Catalog “.

It must not be deleted. Under the root category you have to insert all other categories according to the desired hierarchy.Below is a simple JSON to send to the end-point to insert a category: “/rest/V1/categories”:

Point 2:

Magento

In Magento the Product Attributes are organized and related to an AttributeSet .It is possible to create multiple Custom Product Attributes and assign them to AttributeSet. A Product Attribute can belong only to a attributeset. Here is a simple JSON for the end-point “/rest/V1/products/attribute-sets” to create a Attribute Set:

Parameter named “Skeletonid” indicates the creation of the attribute set on the default attribute set that in Magento always has id = 4.

Point 3:

Magento comes with some standard Attributes but it is possible to add Custom Product Attributes to qualify the products. We have to do this if Product Combinations that will be created for the products are based on attributes not present in Magento. Below is a simple JSON to send to the end-point “/rest/V1/products/attributes” to create a Custom Product Attribute:

To use Attributes Options in products combination, Attribute must have the following features:

The “scope” must be set to “global”;
The attribute must be “visible”;
The attribute must be of “user defined” type;
The attribute must use a number of options (such as the “dropdown” and “multiselect” attributes)

The example json to assign the Custom Product Attribute to the Attributeset and to the Attribute group is shown below.The endpoint is: “/rest/V1/products/attribute-sets/attributes”:

Point 4:

For each Attribute created, we must assign the relative Options Value lists by using the endpoint “/rest/V1/products/attributes/<attribute-code>/options” with a json as the following:

Point 5:

Magento 2 CE allows to create at least 6 types of products : Simple, Configurable, Grouped, Virtual, Bundle and Downlodable. Usually Magento 2 shop should have Configurable Products (Parent) with several Simple Products (Child) associated in a number equal to all the possible combinations for the Attributes Options Values associated.

Configurable Product will be the only entity visible in the products Catalog of the shop. So the Simple Products will be displayed only in the detail pages every time customers will choose available options.

To create a product of type Configurable, you have to use the “/rest/V1/products” endpoint with the “POST” method. Below an example of json for the complete insertion of a Configurable Product with price, stock (stock), images, descriptions, attributes:

Point 6:

The next step in creating a Simple or Child product, which is the single variant (combination) of the Configurable product

For the Simple Product, the visibility is set to “1” (= not visible individually) because only Configurable Product must be visible in the Catalog and in the Searches, while the simple product will be shown on the page detail by choosing relative combination.

Point 7:

Now we have to assign the Configurable Product the attributes and the relative options to be used for the combinations.Assigning these options to the Configurable product corresponds to the value of the “Configurable Products Options” It is possible by usign “/rest/V1/configurable-products/{sku}/options” endpoint, and the following JSON, derived from a GET method (“rest/V1/products/:sku”) for a single product:

If these options are not assigned, when we try to link Simple Product to the Configurable the Magento system, it will raise the “Configurable” exception

Option for Color attribute

Options for attribute “CALZ.WOMAN 34-42 WITH ½ “:

All options are assigned to the Configurable.All the options must be included in a single json, otherwise the error “Something went wrong while saving the option” is raised, which corresponds to the violation of the primary key constraint.

Point 8:

Magento 2 Generate Product Url Keys

We also have to assign the Configurable Attributes Options to the Simple product, if it is a Combination of one Configurable Product, by using “/rest/V1/configurable-products/{sku}/options “. For Simple Product we have to assign only one option value for each Attribute:

Option for Color Attribute:

Option for Size attribute:

Point 9:

The last step is to associate the simple product with the configurable.Via the endpoint “/ rest / V1 / configurable-products / {sku} / child” and the following example json:

Backup and Security of Magento 2 e-commerce

Before making a full upload of products or other data, it is important to make a complete backup of Magento MySQL database and Magento files located on the FTP space.
First of all, it is necessary to configure MySQL to allow remote connections (this must be allowed by your hosting provider), then you have to locate the MySQL configuration file where at specific directive you have to indicate the IP address from which you need to connect:

Then access MySQL server by using root credentials and run the following script:

Magento 2 Generate Product Url Key For Mac

For example:

To perform the Magento e-commerce backup procedures, we will use Iperius Backup.

Magento 2 Generate Product Url Key For Windows 10

In the image below you can see the simple configuration to automatically download the site via FTP and to perform a MySQL backup (dump).

For more information, see the appropriate tutorial: MySQL backup with Iperius

Magento 2 Get Product Url Key

It is essential to perform a full backup of all Magento 2 CE installation files. To do this you have to configure a new backup operation on Iperius where the source items are the Magento files located on the web space, reachable via FTP:

For more information, see the appropriate tutorial: Automatic download of websites with Iperius

Management software for shops and e-commerce

Importing product lists into an e-commerce is an operation of great importance if you have a store management software that manages a lot of data.In fact, one of the best ways for a shop to expand its offering and its customers is to sell products through a Magento e-commerce system.Shops and companies often encounter difficulties in integrating their management software with an effective e-commerce strategy. To simplify this process, there are complete solutions that allow you to automatically import product lists into a Magento e-commerce system such as the management software for stores Etos : https://www.etosweb.com/negozio-online/

(Italian, Spanish, Portuguese (Brazil))