Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
2 corrected format
source | link

I managed to changed the sub total for any item, here is the code:

        $item->setCustomRowTotalPrice($item->getCustomPrice() * $item->getQty());
        $item->setRowTotal($item->getCustomPrice() * $item->getQty());
        $item->setBaseRowTotal($item->getCustomPrice() * $item->getQty());

This should be ok. This code couldn't work properly if you are running the function

calcRowTotal()

which calculate again the sub total for each item in the cart again overwriting your change.

Let me know if you have luck.

I managed to changed the sub total for any item, here is the code:

        $item->setCustomRowTotalPrice($item->getCustomPrice() * $item->getQty());
        $item->setRowTotal($item->getCustomPrice() * $item->getQty());
        $item->setBaseRowTotal($item->getCustomPrice() * $item->getQty());

This should be ok. This code couldn't work properly if you are running the function

calcRowTotal()

which calculate again the sub total for each item in the cart again overwriting your change.

Let me know if you have luck.

I managed to changed the sub total for any item, here is the code:

$item->setCustomRowTotalPrice($item->getCustomPrice() * $item->getQty());
$item->setRowTotal($item->getCustomPrice() * $item->getQty());
$item->setBaseRowTotal($item->getCustomPrice() * $item->getQty());

This should be ok. This code couldn't work properly if you are running the function

calcRowTotal()

which calculate again the sub total for each item in the cart again overwriting your change.

Let me know if you have luck.

1
source | link

I managed to changed the sub total for any item, here is the code:

        $item->setCustomRowTotalPrice($item->getCustomPrice() * $item->getQty());
        $item->setRowTotal($item->getCustomPrice() * $item->getQty());
        $item->setBaseRowTotal($item->getCustomPrice() * $item->getQty());

This should be ok. This code couldn't work properly if you are running the function

calcRowTotal()

which calculate again the sub total for each item in the cart again overwriting your change.

Let me know if you have luck.