Home Блог Routing & API

Routing & API

Routing & API

Internal routing information, corresponding API endpoints, and application page models

Internal routing and corresponding endpoints

Tab #1 ("Home")

Internal link
/tabs/tab1
Default endpoint
/index.php?route=api/ionic/catalog
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here



Tab #2 ("Catalog")

Internal link
/tabs/tab2
Default endpoint
/index.php?route=api/ionic/catalog/getCategories
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
categories Array
{
"categories": [
{
"name": "Мобильные телефоны",
"category_id": "20",
"image": "https://tiptop.uno/image/cachewebp/catalog/11phone-300x200.webp",
"column": "1",
"href": "https://tiptop.uno/index.php?route=product/category&path=20"
},
{
"name": "Ноутбуки",
"category_id": "18",
"image": "https://tiptop.uno/image/cachewebp/catalog/laptop-300x200.webp",
"column": 1,
"href": "https://tiptop.uno/index.php?route=product/category&path=18"
}
]
}
List of categories



Tab #3 ("Cart")

Internal link
/tabs/tab3
Default endpoint
/index.php?route=api/ionic/cart/getCartProducts
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
products Array
{
"products": [
{
"cart_id": "415",
"product_id": "9641",
"quantity": "1",
"stock": true,
"total": "11549.70 UAH.",
"option": [],
"thumb": "https://site.com/image/166276939-200x200.webp",
"name": "Xiaomi P30 64GB",
"model": "Product 3",
"price": "11549.70 UAH.",
"special": false
}
]
}
List of items in the shopping cart
totals Array
{
"totals": [
{
"title": "Итого",
"text": "11549.70грн."
},
{
"title": "Всего",
"text": "11549.70грн."
}
]
}
Total amount of items in the cart



Tab #4 ("Lists")

The page displays lists of products and categories (saved, viewed, etc.)

Internal link
/tabs/tab4
Default endpoints
/index.php?route=api/ionic/catalog/getCategoriesByIds&type=cats
/index.php?route=api/ionic/catalog/getProductsByIds



Tab #5 ("Account")

Internal link
/tabs/tab5
Default endpoint
/index.php?route=api/ionic/account
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
links Array
{
"links": [
{
"title": "dasdasd",
"list": [
{
"title": "111",
"link": "",
"link_type": "0",
"icon": "",
"color": ""
},
{
"title": "О нас",
"link": "/catalog/custom-page/information/4",
"link_type": "1",
"icon": "logo-flickr",
"color": "dark"
}
]
}
]
}
List of additional links
settings Array
{
"settings": [
{
"title": "Валюта",
"code": "currency",
"options": [
{
"title": "US Dollar",
"code": "USD"
},
{
"title": "Гривна",
"code": "UAH"
},
{
"title": "Рубль",
"code": "RUB"
}
],
"selected": "RUB"
},
{
"title": "Выбрать язык",
"code": "language",
"options": [
{
"title": "RU ",
"code": "ru-ru"
},
{
"title": "EN ",
"code": "en-gb"
}
],
"selected": "ru"
}
]
}
List of available settings. Settings in the future are saved in headers on subsequent requests, so you can add your own settings (for example, city, if this is a restaurant chain website)



List of products (categories, manufacturers, search, etc.)

Internal link
/catalog/product-list/{path}/{path_id}
Default endpoint
/index.php?route=api/ionic/catalog/getProductsList&path={path}&path_id={path_id}
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
config Array
{
"config": {
"text_sort": "Сортировка:",
"sortings": [],
"sorts": [
{
"label": "По умолчанию",
"value": "p.sort_order-ASC",
"type": "radio"
},
{
"label": "text_viewed_desc",
"value": "p.viewed-DESC",
"type": "radio"
},
{
"label": "text_date_desc",
"value": "p.date_added-DESC",
"type": "radio"
},
{
"label": "Цена (низкая > высокая)",
"value": "p.price-ASC",
"type": "radio"
},
{
"label": "Цена (высокая > низкая)",
"value": "p.price-DESC",
"type": "radio"
}
]
}
}
Contains information about possible sorting of goods
products Array [] An array of product thumbnails. Thumbnail Model You can see here



Product page

Internal link
/catalog/product/{product_id}
Default endpoint
/index.php?route=api/ionic/catalog/getProduct&product_id={product_id}
Page Model:

Attention! The product model is almost the same as the OS product model. The table below describes only additional options!

Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_middle Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
product_info['stock'] Array
{
"stock": {
"text": "В наличии",
"color": "#63ac48"
}
}
Information about the status of goods in stock
product_info['button_cart'] Boolean true 'Add to cart' button display option
product_info['custom_tabs'] Array
[
{
"title": "Заголовок вкладки",
"html": "<div>Hello world!</div>"
},
{
"title": "Заголовок вкладки2",
"html": "<div>Hello world2!</div>"
}
]
Настраиваемые вкладки на странице продукта. Предусмотрены, как возможность для адаптации.



Authorization/registration page

Internal link
/auth-page
Default endpoint
/index.php?route=api/ionic/accoun/getAccountFields
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
custom_fields Array
{
"custom_fields": [
{
"custom_field_id": "1",
"custom_field_value": [],
"name": "Настройка поля",
"type": "text",
"value": "",
"validation": "",
"location": "account",
"required": false,
"sort_order": "0"
}
]
}
List of custom fields



Custom Page

The page is intended for building your own pages and integrating them into the application based on existing modules and elements. For example, if you want to integrate your blog into the application, or generate any other page, you can simply use this page and write your own custom controller

Internal link
/catalog/custom-page/{type}/{id}
Default endpoint
/index.php?route=api/ionic/custom_page&path{type}=&path_id={ id}
Page Model:
Index Type Example Description
content_top Array [] List of modules at the top of the page. Module models You can see here
content_bottom Array [] List of modules at the top of the page. Module models You can see here
main_content Array ... The array contains three indices, which are discussed below.
main_content['heading_title'] String "Blog - from an electric kettle to a nuclear power plant in your kitchen". Page Title
main_content['pagination'] Boolean true | false Determines if pagination is required for this page. If required - then when the page is scrolled to the end - the application will send a request to the same endpoint, adding the parameter page=1++
main_content['modules'] Array [] An array of modules from which the page is built. For example, you can use two modules here - Slideshow and Custom HTML and thus generate a blog article page. Or, output the path-list module by adding pagination and thus generate a list of articles with "infinite" scrolling.



Other pages and their endpoints

These pages all support the standard model with "content_bottom" and "content_top". These pages often play a minor technical role, so they are described together

Internal page link Endpoint Description
/order-list/ route=api/ionic/account/getOrders Order history page
/order-info/{order_id} route=api/ionic/account/getOrder&order_id={order_id} Order page
/address/ route=api/ionic/account/getAddersses Address list page
/address-form/ route=api/ionic/account/getAddressFields Add address form
/account-form/ route=api/ionic/account/getCustomFields Edit account form
/notifications/ route=api/ionic/account/getNotifications List of notifications
/catalog/favorite-products/{type} route=api/ionic/catalog/getProductsByIds Sends a list of IDs and gets a list of viewed or featured items
  • TAB 1
  • TAB 2
  • TAB 3
  • TAB 4
  • TAB 5
  • Product List
  • Product Page
  • Authorization
  • Custom page
  • Other

Write a review

Write a review


Ask a question

Ask a question