I think this is going about it the wrong way.
Just use the hook in the module.
Add Hook
$this->registerHook('actionPresentCart');
https://devdocs.prestashop-project.org/1.7/modules/concepts/hooks/list-of-hooks/
* find actionPresentCart for more info.
And hook function
public function hookActionPresentCart($params) { $presentedCart = $params; /* add your function for find values */ $presentedCart['presentedCart']['subtotals']['shipping']['handling_cost_enabled'] = false; $presentedCart['presentedCart']['subtotals']['shipping']['handling_cost'] = floatval('5'); }
Tested in cart-summary-subtotals.tpl
{$cart.subtotals.shipping|@var_dump}
result: