# Bepado - Pluginänderung

**URL:** <https://forum.shopware.com/t/bepado-pluginanderung/22013>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [22. August 2014 um 07:43 UTC](https://forum.shopware.com/t/bepado-pluginanderung/22013 "2014-08-22T07:43:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ottscho](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ottscho](https://forum.shopware.com/u/ottscho)\
**Post date:** [22. August 2014 um 07:43 UTC](https://forum.shopware.com/t/bepado-pluginanderung/22013/1 "2014-08-22T07:43:58Z")

</div>

Hallo, wir setzen Bepado ein und haben das Problem das die Artikel keinen Lagerbestand haben. Von Bepado wird dies nun als „nicht auf lager“ ausgegeben. Dies soll in den kommenden Updates gefixt bzw. einstellbar gemacht werden. Nun wollten wir vorübergehend manuell im Plugin eine Änderung machen um einfach einen positiven Bestand zu übermitteln. Hat jemand eine Idee wie man dies im Plugin manuell ändern kann. Bzw. kennt jemand die korrekte Stelle? Danke

---

<div class="post-metadata">

**Author:** ![dirk\_designverign](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@dirk\_designverign](https://forum.shopware.com/u/dirk_designverign)\
**Post date:** [22. August 2014 um 08:50 UTC](https://forum.shopware.com/t/bepado-pluginanderung/22013/2 "2014-08-22T08:50:04Z")

</div>

Bevor Du das Plugin veränderst, wie wäre es, einfach den Bestand anzuheben? `UPDATE s\_articles\_details SET instock = 100`

---

<div class="post-metadata">

**Author:** ![ottscho](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ottscho](https://forum.shopware.com/u/ottscho)\
**Post date:** [22. August 2014 um 09:07 UTC](https://forum.shopware.com/t/bepado-pluginanderung/22013/3 "2014-08-22T09:07:27Z")

</div>

das geht leider nicht. Der Kunde verwendet die Minus-Buchung als Statistik. Daher können wir dies nicht ändern. Die Idee ist ja an Bepado einfach ein positiver Bestand zu melden. /engine/Shopware/Plugins/Default/Backend/SwagBepado/Components/ProductQuery/LocalProductQuery.php ` /\*\* \* @param $row \* @return Product \*/ public function getBepadoProduct($row) { $row = $this-\>prepareCommonAttributes($row); if (!empty($row['shopId'])) { throw new NoLocalProductException("Product {$row['title']} is not a local product"); } // add default export category if (empty($row['categories'])) { $defaultExportCategory = $this-\>configComponent-\>getConfig('defaultExportCategory'); if ($defaultExportCategory) { $row['categories'][] = $this-\>configComponent-\>getConfig('defaultExportCategory'); } } $row['url'] = $this-\>getUrlForProduct($row['sourceId']); $row['images'] = $this-\>getImagesById($row['localId']); if ($row['deliveryWorkDays']) { $row['deliveryWorkDays'] = (int)$row['deliveryWorkDays']; } else { $row['deliveryWorkDays'] = null; } unset($row['localId']); if ($row['attributes']['unit'] && $row['attributes']['quantity'] && $row['attributes']['ref\_quantity']) { //Map local unit to bepado unit if ($row['attributes']['unit']) { $unitMapper = new UnitMapper($this-\>configComponent, $this-\>manager); $row['attributes']['unit'] = $unitMapper-\>getBepadoUnit($row['attributes']['unit']); } $intRefQuantity = (int)$row['attributes']['ref\_quantity']; if ($row['attributes']['ref\_quantity'] - $intRefQuantity \<= 0.0001) { $row['attributes']['ref\_quantity'] = $intRefQuantity; } } else { unset($row['attributes']['unit']); $row['attributes']['quantity'] = null; $row['attributes']['ref\_quantity'] = null; } $product = new Product($row); return $product; } ` Hier sollte die richtige Stelle sein. Aber bin mir nicht ganz sicher.

---

<div class="post-metadata">

**Author:** ![dirk\_designverign](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@dirk\_designverign](https://forum.shopware.com/u/dirk_designverign)\
**Post date:** [22. August 2014 um 09:09 UTC](https://forum.shopware.com/t/bepado-pluginanderung/22013/4 "2014-08-22T09:09:53Z")

</div>

Dann vielleicht einfach den Bestand temporär erhöhen: `UPDATE s\_articles\_details SET instock = instock + 1000` Wenn das Plugin gefixed ist einfach: `UPDATE s\_articles\_details SET instock = instock - 1000`
