I have the same problem as described here , but the solutions below do not work. I have the option "Trading Product".
I also change the price using this hook,
function mectronic_get_amount_qty($price, $length) { //print '<pre>P ' . print_r($price, 1) . '</pre>'; //print '<pre>L ' . print_r($length, 1) . '</pre>'; if ($length >= 1 && $length <= 5) return $price; elseif ($length >= 6 && $length <= 10) return $price * (1 - 0.166666667); elseif ($length > 10) return $price * (1 - 0.285714286); }
I tried
$entity->commerce_pricing_attributes[$set_id['set_id']][$field_name] = $price;
Like in # 4, but it does not work.
drupal drupal-7 drupal-hooks drupal-commerce
Alex borsody
source share