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

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -