@@ -102,6 +102,7 @@ public void findBySku(String sku, final OnProductAvailableListener productAvaila
102102 }
103103
104104 url = url .replace ("{sku}" , sku );
105+ url = appendShopId (url );
105106
106107 get (url , productAvailableListener );
107108 }
@@ -141,6 +142,7 @@ public void findBySkus(final String[] skus, final OnProductsAvailableListener pr
141142 }
142143
143144 url = sb .toString ();
145+ url = appendShopId (url );
144146
145147 final Request request = new Request .Builder ()
146148 .url (Snabble .getInstance ().absoluteUrl (url ))
@@ -253,6 +255,7 @@ public void findByCode(final String code, final OnProductAvailableListener produ
253255 }
254256
255257 url = url .replace ("{code}" , code );
258+ url = appendShopId (url );
256259
257260 get (url , productAvailableListener );
258261 }
@@ -275,6 +278,7 @@ public void findByWeighItemId(String weighItemId, final OnProductAvailableListen
275278 }
276279
277280 url = url .replace ("{id}" , weighItemId );
281+ url = appendShopId (url );
278282
279283 get (url , productAvailableListener );
280284 }
@@ -295,6 +299,7 @@ private void getBundlesOfProduct(final String sku, final ApiProductGroupCallback
295299 }
296300
297301 url = url .replace ("{bundledSku}" , sku );
302+ url = appendShopId (url );
298303
299304 final Request request = new Request .Builder ()
300305 .url (Snabble .getInstance ().absoluteUrl (url ))
@@ -570,4 +575,12 @@ private Product toProduct(ApiProduct apiProduct, Product depositProduct, Product
570575
571576 return builder .build ();
572577 }
578+
579+ private String appendShopId (String url ) {
580+ Shop shop = project .getCheckedInShop ();
581+ if (shop != null ) {
582+ url = url + "?shopID=" + shop .getId ();
583+ }
584+ return url ;
585+ }
573586}
0 commit comments