{"id":21373046,"url":"https://github.com/hiqdev/hipanel-server-order","last_synced_at":"2025-07-13T07:32:47.822Z","repository":{"id":48012095,"uuid":"189409181","full_name":"hiqdev/hipanel-server-order","owner":"hiqdev","description":"HiPanel Server Order","archived":false,"fork":false,"pushed_at":"2022-12-10T18:04:25.000Z","size":3573,"stargazers_count":3,"open_issues_count":12,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-17T11:22:05.520Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiqdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-30T12:23:25.000Z","updated_at":"2021-05-11T12:06:49.000Z","dependencies_parsed_at":"2023-01-26T05:31:05.042Z","dependency_job_id":null,"html_url":"https://github.com/hiqdev/hipanel-server-order","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiqdev%2Fhipanel-server-order","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiqdev%2Fhipanel-server-order/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiqdev%2Fhipanel-server-order/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiqdev%2Fhipanel-server-order/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiqdev","download_url":"https://codeload.github.com/hiqdev/hipanel-server-order/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225577634,"owners_count":17491166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-22T08:24:51.085Z","updated_at":"2024-11-22T08:24:51.724Z","avatar_url":"https://github.com/hiqdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HiPanel Server Order\n\n[![Latest Stable Version](https://poser.pugx.org/hiqdev/hipanel-server-order/v/stable)](https://packagist.org/packages/hiqdev/hipanel-server-order)\n[![Total Downloads](https://poser.pugx.org/hiqdev/hipanel-server-order/downloads)](https://packagist.org/packages/hiqdev/hipanel-server-order)\n[![Build Status](https://img.shields.io/travis/hiqdev/hipanel-server-order.svg)](https://travis-ci.org/hiqdev/hipanel-server-order)\n[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/hiqdev/hipanel-server-order.svg)](https://scrutinizer-ci.com/g/hiqdev/hipanel-server-order/)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/hiqdev/hipanel-server-order.svg)](https://scrutinizer-ci.com/g/hiqdev/hipanel-server-order/)\n\n**Интеграция пакета**\n\n1. В месте, где нужно чтобы появился плагин, разместить элемент `\u003cdiv id=\"server-order-app\"\u003e\u003c/div\u003e`\n2. Перед закрытием тега `\u003chead\u003e`, вставить всё что написано в файле `dist/index.html`\n3. Сделать запросы на получение доступных конфигураций `https://hiapi.advancedhosting.com/configsGetAvailable?with_prices=1\u0026seller=dsr`\n4. Сделать запросы на получение доступных образов `https://hiapi.advancedhosting.com/osimagesSearch?type=dedicated\u0026seller=dsr`\n5. Сгруппировать полученные конфиги по полю `location`\n6. Поместить `dist/*.svg` в доступную для для веб сервера дирикторию, так что бы он был доступен от корня  `https://[your_domain_name]/*.svg` или создать переменную глобальной области видимости `window.hipanel_server_order.pathToIcons` и записать туда путь к `*.svg`\n7. Создать в глобальной области видимости переменную `window.hipanel_server_order`. В созданную переменную нужно поместить объект с настройками для плагина такой структуры:\n8. Для того что бы изменить локацию, нужно вызвать функцию `hipanel_server_order_app.setLocation('nl')`, передав ей строкой одно из двух значений: `nl` или `us`\n\n```javascript\nwindow.hipanel_server_order = {\n    initialStates: {\n        action: 'https://hipanel.advancedhosting.com/server/order/add-to-cart-dedicated', // действие формы для заказа\n        location: 'us', // локация по умолчанию, доступные варианты: 'us', 'nl'\n        language: 'en', // язык по умолчанию, доступные варианты: 'ru', 'en'\n    },\n    configs: {\n        /* список конфигураций полученный из `/configsGetAvailable`, сгруппированных по локации, пример в `src/index.js:17` */\n    },\n    osImages: [\n        /* массив доступных образов из `/osimagesSearch`, передать без модификации */\n    ],\n    pathToIcons: null, // путь к файлам `*.svg` из папки `dist`, если `null` то искать в корне, на пример `https://[your_domain_name]/*.svg`\n};\n```\n\n**Пример на PHP**\n\n1. cp src/example.php dist/\n2. php -S localhost:8000 -t dist\n3. http://localhost:8000/example.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiqdev%2Fhipanel-server-order","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiqdev%2Fhipanel-server-order","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiqdev%2Fhipanel-server-order/lists"}