# Shop Url in Plugin beziehen

**URL:** <https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [2. Juli 2013 um 12:26 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115 "2013-07-02T12:26:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptaddey](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@ptaddey](https://forum.shopware.com/u/ptaddey)\
**Post date:** [2. Juli 2013 um 12:26 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/1 "2013-07-02T12:26:10Z")

</div>

Hallo, gibt es eine Funktion, die die URL des installierten Onlineshops aus einem Plugin heraus bezieht? Ich benötige die URL, um diese einer Schnittstelle zu übergeben. Danke Patrick

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [2. Juli 2013 um 18:47 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/2 "2013-07-02T18:47:34Z")

</div>

probier mal `Shopware()-\>System()-\>sCONFIG["sBASEPATH"]`

---

<div class="post-metadata">

**Author:** ![ptaddey](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@ptaddey](https://forum.shopware.com/u/ptaddey)\
**Post date:** [4. Juli 2013 um 09:19 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/3 "2013-07-04T09:19:58Z")

</div>

Hallo, danke für die Antwort. Leider klappt das nicht. Sobald ich `$system = Shopware()-\>System();` in der Bootstrap ausführe, wird das Plugin nicht mehr angezeigt. Muss ich dazu noch was beachten? Viele Grüße, Patrick

---

<div class="post-metadata">

**Author:** ![ptaddey](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@ptaddey](https://forum.shopware.com/u/ptaddey)\
**Post date:** [4. Juli 2013 um 11:42 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/4 "2013-07-04T11:42:33Z")

</div>

Ok, wenn ich ` require\_once(Shopware()-\>OldPath() . 'engine/core/class/sSystem.php'); $system = new sSystem(); ` in der Plugin-Bootstrap aufrufe, bekomme ich zumindest ein Objekt zurück. Hier fehlt jedoch die URL zum Onlineshop. Nur das Attribut „sBasePath“ ist mit dem Pfad zum Shopware-Verzeichnis gesetzt. Fragt sich immernoch wie ich an die URL komme…

---

<div class="post-metadata">

**Author:** ![ovi](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@ovi](https://forum.shopware.com/u/ovi)\
**Post date:** [4. Juli 2013 um 11:47 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/5 "2013-07-04T11:47:12Z")

</div>

Sofern es sich um ein Frontendplugin handelt, gab es zumindest in 3.5 so etwas: ` Shopware()-\>Front()-\>Request()-\>getBaseUrl(); ` ich könnte mir vorstellen, dass das ggf. immer noch funktioniert.

---

<div class="post-metadata">

**Author:** ![ptaddey](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@ptaddey](https://forum.shopware.com/u/ptaddey)\
**Post date:** [4. Juli 2013 um 12:13 UTC](https://forum.shopware.com/t/shop-url-in-plugin-beziehen/14115/6 "2013-07-04T12:13:13Z")

</div>

Hallo, danke, funktioniert schon besser, obwohl die URL wird nicht komplett angegeben, nur das Unterverzeichnis zum Shop: ` Enlight\_Controller\_Request\_RequestHttp Object ( [\_paramSources:protected] =\> Array ( [0] =\> \_GET [1] =\> \_POST ) [\_requestUri:protected] =\> /onlineshops/shopware/ce408/backend/PluginManager/savePlugin?\_dc=1372932644987 [\_baseUrl:protected] =\> /onlineshops/shopware/ce408 [\_basePath:protected] =\> [\_pathInfo:protected] =\> /backend/PluginManager/savePlugin [\_params:protected] =\> Array ( [module] =\> backend [controller] =\> PluginManager [action] =\> savePlugin ) [\_rawBody:protected] =\> [\_aliases:protected] =\> Array ( ) [\_dispatched:protected] =\> 1 [\_module:protected] =\> backend [\_moduleKey:protected] =\> module [\_controller:protected] =\> PluginManager [\_controllerKey:protected] =\> controller [\_action:protected] =\> savePlugin [\_actionKey:protected] =\> action ) `
