{"id":35008530,"url":"https://github.com/rshkabko/commerceml","last_synced_at":"2026-05-20T08:31:31.537Z","repository":{"id":60830505,"uuid":"545910863","full_name":"rshkabko/commerceml","owner":"rshkabko","description":"Package to exchange products by CommerceML","archived":false,"fork":false,"pushed_at":"2023-02-06T13:54:32.000Z","size":1936,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T11:27:19.194Z","etag":null,"topics":["1c","bitrix","bitrix24","commerceml","exchange","flamix","opencart","product","tilda","woocommerce"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rshkabko.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":"2022-10-05T07:30:28.000Z","updated_at":"2022-10-07T12:19:17.000Z","dependencies_parsed_at":"2023-01-23T16:15:09.005Z","dependency_job_id":null,"html_url":"https://github.com/rshkabko/commerceml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rshkabko/commerceml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshkabko%2Fcommerceml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshkabko%2Fcommerceml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshkabko%2Fcommerceml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshkabko%2Fcommerceml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rshkabko","download_url":"https://codeload.github.com/rshkabko/commerceml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshkabko%2Fcommerceml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33251981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["1c","bitrix","bitrix24","commerceml","exchange","flamix","opencart","product","tilda","woocommerce"],"created_at":"2025-12-27T04:55:11.318Z","updated_at":"2026-05-20T08:31:31.531Z","avatar_url":"https://github.com/rshkabko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Screenshot](img/commerceml.jpg)\n\n# About\n\nThis package is intended for integration of product synchronization applications from FLAMIX.\nThe package uses a simplified and improved version of the CommerceML exchange protocol.\n\n## Philosophy of Sync\n\n* Adding, editing, parsing, and deleting products, catalogs, and fields are carried out only on the site;\n* Bitrix24 synchronizes the catalog structure and products with fields;\n* Bitrix24 synchronizes product rests and prices to the site;\n\nWarning! Bitrix24 does not upload the catalog and products to the website.\n\n![Screenshot](img/philosophy.svg)\n\n## Concept Guides\n\nWe use CommerceML standards, but in order to simplify the exchange and in line with our sync philosophy, the following logical concepts have been adopted:\n\n* Main language - English (in some places it is translated into Russian to maintain backward compatibility);\n* Synchronization occurs step by step, 30 products per step;\n* After import, the import file is automatically deleted;\n* All data is compressed via zip;\n* If you need stop actions use ``throw new \\Exception('Your message');``\n\n## API and Actions\n\nInventory API and sync actions - https://inventory.app.flamix.solutions/docs\n\nCan be imported and used as a Postman collection or OpenAPI Spec.\n\n## Install and usage\n\n```bash\ncomposer require flamix/commerceml\n```\n\nCreate new class\n\n```php\n\u003c?php\n/**\n* Redefining how the plugin works\n* If something is not clear, see how it is done in the parent class Flamix\\CommerceML\\Init\n*/\nnamespace My\\CMS;\n\nuse Flamix\\CommerceML\\Init;\n\nclass Exchange extends Init {\n    /**\n    * CALLBACKS\n    * \n    * Called on export  \n    * The export action calls these callbacks to get arrays of properties to be wrapped in xml\n    * @axample public static function get(int $page, array $params = []): array\n    * Note! Every callback must return EXTERNAL_ID as ID, and automatically create it, if it's empty or non exist\n    * Note! $page will be passed automatically\n    */\n    protected static string $product_callback = '\\Exchange\\Woo\\Products';\n    protected static string $category_callback = '\\Exchange\\Woo\\Categories';\n    protected static string $attribute_callback = '\\Exchange\\Woo\\Attributes';\n\n    /**\n    * ACTIONS\n    * \n    * If you need to override the behavior of a standard action\n    * For example, it is almost always necessary to override the authorization action behaviors\n    */\n    public static function actionCheck()\n    {\n        if (Setting::getOption('lead_domain') !== ($_SERVER['PHP_AUTH_USER'] ?? ''))\n            throw new \\Exception('Bad login!');\n\n        if (Setting::getOption('lead_api') !== ($_SERVER['PHP_AUTH_PW'] ?? ''))\n            throw new \\Exception('Bad password!');\n\n        // If OK - Print our session_id\n        return CheckAuth::printPhpSession();\n    }\n\n    /****************** | HANDLERS | *******************/\n    /**\n    * HANDLERS (restsHandler, pricesHandler and productsHandler)\n    * \n    * Called on import\n    * If you need to override the behavior of a standard action\n    * For example, it is almost always necessary to override the authorization action behaviors\n    */\n    public static function restsHandler($product_id, array $rests): bool\n    {\n        $woo_id = Products::getProductBy('EXTERNAL_ID', $product_id);\n        commerceml_log('[restsHandler] Product ' . (($woo_id) ? 'founded with WooCommerce product ID ' . $woo_id : 'not found') . ' by EXTERNAL_ID: ' . $product_id, $rests);\n        if (!$woo_id)\n            return false;\n\n        $general_quantity = array_sum(array_column($rests, 'quantity'));\n        commerceml_log('[restsHandler] General quantity by all warehouses ' . $general_quantity);\n\n        if (!$general_quantity)\n            return false;\n\n        // dd($woo_id, $general_quantity, $rests);\n        return Products::set($woo_id, ['quantity' =\u003e $general_quantity]);\n    }\n}\n```\n\nInit sync\n\n```php\n// Init main settings and include helpers\n\\Flamix\\Sync\\Init::init(__DIR__);\n\n// Start exchange\n// \\My\\CMS\\Exchange replace to your class\nif (($_GET['flamix_product'] ?? false) === 'Y')\n    \\My\\CMS\\Exchange::start();\n```\n\n### Export: Products, category and fields from site to CRM\n\n![Screenshot](img/export.svg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frshkabko%2Fcommerceml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frshkabko%2Fcommerceml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frshkabko%2Fcommerceml/lists"}