News:

Looking for documentation? Take a look on our wiki

Main Menu

Cant find block of code - need Mr Sherlock

Started by Athlon, July 28, 2014, 12:33:52 PM

Previous topic - Next topic

Athlon

Hi guys,

I went through all (ok most of them) core files, defaults, views, ect. and I cant find this part of the code below. The closest files with a similar code are:

/web/components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
and
/web/components/com_virtuemart/views/productdetails/tmpl/default.php

the last file default.php does have this template within;
<?php>
// Product Price
// the test is done in show_prices
//if ($this->show_prices and (empty($this->product->images[0]) or $this->product->images[0]->file_is_downloadable == 0)) {
echo $this->loadTemplate('showprices');
//}


within the code im trying to find spaces &nbsp;&nbsp;. I do not know if the space are mistakenly added somewhere - translation/setup/ or something, but it messes up the style


<?php> blablabla
<div id="s5_component_wrap_inner">
<div id="system-message-container"></div>
<div class="productdetails-view productdetails">
<div class="product-neighbours">
<a class="previous-page" rel="prev" href="/component/virtuemart/view/productdetails/virtuemart_product_id/1647/virtuemart_category_id/191">...Product Desc...</a>
<a class="next-page" rel="next" href="/component/virtuemart/view/productdetails/virtuemart_product_id/1649/virtuemart_category_id/191">...Product Code...</a>
<div class="clear"></div>
</div>
<div class="back-to-category">
<a title="TITLE IS HERE" class="product-details" href="/component/virtuemart/view/category/virtuemart_category_id/191">... Back to Category...</a>
</div>
<h1>PRODUCT TITLE</h1>
<div class="product-mpn">MPN: FA9021A053.1100</div>
<div class="product-sku">PKU: 11211137</div>
<div>
<div class="width60 floatleft">
<div class="main-image">
<img id="vm_display_image" alt="Nie je natavený žiaden obrázok " src="../components/com_virtuemart/assets/images/vmgeneral/noimage.gif">
<div class="clear"></div>
</div>
</div>


<div class="width40 floatright">
<div class="spacer-buy-area">
<div id="productPrice1648" class="product-price">
<strong>Cena</strong>
<div style="display : none;" class="PricevariantModification">Modifikátor ceny variantu<span class="PricevariantModification"></span>
</div>
<span class="price-crossed">
HERE >>>>>> <div style="display : block;" class="PricebasePriceWithTax">&nbsp;&nbsp;Základná cena s DPH
<span class="PricebasePriceWithTax">34,60 €</span>
</div>
</span>
HERE >>>>>> <div style="display : block;" class="PricesalesPrice">&nbsp;&nbsp;Predajná cena s DPH&nbsp;&nbsp;
<span class="PricesalesPrice">31,14 €</span>
</div>
HERE >>>>>> <div style="display : block;" class="PricediscountedPriceWithoutTax">&nbsp;&nbsp;Predajná cena bez DPH
<span class="PricediscountedPriceWithoutTax">25,95 €</span>
</div>
HERE >>>>>> <div style="display : block;" class="PricediscountAmount">&nbsp;&nbsp;Zľava&nbsp;
<span class="PricediscountAmount">-3,46 €</span>
</div>
</div>
<div class="addtocart-area">
<form action="/component/virtuemart/" class="product js-recalculate" method="post">
<input type="hidden" value="1" name="quantity">
<div class="addtocart-bar">

..etc etc




Thanks again
Currently using VM2.6.6 on Joomla 2.5.20 PHP 5.3.28

GJC Web Design

simpler to

echo str_replace('&nbsp;',''$this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices));

in your  default_showprices.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Athlon

#2
GJC Web Design thanks for the input, however can you elaborate a bit further into this?

this is my line from default_showprices.php

echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);
   
In the whole default_showprices.php file, i do not have &nbsp
but in the output yes

PHP Code
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>"
   
HTML Code

<span class="price-crossed">
<div class="PricebasePriceWithTax" style="display : block;">&nbsp;&nbsp;Základná cena s DPH
<span class="PricebasePriceWithTax">34,60 €</span>
</div><
/span>

Currently using VM2.6.6 on Joomla 2.5.20 PHP 5.3.28

GJC Web Design

I have no idea where your &nbsp; is being generated  - it isn't thee on a standard install - but if for some reason you don't like them and your lazy like me just replace them as in the code I gave

echo '<span class="price-crossed" >' .str_replace('&nbsp;',''$this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices)).'</span>';
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Athlon

Thanks GJC Web Design.
Can't find the source of the problem, I think it might be something with translation.
However, I've implemented "the style" in my style.

Thanks again
Currently using VM2.6.6 on Joomla 2.5.20 PHP 5.3.28