From using commerce_price_savings_formatter, I've created field field_diskon
where it only contains number. field_diskon
purpose is for discount rate.
So, I can assign different discount rate for different SKU.
For getting value in field_specific_blabla
attached to node, I can use:
// Extract the first field item
$specific_items = field_get_items('node', $node, 'field_specific_blabla');
$specific_item = array_shift($specific_items);
// Get the field value
$start_rent$itemvalue = $specific_item['value'];
But how to get value field_diskon
attached to commerce product field?
I have no idea what entity hold commerce field. I've tried replacing node
with keyword related to commerce, but still not works.