File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.10.5]
5+
6+ ### Fixed
7+ - Show shop unspecific price, if no price is available for selected shop and database
8+ has pricingCategories set for shop
9+
410## [ 0.10.4]
511
612### Fixed
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ allprojects {
2424 }
2525
2626 project. ext {
27- sdkVersion= ' 0.10.4 '
27+ sdkVersion= ' 0.10.5 '
2828 versionCode= 1
2929
3030 compileSdkVersion= 28
Original file line number Diff line number Diff line change @@ -755,6 +755,14 @@ public Product productAtCursor(Cursor cursor) {
755755
756756 Shop shop = project .getCheckedInShop ();
757757
758+ if (!queryPrice (builder , sku , shop )) {
759+ queryPrice (builder , sku , null );
760+ }
761+
762+ return builder .build ();
763+ }
764+
765+ private boolean queryPrice (Product .Builder builder , String sku , Shop shop ) {
758766 String id = shop != null ? shop .getId () : "" ;
759767 String priceQuery = "SELECT listPrice, discountedPrice, basePrice FROM prices " ;
760768 String [] args ;
@@ -775,9 +783,10 @@ public Product productAtCursor(Cursor cursor) {
775783 builder .setDiscountedPrice (priceCursor .getInt (1 ));
776784 builder .setBasePrice (priceCursor .getString (2 ));
777785 priceCursor .close ();
786+ return true ;
778787 }
779788
780- return builder . build () ;
789+ return false ;
781790 }
782791
783792 private Product .SaleRestriction decodeSaleRestriction (long encodedValue ) {
You can’t perform that action at this time.
0 commit comments