Created
January 29, 2016 18:27
-
-
Save mbessolov/330b076b6ada6b0d1d20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->createPriceListSubset( | |
100, // percentage of product catalog, e.g. 100 = all products, 5 = 5% of the entire catalog | |
['USD', 'EUR'], // currencies | |
[ | |
1 => 1, // price tier "1 or more" | |
10 => 0.9, // price tier "10 or more", price value should be 90% of the previous tier | |
100 => 0.85, // price tier "100 or more", price value should be 85% of the previous tier | |
], | |
function($priceListId){ | |
// List of various entities, that a price list should be assigned to | |
return [ | |
$this->findEntityByClassAndId('AccountGroup', $priceListId); | |
$this->findEntityByClassAndId('Account', $priceListId); | |
$this->findEntityByClassAndId('Account', $priceListId + 1); | |
$this->findEntityByClassAndId('Account', $priceListId + 2); | |
]; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment