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

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -