Skip to content
Code-Schnipsel Gruppen Projekte
Commit 763f405e erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

feat: Product add to basket has own HTML template.

feat: + and - implemented (with no function now).
Übergeordneter 61c9adaf
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -162,6 +162,10 @@
<de><![CDATA[Zum Warenkorb]]></de>
<en><![CDATA[To the Basket]]></en>
</locale>
<locale name="control.basket.quantity.text">
<de><![CDATA[Anzahl]]></de>
<en><![CDATA[Quantity]]></en>
</locale>
<locale name="ordering.btn.next">
<de><![CDATA[Übernehmen und weiter]]></de>
......
.quiqqer-order-button-add {
float: left;
overflow: hidden;
......@@ -8,10 +7,31 @@
white-space: nowrap;
}
.quiqqer-order-button-add-quantity {
margin-right: 10px;
display: flex;
}
.quiqqer-order-button-add input {
border: 1px solid #ddd;
line-height: 26px;
margin-right: 10px;
text-align: center;
width: 40px;
width: 60px;
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
}
.quiqqer-order-button-add-quantity-decrease {
margin-right: 5px;
}
.quiqqer-order-button-add-quantity-increase {
margin-left: 5px;
}
.quiqqer-order-button-add input::-webkit-outer-spin-button,
.quiqqer-order-button-add input::-webkit-inner-spin-button {
display: none;
-webkit-appearance: none;
margin: 0;
}
{if $this->getAttribute('input')}
<div class="quiqqer-order-button-add-quantity">
<span class="quiqqer-order-button-add-quantity-decrease btn">-</span>
<input type="number" value="1" min="1" class="quiqqer-order-button-add-quantity-input"
title="{locale group='quiqqer/order' var='control.basket.quantity.text'}"/>
<span class="quiqqer-order-button-add-quantity-increase btn">+</span>
</div>
{/if}
<span class="text btn btn-primary">
{locale group='quiqqer/order' var='control.basket.buttonAdd.text'}
</span>
\ No newline at end of file
......@@ -45,6 +45,8 @@ public function __construct($attributes = array())
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
if ($this->getAttribute('Product')) {
/* @var $Product QUI\ERP\Products\Product\Product */
$Product = $this->getAttribute('Product');
......@@ -61,16 +63,10 @@ public function getBody()
));
}
$html = '';
if ($this->getAttribute('input')) {
$html .= '<input type="number" value="1" title="Anzahl" min="1"/>';
}
$html .= '<span class="text btn btn-primary">'.
QUI::getLocale()->get('quiqqer/order', 'control.basket.buttonAdd.text').
'</span>';
return $html;
$Engine->assign([
'this' => $this
]);
return $Engine->fetch(dirname(__FILE__) . '/ProductToBasket.html');
}
}
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren