Checkout displayData $d
Posted: 04 Aug 2021, 10:07
Hi, we are using PhocaCart for a few weeks now and are more than happy with the functionality.
But now there is a problem, we cannot solve alone.
In the checkout we need to display the unitprice per kg. This was no problem in the items_grid.php where we used the base and baseformat values to calculate the price per kg.
But in the checkout in $d and therefore also in $v the values "base", "baseformat", "unit_amount" and "unit_unit" are not included, so I can find no way to calculate the unit price.
Can someone tell me, how I can get these values for each item in the checkout cart? Or where the $displayData is set for this view?
If it is possible, we would be happy not to overwrite a core file but only a layout.
Kind regards
Tanja
But now there is a problem, we cannot solve alone.
In the checkout we need to display the unitprice per kg. This was no problem in the items_grid.php where we used the base and baseformat values to calculate the price per kg.
But in the checkout in $d and therefore also in $v the values "base", "baseformat", "unit_amount" and "unit_unit" are not included, so I can find no way to calculate the unit price.
Can someone tell me, how I can get these values for each item in the checkout cart? Or where the $displayData is set for this view?
If it is possible, we would be happy not to overwrite a core file but only a layout.
Kind regards
Tanja