News:

Looking for documentation? Take a look on our wiki

Main Menu

Need to display the words 'price' instead of 'array'

Started by ch1vph, June 18, 2019, 17:09:34 PM

Previous topic - Next topic

ch1vph

Hi there,

Having an issue implementing this code on these two posts:

http://forum.virtuemart.net/index.php?topic=139957
http://forum.virtuemart.net/index.php?topic=140113.msg492302#msg492302

As I need to display the words 'price' instead of 'array'

Below is the code I've added from the above posts and the wording 'array' has been removed, but I'm unsure how to get my specific words of 'Price' to display?

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

foreach ($this->productDisplayTypes as $type=>$productDisplayType) {

foreach ($productDisplayType as $productDisplay) {

foreach ($productDisplay as $virtuemart_method_id =>$productDisplayHtml) {
?>

<div class="<?php echo substr($type0, -1?> <?php echo substr($type0, -1).'-'.$virtuemart_method_id ?>">
<?php
echo $productDisplayHtml;
?>

</div>
<?php
}
}
}

StefanSTS

It would be easier to understand what you are trying to achieve, if you make a screenshot and add some info to that.

I am not sure which price you are talking about.

The code should add the shipping cost, do you need a lable for that?
Or are you talking about the product price which is written below that?

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

PRO

is the plugin etc returning an array? or  &$html   ?

what is it supposed to display?

ch1vph

Thanks guys I found an older default file with the in stock out of stock option instead of just the words price!

<?php
if ($product->product_in_stock >=1) {
echo 
'<div class="stock"><span class="bold">'.JText::_('').'</span><i class="green">'.JText::_('IN STOCK').'</i> </div>';
}else {
echo 
'<div class="stock"><span class="bold">'.JText::_('').'</span><i class="red">'.JText::_('OUT OF STOCK').'</i> </div>';
}
?>