php - How to add a custom Fixed Product Tax / Weee to a quote item -


i'm using observer sales_quote_collect_totals_before try change tax of added product.
know can change tax settaxclassid product has multiple taxes need use fixed product tax (weee).
tried:

$items = $observer->getevent()->getquote()->getallvisibleitems(); foreach($items $item) {     $product = $item->getproduct();     $product->setpercent19(                 [                     [                         "website_id" => 0,                         "country" => "nl",                         "state" => "*", // optional                         "price" => 4.5                      ]                 ]             );      $product->setpercent6(                 [                     [                         "website_id" => 0,                         "country" => "nl",                         "state" => "*", // optional                         "price" => 1.2                      ]                 ]             ); 

but nothing happens.
tried adding $product->save(), changes product tax prices correct changing product not solution because there lot of customers using website.

any ideas how change hte fpt product in shopping cart?


Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -