Making discount box
- http://test.dambo.me/item/ekran-reznoy-no17
Configure computed field with machine_name:field_discount
Computed Code (PHP)if ($entity->list_price > $entity->sell_price && $entity->list_price > '0.00'){
$entity_field[0]['value']= ($entity->list_price - $entity->sell_price)* 100 / $entity->list_price;
}
else{
$entity_field[0]['value']='';}