-
Notifications
You must be signed in to change notification settings - Fork 158
Setup
-
goto System > integrations
-
Click on
Add New integration
button to display the New Integration page. -
Enter a unique name for the integration in the Name field. Then enter your admin password in the Your Password field.
-
Select Resource Access to 'All' under 'API' tab (NOTE: it is only for a quick start, for production you have to allow only resources required by the app)
-
Click Save to save your changes and return to the integrations page.
-
Click the Activate link in the grid that corresponds to the newly-created integration.
-
Click Allow
-
A dialog similar to the following displays:
-
Copy the
Access Token
value and click on theDone
button.
-
goto Content > Blocks
-
Click on
Add New Block
button -
Put your config inside
Content
section (config sample)
Note: The images
wysiwyg/home/home-main.jpg
,wysiwyg/home/home-t-shirts.png
,wysiwyg/home/home-eco.jpg
were upload in magento manually before this step and category id30
and31
are actual category id
If you are having trouble with image slider, follow this guide to Configure Home Page Image Slider
-
Save your block
-
Remember the id of this newly created CMS block
-
Get the code
git clone https://github.com/troublediehard/magento-react-native.git && cd magento-react-native
-
Install dependencies
yarn install # only for iOS cd ios pod install
-
Rename
src/config/magento-sample.js
file tosrc/config/magento.js
-
Change Magento base url to your magento website url in
src/config/magento.js
-
Replace
access_token
parameter inmagento.js
to Access Token from Integration you created. -
Replace
home_cms_block_id
parameter inmagento.js
with the cms block id you created. -
Run the project.
# for iOS react-native run-ios
# for android react-native run-android
-
Persist application data.
go to 'src/store/index.js' remove 'persistor.purge();'