Skip to content
Code-Schnipsel Gruppen Projekte
Commit c4fc8942 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen
Übergeordneter fa49a8e6
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -25,8 +25,8 @@
</locale>
<locale name="price.starting.from">
<de><![CDATA[ab [price]]]></de>
<en><![CDATA[starting from [price]]]></en>
<de><![CDATA[ab]]></de>
<en><![CDATA[starting from]]></en>
</locale>
<locale name="article.list.articles.title">
......
......@@ -27,11 +27,6 @@ class Price
*/
protected $Currency;
/**
* @var bool
*/
protected $startingPrice = false;
/**
* Flag for Price from
* @var bool
......@@ -89,8 +84,7 @@ public function toArray()
'price' => $this->value(),
'currency' => $this->getCurrency()->getCode(),
'display' => $this->getDisplayPrice(),
'startingprice' => $this->isStartingPrice(),
'isMinimalPrice' => $this->isMinimalPrice
'isMinimalPrice' => $this->isMinimalPrice()
];
}
......@@ -121,26 +115,7 @@ public function value()
*/
public function getDisplayPrice()
{
$price = $this->Currency->format($this->getPrice());
if ($this->isStartingPrice()) {
return $this->User->getLocale()->get(
'quiqqer/erp',
'price.starting.from',
['price' => $price]
);
}
return $price;
}
/**
* Change the price to a starting price
* The price display is like (ab 30€, start at 30$)
*/
public function changeToStartingPrice()
{
$this->startingPrice = true;
return $this->Currency->format($this->getPrice());
}
/**
......@@ -193,14 +168,6 @@ public function getCurrency()
return $this->Currency;
}
/**
* @return bool
*/
public function isStartingPrice()
{
return $this->startingPrice;
}
/**
* calculation
*/
......
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