How to configure connect to Magento 1.x.x Store from PDP
This article is for Magento 1.7.0 and greater . Older Magento versions does not have implemented these features.
This article will show the steps necessary connect to Magento 1.x.x Ecommerce Store from PDP:
- Prepare Environment
- Creating oAuth Consumer
- Creating and configuring Admin roles
- Configuring resource attributes and access permissions
- Assigning configured Admin REST Role to admin user
- Connect from PDP
1. Prepare Environment
- Check Oauth extension by function phpinfo().
If not exist extension, please install OAuth extension before continues.
- Check avaiable of rest service magento 1.x.x
Access to Url:
Url return success:
Url return error:
When url return error, please check file .htaccess in root Magento. Check option rewrites then reconfigure it.
2. Creating oAuth Consumer
Navigate to System->Web Services ->REST oAuth Consumers. OAuth Consumers grid is shown.
- Click on “Add New” button to add new Consumer Application.
- On “New Consumer” screen insert some custom name.
- Key and Secret fields are disabled, and we just need to copy their values somewhere in text file for later usage (We need them for our OAuth authorization in order to be able to consume REST from Magento).
- Save Consumer app.
3. Creating and configuring Admin roles
We need to create permissions for specific user type in order user to be able to consume our Magento REST service and access necessary resources.
Let’s navigate to System -> Web Services -> REST Roles. REST Roles grid is shown with two user types by default:
Let’s create new Admin role.
- Click on “Add admin Role” button in top right corner. “Add new Role” screen is shown.
- In the field “Role name” enter for example “adminapi”.
- Click on “Role API resources” tab on the left.
“Role Resources” screen is shown and here we need to check specific permissions that our Administrator user will have on specific resource. With #PDP, we suggest select option “All” or select “Product“.
- Click on “Save Role” button in top right corner of the screen.
4. Configuring resource attributes and access permissions
Navigate to System->Web Services ->REST attributes.
Here we have grid with three user types listed:
- Let’s click on “Admin” in order to configure REST resource attributes that Admin will be allowed to access.
- Under “User type resources” screen, select resources that Admin user type can access or select “All“.
- Click on “Save” button in the top-right corner.
5. Assigning configured Admin REST Role to admin user
- Navigate to System->Permissions->Users. “Users” grid is shown with list of registered Magento site Administrators
- Click on some admin user from list in order to open “Edit user” screen.
- There is a tab named “REST role” on the left. Click on it and a list of Admin type roles is shown on the screen.
- Click on “Assigned” radio box near that role name.
- Save User.
You have successfully assigned the admin user to be able to access REST resources on our Magento.
6. Connect from PDP
Required: Installed module connect for Magento 1.x.x
Config Connector #PDP with Magento 1.x.x.
Enable Shopping cart and connect to Magento 1.x.x:
Enter API access information to connect with Magento 1.x.x
Press “Save Config” then Allow popup browser
Login by user was assign REST Roles
Authorize application and OK to finish
Push single product to Magento
Push multiple products
After products are pushed successful, all these items status will be change to LIVE in #PDP, go to Magento backend set category and ready for sell on Magento.
You must be logged in to reply to this topic.