VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ksfbjoern on December 08, 2014, 18:01:32 PM

Title: Show price for a second time in the product details (VM3)
Post by: ksfbjoern on December 08, 2014, 18:01:32 PM
Good evening,

i got a problem to show the productprice twice in the product details.

I tryed to paste the following code to the place in the template where the price should be shown for a second time:

<?php
echo shopFunctionsF::renderVmSubLayout('rating',array('showRating'=>$this->showRating,'product'=>$this->product));

if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment '<br />';
    }
}

//In case you are not happy using everywhere the same price display fromat, just create your own layout
//in override /html/fields and use as first parameter the name of your file
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
?>


It works on the first view, but it sadly doesn't calulates the custom fields, which every product has. It always shows the base-price without any modifications.

I am pleasant for every hint to solve this.

Greetings