Hi everyone,
I'm using Joomla 3.3.6 and Virtuemart 3.0.6.2 and PHP 5.5.22.
After reading a lot of forums (in this forum too) I tried this change in all the ways I could, but they doesn't work for me.
I tried the following codes:
<?php
if( !empty( $products_sku )) { ?>
Product SKU:<?php echo $products_sku ?>
<div class="product-sku">
<?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_SKU'); ?> :
<?php echo $this->product->product_sku; ?>
<>
<?php //Modifica Prodotto SKU
if($product->product_sku) echo JText::_ ( 'COM_VIRTUEMART_PRODUCT_SKU' ).": ".$product->product_sku;
?>
<?php
// Product SKU
echo $this->product->product_sku
?>
I used them as an override: mydomain/html/com_virtuemart/productdetails
and I used them in the original file: mydomain/components/com_virtuemart/views/productdetails
But nothing is changing in my product pages.
Please, could you help me and show me where I'm wrong?
A product page of my test site here http://www.easylabs.it/test/en/negozio/giochi-adattati/pesciolino-freddie-bolle-di-sapone-detail (http://www.easylabs.it/test/en/negozio/giochi-adattati/pesciolino-freddie-bolle-di-sapone-detail)
Thank you for your help,
chrisrbk
correct is
<?php echo '<span class="bold">'.JText::_("COM_VIRTUEMART_PRODUCT_SKU").'</span> : '.$this->product->product_sku; ?>
if nothing is showing are u even sure your over ride is working?
add
<!--MY proddetails over ride-->
in the over ride html
check the source to make sure it's there
Thank you so much GJC,
your code is perfect and I finally found that my template already had all php files overridden in "my_domain/templates/my_template/html/com-virtuemart" folder.
And now it works fine!
Please, could I also ask you how should I change the code below (part of productdetails deafult.php) if I would like to have Base price in first position in place of Sales Price?
Or should I open a new post?
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
<?php
if ($this->product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
$askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component', FALSE);
?>
<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
} else {
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);
if ($this->product->prices['discountedPriceWithoutTax'] != $this->product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
} else {
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
}
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices);
echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices);
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}
if (round($this->product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices);
}
echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices);
echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);
$unitPriceDescription = vmText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', vmText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$this->product->product_unit));
echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $this->product->prices);
}
?>
</div>
Thank you for your previous help and in case you could help me for this issue.
Best,
chrisrbk
just move
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
to after
}else{