# Preis aufteilen

**URL:** <https://forum.shopware.com/t/preis-aufteilen/22760>\
**Category:** Shopware 3.5\
**Tags:** themes--design\
**Created:** [4. Oktober 2014 um 15:19 UTC](https://forum.shopware.com/t/preis-aufteilen/22760 "2014-10-04T15:19:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [4. Oktober 2014 um 15:19 UTC](https://forum.shopware.com/t/preis-aufteilen/22760/1 "2014-10-04T15:19:17Z")

</div>

Moin moin, ich möchte gerne meinen Preis aufteilen, sodass ich die Kommastelle einzeln habe. Also bspw. 1,99 -\> 1 und dann noch einmal 99 Var dump gibt mir hier den vollen Preis aus ` ["price"]=\> string(5) "1,00` Normalerweise in reinem PHP wäre es c.a so `$price\_parts = explode(',', $price); echo $price\_parts[0] . $price\_parts[1];` Allerdings weiss ich gerade nich wie ich das in smarty machen sollte 🙂 `{ $price = $sArticle.price } { $price\_parts = explode(',', $price) } { $price\_parts[0] . $price\_parts[1] }` Da spuckt er mir alles als echo aus.

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [4. Oktober 2014 um 16:56 UTC](https://forum.shopware.com/t/preis-aufteilen/22760/2 "2014-10-04T16:56:20Z")

</div>

Ok Problem solved: `{$price = $sArticle.price} {assign var=price value=","|explode:$price} {$price[0]}`
