News:

Support the VirtueMart project and become a member

Main Menu

Crossed price in modules no display

Started by 1piksel, March 28, 2017, 11:12:29 AM

Previous topic - Next topic

1piksel

Hello,
Need help with price display in module.

On the home page www.dominobutik.pl are two modules. The first "NEWS" in Polish NOWOĊšCI the second "RECOMMENDED" in Polish POLECANE.
He wants the prices in the modules to display as in the SHOP (SKLEP) tab.
On the home page in modules, base prices and taxes are not displayed. The base price and the tax are to be crossed in red.

I found a file called single.php

It looks to me like this:

<?php // no direct access
defined'_JEXEC' ) or die('Restricted access');
vmJsApi::jPrice();
?>


<div class="vmgroup<?php echo $params->get'moduleclass_sfx' ?>">

<?php if($headerText) { ?>
<div class="vmheader"><?php echo $headerText ?></div>
<?php ?>

<div class="vmproduct<?php echo $params->get'moduleclass_sfx' ); ?> productdetails">
<?php foreach( $products as $product ) { ?>
<div style="text-align:center;">
<div class="spacer">
<?php
if(!empty($product->images[0]))
$image $product->images[0]->displayMediaThumb'class="featuredProductImage" 'false );
else $image '';

echo JHTML::_'link'JRoute::_'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id ), $image, array('title' => $product->product_name) );
echo '<div class="clear"></div>';

$url JRoute::_'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.
$product->virtuemart_category_id ); ?>

<a href="<?php echo $url ?>"><?php echo $product->product_name ?></a>

<div class="clear"></div>

<?php // $product->prices is not set when show_prices in config is unchecked
echo '<div class="productdetails">';
if($show_price and isset($product->prices)) {
echo '<div class="product-price">';
echo $currency->priceDisplay($product->prices['salesPrice']);
if(!empty($product->prices['salesPrice'])) echo $currency->createPriceDiv'salesPrice'''$product->pricestrue );
if ($product->prices['salesPriceWithDiscount']>0) echo $currency->priceDisplay($product->prices['salesPriceWithDiscount']);
if(!empty($product->prices['salesPriceWithDiscount'])) echo $currency->createPriceDiv'salesPriceWithDiscount'''$product->pricestrue );
if(!empty($product->prices['basePrice'])) echo $currency->createPriceDiv'basePrice'''$product->pricestrue );
echo $currency->priceDisplay($product->prices['basePrice']);
if(!empty($product->prices['basePriceWithTax'])) echo $currency->createPriceDiv'basePriceWithTax'''$product->pricestrue );
echo $currency->priceDisplay($product->prices['basePriceWithTax']);

echo '</div>';

}
if($show_addtocart) echo shopFunctionsF::renderVmSubLayout'addtocart', array('product' => $product) );
echo '</div>';
?>

</div>
</div>

<?php ?>
<?php if($footerText) { ?>
<div class="vmheader"><?php echo $footerText ?></div>
<?php ?>
</div>
</div>



Mod edit:  impatient bump message removed. Please read http://forum.virtuemart.net/index.php?topic=104795.0