News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How move price

Started by pkubik, January 28, 2018, 00:23:13 AM

Previous topic - Next topic

pkubik

Hi,

Please,  how to move the currency for the price of the goods. to make it the same as the line above. as shown in Annex. See http://obchod.i-nehty.cz/nehtove-tipy-pro-doplneni-mlecne-1/nehtove-tipy-zahnute-sacek-50-ks-vel-0

Thanks.

default_showprices.php

defined ('_JEXEC') or die('Restricted access');
?>
<?php if ($this->product->prices['salesPrice']>0) { ?>
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
<?php
$discont $this->product->prices['discountAmount'];
$discont abs($discont);
//print_r($this->product);
//if (!empty($this->product->prices['salesPrice'])) {
//echo "<strong>" . JText::_ ('COM_VIRTUEMART_CART_PRICE') . "</strong></br>";
//}
//print_r($product->prices);
if ($this->showBasePrice) {
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['basePriceVariant'][1]) != $this->product->prices['basePriceVariant']) {
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 ($discont 0){
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice'] && $this->product->prices['basePriceWithTax'] >0) {
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);
}
//print_r(round($this->product->prices['basePrice']));
//print_r(round($this->product->prices['salesPrice']));

if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['salesPrice'][1]) != round($this->product->prices['salesPrice'],$this->currency->_priceConfig['salesPrice'][1]) && (round($this->product->prices['basePrice'] >= $this->product->prices['salesPrice']))) {
echo '<span class="price-crossed" >'.$this->currency->createPriceDiv ('basePrice'''$this->product->prices).'</span>';
}  
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 ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices);
//echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);
$unitPriceDescription JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE'JText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$this->product->product_unit));
echo $this->currency->createPriceDiv ('unitPrice'$unitPriceDescription$this->product->prices);

?>

</div>
<?php } else {
if ($this->product->prices['salesPrice']<=and VmConfig::get ('askprice'1) ) {

?>
<div class="call-a-question">
<?php 
$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="call ask-a-question askquestion2" data-fancybox-type="iframe" href="<?php echo $askquestion_url ?>" title="<?php echo JText::_('VIRTUEMART_PRODUCT_ENQUIRY_LBL'?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE'?></a>

</div> <?php } } ?>



and default.php

//print_r($this->product->prices['product_price_publish_down']);
if (!$this->product->prices['override'] || ($this->product->prices['override'] && $this->product->prices['product_price_publish_down'] <= 0)){ ?>
            <div class="price">
<?php
echo $this->loadTemplate('showprices');   
?>

             </div> 
              <?php // Product Packaging END
                
?>

                <?php if ($this->product->prices['override']  == && ($this->product->prices['product_price_publish_down'] > 0)){
//print_r($this->product->prices['product_price_publish_down']);
?>

                <div class="time-box">
                                <div class="indent">
                             
                               
                                     
                                <?php if (( !empty($this->product->prices['salesPrice'])) && !$this->product->images[0]->file_is_downloadable) { ?>
                                <div class="price"> 
                                    <div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
                                     
                                    <?php
                                        
if ($this->product->prices['salesPrice']>0) { ?>

                                    <span class="price-sale">
                                    <span class="text"><?php echo JText::_('DR_SPECIAL_DEAL_PRICE'); ?>:</span>
<?php echo '<span class="sales">' $this->currency->createPriceDiv('salesPrice','',$this->product->prices) . '</span>';?>
                                    </span>
                                    <?php ?>
                                    <?php
                                        
if ($this->product->prices['basePrice']>0) { ?>

                                    <span class="price-old">
                                    <span class="text"><?php echo JText::_('DR_OLD_PRICE'); ?>:</span>
<?php echo '<span class="WithoutTax">' $this->currency->createPriceDiv('basePrice','',$this->product->prices) . '</span>';?>
                                    </span>
                                    <?php ?>
                                       
                                    <span class="price_save">
                                     <span class="text"><?php echo JText::_('DR_YOU_ARE_SAVING'); ?>:</span>
<?php echo '<span class="discount">' $this->currency->createPriceDiv('discountAmount','',$this->product->prices) . '</span>'?>
                                    </span>
                                   
                                    <div class="clear" ></div>
                                    </div>                                   

jenkinhill

Remove the left float for .PricesalesPrice with a css override, and maybe add a small left margin.  http://forum.virtuemart.net/index.php?topic=116620.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

pkubik

thanks, that's it. It works.