Skip to content

Commit

Permalink
Merge pull request #19 from akeneo-labs/migration_1.6
Browse files Browse the repository at this point in the history
Migration 1.6
  • Loading branch information
fitn authored Sep 13, 2016
2 parents 817bbd6 + df8234c commit ae625df
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 43 deletions.
42 changes: 3 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ A bundle that extend the Akeneo PIM Enterprise CatalogRuleBundle, adding the pos

| ClassificationRuleBundle | Akeneo PIM Enterprise Edition |
|:------------------------:|:-----------------------------:|
| v1.2.* | >= v1.6 |
| v1.1.* | v1.5.* |
| v1.0.* | v1.4.* |
| v0.1.* | v1.3.* |
Expand All @@ -17,7 +18,7 @@ A bundle that extend the Akeneo PIM Enterprise CatalogRuleBundle, adding the pos
You can install the bundle with composer:

```bash
php composer.phar require akeneo-labs/classification-rule-bundle:1.1.*
php composer.phar require akeneo-labs/classification-rule-bundle:1.2.*
```

Enable the bundle in the `app/AppKernel.php` file, in the `registerBundles` method:
Expand Down Expand Up @@ -48,43 +49,6 @@ You can also define a tree to declassify only the product's categories of this t

### Examples

```yaml
rules:
player_set_philips_brand_category:
conditions:
- field: family.code
operator: IN
value:
- camcorders
- mp3_players
- field: name
operator: CONTAINS
value: Philips
actions:
- type: unclassify

mug_remove_oro_brand_category:
conditions:
- field: family.code
operator: IN
value:
- mugs
- field: name
operator: CONTAINS
value: Oro
actions:
- type: unclassify
treeCode: null

led_tvs_remove_category_on_master_tree:
conditions:
- field: family.code
operator: IN
value:
- led_tvs
actions:
- type: unclassify
treeCode: master
```
[File example](Resources/doc/rules.yml)

Take a look to [the rule definition documentation](http://docs.akeneo.com/latest/cookbook/rule/general_information_on_rule_format.html?highlight=rule%20definition) to see more examples of conditions.
36 changes: 36 additions & 0 deletions Resources/doc/rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
rules:
player_set_philips_brand_category:
conditions:
- field: family.code
operator: IN
value:
- camcorders
- mp3_players
- field: name
operator: CONTAINS
value: Philips
actions:
- type: unclassify

mug_remove_oro_brand_category:
conditions:
- field: family.code
operator: IN
value:
- mugs
- field: name
operator: CONTAINS
value: Oro
actions:
- type: unclassify
treeCode: null

led_tvs_remove_category_on_master_tree:
conditions:
- field: family.code
operator: IN
value:
- led_tvs
actions:
- type: unclassify
treeCode: master
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
}
],
"require": {
"akeneo/pim-enterprise-dev": "1.5.*"
"akeneo/pim-enterprise-dev": "~1.6.0"
},
"require-dev": {
"phpspec/phpspec": "2.1.*",
"squizlabs/php_codesniffer": "2.3.*",
"phpmd/phpmd": "2.3.*",
"friendsofphp/php-cs-fixer": "@stable",
"henrikbjorn/phpspec-code-coverage": "1.0.*",
"doctrine/migrations": "1.0.0-alpha3@alpha"
"henrikbjorn/phpspec-code-coverage": "1.0.*"
},
"autoload": {
"psr-0": { "PimEnterprise\\Bundle\\ClassificationRuleBundle\\": "" }
Expand All @@ -43,7 +42,7 @@
"target-dir": "PimEnterprise/Bundle/ClassificationRuleBundle",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
"dev-master": "1.2.x-dev"
}
}
}

0 comments on commit ae625df

Please sign in to comment.