Hi,
Hope someone can help.
I have a number of products that have children to allow a drop down to select a specific product bundle, each with a different price.
All works fine. On the product page it displays the short description and then a price (which is the base price for the smallest bundle)
I want to add text before the price, on the same line, before the price - ie "Prices starting at" and then displaying the price.
Where would be the best place to modify the code.
Thanks
meant to include version 3.2.14
image? page? your desc is unclear to me
Hi,
Sorry for lack of clarity.
Screen grab attached that should help clarify.
Thanks
depends entirely on your template but on mine it would be
<?php
// Product Short Description
if (!empty($this->product->product_s_desc)) {
?>
<div class="product-short-description small well well-sm">
<?php
echo nl2br($this->product->product_s_desc);
?>
</div>
<?php
} // Product Short Description END
// add additional text here - either a module position, hardcoded or VMcustom field
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
Hi,
Thanks GJC - you have helped point me in the right direction.
I have modified the products.php file as shown below. I have just added the text I wanted to the line <?php //echo $rowsHeight[$row]['price'] ?>
It puts the copy above the price which is workable for now - just need to work out how to get it on the same line as the price.
Thanks again - my first joomla/virtuemart project so just learning my way around how it all works.
Julian
<div class="vm-product-descr-container-<?php echo $rowsHeight[$row]['product_s_desc'] ?>">
<h2><?php echo JHtml::link ($product->link.$ItemidStr, $product->product_name); ?></h2>
<?php if(!empty($rowsHeight[$row]['product_s_desc'])){
?>
<p class="product_s_desc">
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 300, ' ...') ?>
<?php } ?>
</p>
<?php } ?>
</div>
Prices Starting From:- <?php //echo $rowsHeight[$row]['price'] ?>
<div class="vm3pr-<?php echo $rowsHeight[$row]['price'] ?>"> <?php
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$product,'currency'=>$currency)); ?>
<div class="clear"></div>
</div>
<?php //echo $rowsHeight[$row]['customs'] ?>
<div class="vm3pr-<?php echo $rowsHeight[$row]['customfields'] ?>"> <?php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart'))); ?>
</div>
can't u add Prices Starting From:- to the lang constant of the price label and display the label ( set in admin)
Hi GJC,
thanks for the suggestion - at this stage not sure where to look for the price label to change it. When I get a few minutes will investigate.
Any pointers would be appreciated.
Thanks
Julian
http://forum.virtuemart.net/index.php?topic=113895.0
Hi,
Thanks Kelvyn.
Appreciate the links, etc.
I had used the language overides to alter the text on one of the buttons.
What I am not sure about is string would be for price and if there is one for where this appears on the page. All that is displayed is £9.95 for example no other text, hence why I am not sure what to look for.
If there was already text being displayed before the price then I could understand this solution.
A better screen grab is attached. Just want to get the words "Prices from-" on the same line before the actual price displayed.
Any further pointers would be much appreciated.
Thanks
Julian
COM_VIRTUEMART_PRODUCT_SALESPRICE