{"id":21148998,"url":"https://github.com/macopedia/magento2-omnibusdirective","last_synced_at":"2025-06-21T12:38:13.868Z","repository":{"id":62551763,"uuid":"516388261","full_name":"macopedia/magento2-omnibusdirective","owner":"macopedia","description":"Implementation of EU Omnibus Directive for Magento 2","archived":false,"fork":false,"pushed_at":"2025-03-10T09:27:44.000Z","size":49,"stargazers_count":15,"open_issues_count":4,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-13T16:03:59.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macopedia.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-21T13:43:41.000Z","updated_at":"2025-05-19T18:33:19.000Z","dependencies_parsed_at":"2024-11-20T10:29:22.331Z","dependency_job_id":"9e529d5c-2335-4954-97d5-760fd7315b6a","html_url":"https://github.com/macopedia/magento2-omnibusdirective","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"19fb21e8113ebe6ebcb3cb73f125ff1f008fd4c2"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/macopedia/magento2-omnibusdirective","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macopedia%2Fmagento2-omnibusdirective","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macopedia%2Fmagento2-omnibusdirective/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macopedia%2Fmagento2-omnibusdirective/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macopedia%2Fmagento2-omnibusdirective/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macopedia","download_url":"https://codeload.github.com/macopedia/magento2-omnibusdirective/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macopedia%2Fmagento2-omnibusdirective/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261126147,"owners_count":23113283,"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":[],"created_at":"2024-11-20T09:30:19.209Z","updated_at":"2025-06-21T12:38:08.852Z","avatar_url":"https://github.com/macopedia.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macopedia Magento 2 Omnibus Directive module\n\nImplementation of EU Omnibus Directive for Magento 2.\n\n - [Requirements](#requirements)\n - [Main features](#main-features)\n - [Not implemented features](#not-implemented-features)\n - [Installation](#installation)\n - [Prices import](#prices-import)\n\n## Requirements\n\n   Magento version \u003e 2.4.x\n\n## Main features\n\n1. Historical prices\n   1. Adds `Historical price` and `Historical price updated at` product attributes\n   2. Keeps minimal price from last 30 days - calculated from `price` and `special_price` attributes change after product save in admin panel\n   3. Cronjob which removes historical prices older than 30 days\n   4. Displays historical price on product view page\n2. Trusted review validation\n   1. Extends product review form by an additional input `order_number`\n   2. Validates purchased product by order number (Increment ID) - only validated buyer can add review to product\n\n## Not implemented features\n\n- checking from / to special price date before remove special price value\n- calculate historical price after save by Rest API and Soap API\n- calculate historical price after product mass action update\n- keep all price changes from last 30 days\n- keep historical prices per customer groups\n- keep historical prices calculated by catalog rules\n- keep historical tier prices\n\n## Installation\n\n1. Using composer: \n\n```\ncomposer require macopedia/module-omnibusdirective\n```\n\n2. Using zip file:\n   1. Download zip file\n   2. Extract module in directory `app/code/Macopedia/OmnibusDirective`\n\nEnable module and install patches:\n```\n   bin/magento module:enable Macopedia_OmnibusDirective\n   bin/magento setup:upgrade\n```\n\n\nNotice - if you have custom theme and modified review form template file `Magento_Review/templates/form.phtml` you have to add manually `order_id` input (see example in file `view/frontend/templates/review/form.phtml`):\n\n```html\n\u003cdiv class=\"field review-field-order-id required\"\u003e\n    \u003clabel for=\"order_id_field\" class=\"label\"\u003e\u003cspan\u003e\u003c?= $block-\u003eescapeHtml(__('Order number')) ?\u003e\u003c/span\u003e\u003c/label\u003e\n    \u003cdiv class=\"control\"\u003e\n        \u003cinput type=\"text\" name=\"order_id\" id=\"order_id_field\" class=\"input-text\" data-validate=\"{required:true}\" data-bind=\"value: review().order_id\" /\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Prices import\n\nIf you have custom script to import prices, you can use method `\\Macopedia\\OmnibusDirective\\Model\\Product\\HistoricalPrice::getHistoricalPriceUpdateValue` to calculate historical price.\nAs parameters, you should pass array with original prices `$origData` (before import values):\n\n```php\n$origData = \n[\n    'special_price' =\u003e xxx,\n    'historical_price' =\u003e xxx,\n    'price' =\u003e xxx\n]\n```\n\nand updated prices array `$data` (after import values):\n\n```php\n$data = \n[\n    'special_price' =\u003e xxx,\n    'price' =\u003e xxx\n]\n```\n\n## Screenshots\n### Historical price on product page\n\n![product-page-historical-price](https://user-images.githubusercontent.com/7571848/182821364-06fd096a-2c35-4398-9bfd-2971ab62b4e1.png)\n\n### Review validation by order number field\n\n![product-page-trusted-review](https://user-images.githubusercontent.com/7571848/182821384-b5a2d609-db29-4f88-a64a-05ecb59247af.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacopedia%2Fmagento2-omnibusdirective","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacopedia%2Fmagento2-omnibusdirective","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacopedia%2Fmagento2-omnibusdirective/lists"}