Hello guys, I have spent so many hours on this it's not even funny.
I'm building a site for a client and I have managed to iron out many major and minor things but I can't for the life of me fix this little tiny thing:
In
Category view, I want my baseprice price (which, after some tweeking, now shows up only when it should, and has a line-through) and then
without breaking line, the discount price. What I have now is this:
QuoteFrom: 8,50 €
7,50 €
I need:
QuoteFrom: 8,50 € 7,50 €
I thought it would be easy but I keep messing it up, if anyone can help I would appreciate it...
Joomla 2.5.27
VM 2.6.8
This is my /components/com_virtuemart/views/category/tmpl/default.php the pricing part:
<div class="product-price marginbottom12" id="productPrice<?php echo $product->virtuemart_product_id ?>">
<?php
if ($this->show_prices == '1') {
if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and !$product->images[0]->file_is_downloadable) {
echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
}
//todo add config settings
if ($this->showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $product->prices);
}
echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $product->prices);
if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {
echo '<div class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</div>";
}
if (round($product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {
echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $product->prices);
}
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
$unitPriceDescription = JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', $product->product_unit);
echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $product->prices);
} ?>
</div>
Can anyone at least tell me if I'm looking at the right place for what I want?
Maybe use css margins applied to the div containing the price you wish to move. Test with Firebug.
live site would help
but make what ever is surrounding the prices (span?) inline - if that doesn't work check the container is wide enough
or try float them
Thanks guys... I will try to find the relevant spans...
By the way, live url is http://kidzbooks.tserts.info/book/first-reading-level-1 the first product is on offer.
not easy - needs
.product-price {
width: 80%;
}
.price-crossed {
display: inline !important;
}
.PricebasePriceWithTax {
display: inline !important;
}
.PricesalesPrice {
display: inline !important;
float: right;
width: 50px;
}
might be easier to alter your html
[attachment cleanup by admin]