Skip to content

Instantly share code, notes, and snippets.

@inspiran
Created February 27, 2011 20:38
Show Gist options
  • Save inspiran/846517 to your computer and use it in GitHub Desktop.
Save inspiran/846517 to your computer and use it in GitHub Desktop.
//Determine how the price will be calculated
$pricingSetConfiguration->addPricingExecutionStep(
new SetPricingElementFromContainerValue(
array('container' => 'net_value',
'pricing_element' => 'net_value')));
$pricingSetConfiguration->addPricingExecutionStep(
new SetValue(
array('container' => 'packaging_cost_factor',
'value' => '0.05')));
$pricingSetConfiguration->addPricingExecutionStep(
new ContainerCompute(
array('expression' => 'net_value * 100 / packaging_cost_factor'),
array('target', 'packaging_cost')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment