isotope 2.2.3 "Preis" und "Artikelnummer" anzeigen
Hi Leute,
habe schon wieder so ein Problem, wie bei Rechnungsnummer:
Wie kann ich auf der Seite vor dem Preis in Zahlen das Label "Preis" anzeigen lassen?
Ebenso würde ich gerne das Label "Art-Nr." vor der Artikelnummer anzeigen lassen.
Grüße aus Ludwigsburg
Jochen Kubik
Weitere Angaben Isotope 2.1
Nach dem das jetzt so gut funktioniert hat - ich weiß das Problem (?) sollte sich mit 2.3 erledigt haben, jedoch würde es mich interessieren, ob es möglich ist, im Warenkorb das Label der Steuerklasse und optimalerweise den Steuerbetrag bei den einzelnen Posten zu zeigen.
In Abhängigkeit zur Tax-ID z.B. "inkl. 19% MwSt." oder / "inkl. 19% Mehrwertsteuer" = Betrag € x.yy
Warenkorb - Edit und Delete Links mit Icons
Dazu wirst du einige Änderungen im Template vornehmen müssen.
Leg dir dazu ein eigenes "iso_collection_xxx.html5" Template an und ändere den Abschnitt mit den Edit & Delete Links. Hier im Beispiel mit den Icons von FontAwesome:
PHP-Code:
<?php if($this->isEditable): ?>
<div class="edit-delete">
<?php if ($item['edit_href']): ?>
<a href="<?php echo $item['edit_href']; ?>" class="edit" title="<?php echo $item['edit_title']; ?>"><i class="fa fa-pencil" aria-hidden="true"></i></a>
<?php endif; ?>
<a href="<?php echo $item['remove_href']; ?>" class="remove" title="<?php echo $item['remove_title']; ?>"><i class="fa fa-trash" aria-hidden="true"></i></a>
</div>
<?php endif; ?>
Alles weiter ist CSS
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo Ainschy
Ich wollte es in den beiden folgenden Templates anpassen:
iso_collection_default.html5
<?php if ($this->textOnly): ?>
<?php ### THIS IS FOR TEXT ONLY EMAILS ### ?>
<?php foreach ($this->items as $item ): ?>
<?php echo $item['name']; ?><?php if (!empty($item['options'])): ?> (<?php $i=0; foreach ($item['options'] as $option): ?><?php echo ($i++==0 ? '' : ', ').$option['label']; ?>: <?php echo $option['value']; ?><?php endforeach; ?>)<?php endif; ?>: <?php echo $item['quantity']; ?> x <?php echo $item['price']; ?> = <?php echo $item['total']; ?>
<?php endforeach; ?>
--------------------
<?php echo $GLOBALS['TL_LANG']['MSC']['subTotalLabel']; ?>: <?php echo $this->subtotal; ?>
<?php foreach ($this->surcharges as $surcharge): ?>
<?php echo $surcharge['label']; ?>: <?php echo $surcharge['price']; ?> = <?php echo $surcharge['total_price']; ?>
<?php endforeach; ?>
<?php echo $GLOBALS['TL_LANG']['MSC']['grandTotalLabel']; ?>: <?php echo $this->total; ?>
<?php else: ?>
<?php ### THIS IS HTML EMAILS AND EVERYTHING ELSE ### ?>
<?php if($this->isEditable): ?>
<form action="<?php echo $this->action; ?>" id="<?php echo $this->formId; ?>" method="post">
<div class="formbody">
<input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>">
<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
<?php endif; ?>
<?php if ($this->collection->hasErrors()): ?>
<p class="error"><?php echo implode('</p><p class="error">', $this->collection->getErrors()); ?></p>
<?php endif; ?>
<table style="width: 700px;" border="0">>
<tbody>
<?php foreach($this->items as $item): $i=0; ?>
<tr class="<?php echo $item['rowClass']; ?>"><?php if(!$this->isNotification): ?>
<td class="col_<?php echo $i++; ?> col_first image"><?php echo $this->getGallery('images', $item['item'])->generateMainImage(); ?></td><?php endif; ?>
<td class="col_<?php echo $i++; ?><?php if($this->isNotification) echo ' col_first'; ?> name">
<?php if($this->linkProducts && $item['href']): ?><a href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a><?php else: ?><?php echo $item['name']; ?><?php endif; ?>
<?php if(!empty($item['options'])): ?>
<ul>
<?php foreach($item['options'] as $option): ?>
<li><strong><?php echo $option['label']; ?>:</strong> <?php echo $option['value']; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</td>
<td class="col_<?php echo $i++; ?> quantity">
<?php if($this->isEditable): ?>
<input name="quantity[<?php echo $item['id']; ?>]" type="text" class="text" value="<?php echo $item['quantity']; ?>" maxlength="10">
<?php else: ?>
<?php echo $item['quantity']; ?> x
<?php endif; ?>
</td>
<td class="col_<?php echo $i++; ?> price"><?php echo $item['price']; ?></td>
<td class="col_<?php echo $i++; ?> price total"><?php echo $item['total']; ?></td>
<td class="col_<?php echo $i++; ?> <?php if(!$this->isEditable) echo 'col_last '; ?>tax"><?php echo $item['tax_id']; ?></td><?php if($this->isEditable): ?>
<td class="col_<?php echo $i++; ?> col_last remove"><a href="<?php echo $item['remove_href']; ?>" title="<?php echo $item['remove_title']; ?>"><?php echo $item['remove_link']; ?></a></td><?php endif; ?>
</tr><?php if($item['item']->hasErrors()): ?>
<tr class="<?php echo $item['rowClass']; ?>">
<td colspan="<?php echo --$i; ?>"><p class="error"><?php echo implode('</p><p class="error">', $item['item']->getErrors()); ?></p></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
<?php
// we know this is invalid markup but nor Outlook nor TCPDF support putting <thead> or <tfoot> in front of <tbody>
// you're free to adjust the template to your needs
?>
<tfoot>
<tr class="foot_0 foot_first subtotal">
<?php $i=0; if(!$this->isNotification): ?>
<td class="col_<?php echo $i++; ?> col_first"> </td><?php endif; ?>
<td class="col_<?php echo $i++; $i++; ?><?php if($this->isNotification) echo ' col_first'; ?> name" colspan="2"><?php echo $GLOBALS['TL_LANG']['MSC']['subTotalLabel']; ?></td>
<td class="col_<?php echo $i++; ?> price"> </td>
<td class="col_<?php echo $i++; ?> price total"><?php echo $this->subtotal; ?></td>
<td class="col_<?php echo $i++; ?> <?php if(!$this->isEditable) echo 'col_last '; ?>tax"> </td><?php if($this->isEditable): ?>
<td class="col_<?php echo $i++; ?> col_last remove"> </td><?php endif; ?>
</tr>
<?php foreach ($this->surcharges as $surcharge): $i=0; ?>
<tr class="<?php echo $surcharge['rowClass']; ?>">
<?php if(!$this->isNotification): ?>
<td class="col_<?php echo $i++; ?> col_first"> </td><?php endif; ?>
<td class="col_<?php echo $i++; $i++; ?><?php if($this->isNotification) echo ' col_first'; ?> name" colspan="2"><?php echo $surcharge['label']; ?></td>
<td class="col_<?php echo $i++; ?> price"><?php echo $surcharge['price']; ?></td>
<td class="col_<?php echo $i++; ?> price total"><?php echo $surcharge['total_price']; ?></td>
<td class="col_<?php echo $i++; ?> <?php if(!$this->isEditable) echo 'col_last '; ?>tax"><?php echo $surcharge['tax_id']; ?></td><?php if($this->isEditable): ?>
<td class="col_<?php echo $i++; ?> col_last remove"> </td><?php endif; ?>
</tr>
<?php endforeach; ?>
<tr class="foot_<?php echo count($this->surcharges)+1; ?> foot_last total">
<?php $i=0; if(!$this->isNotification): ?>
<td class="col_<?php echo $i++; ?> col_first"> </td><?php endif; ?>
<td class="col_<?php echo $i++; $i++ ?><?php if($this->isNotification) echo ' col_first'; ?> name" colspan="2"><?php echo $GLOBALS['TL_LANG']['MSC']['grandTotalLabel']; ?></td>
<td class="col_<?php echo $i++; ?> price"> </td>
<td class="col_<?php echo $i++; ?> price total"><?php echo $this->total; ?></td>
<td class="col_<?php echo $i++; ?> <?php if(!$this->isEditable) echo 'col_last '; ?>tax"> </td><?php if($this->isEditable): ?>
<td class="col_<?php echo $i++; ?> col_last remove"> </td><?php endif; ?>
</tr>
</tfoot>
</table>
<?php if($this->isEditable): ?>
</div>
<?php if(!empty($this->buttons)): ?>
<div class="submit_container">
<?php foreach($this->buttons as $button): ?>
<input type="<?php echo $button['type']; ?>" class="<?php echo $button['type']; ?> <?php echo $button['name']; ?>" name="<?php echo $button['name']; ?>" id="ctrl_<?php echo $button['name']; ?>_<?php echo $this->id; ?>" value="<?php echo $button['label']; ?>">
<?php endforeach; ?>
</div>
<?php endif; ?>
</form>
<?php endif; ?>
<?php if (!$this->isEditable && count($this->downloads)): ?>
<div class="downloads">
<h2><?php echo $GLOBALS['TL_LANG']['MSC']['downloadsLabel']; ?></h2>
<ul>
<?php foreach ($this->downloads as $download): ?>
<li class="<?php echo $download['downloadable'] ? 'available' : 'unavailable'; ?>"><?php if ($download['downloadable']): ?><a href="<?php echo $download['href']; ?>"><?php endif; echo $download['title']; if ($download['downloadable']): ?></a><?php endif; echo $download['remaining']; ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php echo $this->custom; ?>
<?php endif; ?>
Und ebenfalls hier für den kleinen Warenkorb:
iso_collection_mini.html5
<?php foreach($this->items as $item): ?>
<div class="product"><?php if($this->isEditable): ?>
<div class="remove"><a href="<?php echo $item['remove_href']; ?>" title="<?php echo $item['remove_title']; ?>"><?php echo $item['remove_link']; ?></a></div><?php endif; ?>
<div class="name"><?php if($this->linkProducts && $item['href']): ?><a href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a><?php else: ?><?php echo $item['name']; ?><?php endif; ?></div>
<div class="info">
<?php if(!empty($item['attributes'])): ?>
<ul>
<?php foreach($item['attributes'] as $name => $value): ?>
<li><strong><?= $this->attributeLabel($name) ?>:</strong> <?= $this->attributeValue($name, $value, ['html'=>true, 'item'=>$item['item']]) ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<div class="price"><?php echo $item['quantity']; ?> x <?php echo $item['price']; ?> = <span class="total"><?php echo $item['total']; ?></span></div>
</div>
<div class="clear"> </div>
</div>
<?php endforeach; ?>
<div class="subtotal"><span class="label"><?php echo $GLOBALS['TL_LANG']['MSC']['subTotalLabel']; ?></span> <?php echo $this->subtotal; ?></div><?php if ($this->buttons['cart']): ?>
<div class="cart"><a class="button" href="<?php echo $this->buttons['cart']['href']; ?>"><?php echo $this->buttons['cart']['label']; ?></a></div><?php endif; if ($this->buttons['checkout']): ?>
<div class="checkout"><a class="button dark" href="<?php echo $this->buttons['checkout']['href']; ?>"><?php echo $this->buttons['checkout']['label']; ?></a></div><?php endif; ?>
Wenn ich da nach "remove" suche und dann deinen Schnipsel reinkopiere, dann sehe ich weder Text noch Icon.
Das "font-awesome" habe ich gemäss Beilage in die Dateiverwaltung eingeflegt.
Vielen Dank für Deine Hilfe und Unterstützung.
Grüsse
Michi