News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Show twice the price at the product details page

Started by depika, October 24, 2016, 15:41:50 PM

Previous topic - Next topic

depika

I have many custom fields at the product details page and as a result the price which is on top is not displaying next to the quantity and add to cart button.

I have the code
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));

on top of the product details template and then I added this code at the sublayout addtocart.php
echo shopFunctionsF::renderVmSubLayout('prices1',array('product'=>$product,'currency'=>$currency));

but I am getting this error
Fatal error: Call to a member function createPriceDiv() on null in prices.php on line 36

I created a new prices1.php and I tried changing the div from salesPrice to salesPrice1 because I thought this was the problem but still the same problem.

I would appreciate your help.

depika

Line 36 is the following

echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);

Ghost

echo shopFunctionsF::renderVmSubLayout('prices1',array('product'=>$product,'currency'=>CurrencyDisplay::getInstance()));

depika

Quote from: Ghost on October 25, 2016, 09:46:31 AM
echo shopFunctionsF::renderVmSubLayout('prices1',array('product'=>$product,'currency'=>CurrencyDisplay::getInstance()));

Thank you!! It worked