Hallo zusammen
Im Produkt-Layout unter den Stilvorlagen, werde bei den Artikel-Details die Artikel Abmessungen und das Gewicht mit 4 Nachkommastellen angezeigt.
Dies erfolgt über folgende Syntax:
PHP
- <h4><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DIMENSIONS_AND_WEIGHT') ?></h4>
- <?php
- if ($this->product->product_length > 0) {
- echo '<div>'.JText::_('COM_VIRTUEMART_PRODUCT_LENGTH').': ' .$this->product->product_length.$this->product->product_lwh_uom.'</div>';
- }
- if ($this->product->product_width > 0) {
- echo '<div>'.JText::_('COM_VIRTUEMART_PRODUCT_WIDTH').': ' .$this->product->product_width.$this->product->product_lwh_uom.'</div>';
- }
- if ($this->product->product_height > 0) {
- echo '<div>'.JText::_('COM_VIRTUEMART_PRODUCT_HEIGHT').': ' .$this->product->product_height.$this->product->product_lwh_uom.'</div>';
- }
- if ($this->product->product_weight > 0) {
- echo '<div>'.JText::_('COM_VIRTUEMART_PRODUCT_WEIGHT').': ' .$this->product->product_weight.$this->product->product_weight_uom.'</div>';
- }
- if ($this->product->product_packaging > 0) {
- echo '<div>'.JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING').': ' .$this->product->product_packaging.$this->product->product_unit.'</div>';
- }
- if ($this->product->product_box) {
- ?>
Artikel Abmessungen und Gewicht
Produktlänge: 4.0000CM
Produktbreite: 4.0000CM
Produkthöhe: 5.0000CM
Produktgewicht: 0.5000KG
Produktverpackung: 0.5000KG
Artikeleinheiten pro Packung: 6
Wie kann die Anzeige auf 3 Nachkommastellen reduzieren?
Schön wäre auch, wenn zwischen dem jeweiligen Wert und der Bezeichnung (CM/KG) ein Leerzeichen wäre.