Skip to content

Commit 3f4c3be

Browse files
author
WooSignal
committed
v2.1.1 changes
1 parent 4269c5b commit 3f4c3be

File tree

7 files changed

+41
-18
lines changed

7 files changed

+41
-18
lines changed

LabelStoreMax/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.1.1] - 2020-07-23
2+
3+
* Bug fix for categories
4+
* Changes to FreeShipping
5+
16
## [2.1.0] - 2020-07-22
27

38
* Pubspec.yaml update for RazorPay

LabelStoreMax/lib/labelconfig.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'dart:ui';
1616
Developer Notes
1717
1818
SUPPORT EMAIL - support@woosignal.com
19-
VERSION - 2.1.0
19+
VERSION - 2.1.1
2020
https://woosignal.com
2121
*/
2222

LabelStoreMax/lib/pages/checkout_confirmation.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
389389
if (doubleTotal < doubleMinimumValue) {
390390
showEdgeAlertWith(context,
391391
title: trans(context, "Sorry"),
392-
desc: trans(context, "Spend a minimum of") +
393-
" " +
394-
formatDoubleCurrency(total: doubleMinimumValue) +
395-
" ${trans(context, "for")} " +
396-
CheckoutSession.getInstance.shippingType.getTitle(),
392+
desc: "${trans(context, "Spend a minimum of")} ${formatDoubleCurrency(total: doubleMinimumValue)} ${trans(context, "for")} ${CheckoutSession.getInstance.shippingType.getTitle()}",
397393
style: EdgeAlertStyle.INFO,
398394
duration: 3);
399395
return;

LabelStoreMax/lib/pages/checkout_shipping_type.dart

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,45 @@ class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
115115
}
116116

117117
if (_shipping.methods.freeShipping != null) {
118-
_shipping.methods.freeShipping
118+
List<FreeShipping> freeShipping = _shipping.methods.freeShipping
119119
.where((t) => t != null)
120-
.toList()
121-
.forEach((freeShipping) {
122-
if (isNumeric(freeShipping.cost) ||
123-
freeShipping.cost == 'min_amount') {
120+
.toList();
121+
122+
for (int i = 0; i < freeShipping.length; i++) {
123+
if (isNumeric(freeShipping[i].cost) ||
124+
freeShipping[i].cost == 'min_amount') {
125+
126+
if (freeShipping[i].cost == 'min_amount') {
127+
String total = await Cart.getInstance.getTotal();
128+
if (total != null) {
129+
double doubleTotal = double.parse(total);
130+
double doubleMinimumValue =
131+
double.parse(freeShipping[i].minimumOrderAmount);
132+
133+
if (doubleTotal < doubleMinimumValue) {
134+
continue;
135+
}
136+
}
137+
}
138+
124139
Map<String, dynamic> tmpShippingOption = {};
125140
tmpShippingOption = {
126-
"id": freeShipping.id,
141+
"id": freeShipping[i].id,
127142
"method_id": "free_shipping",
128-
"title": freeShipping.title,
143+
"title": freeShipping[i].title,
129144
"cost": "0.00",
130-
"min_amount": freeShipping.minimumOrderAmount,
131-
"object": freeShipping
145+
"min_amount": freeShipping[i].minimumOrderAmount,
146+
"object": freeShipping[i]
132147
};
133148
_wsShippingOptions.add(tmpShippingOption);
134149
}
150+
}
151+
152+
_shipping.methods.freeShipping
153+
.where((t) => t != null)
154+
.toList()
155+
.forEach((freeShipping) async {
156+
135157
});
136158
}
137159
}

LabelStoreMax/lib/pages/home.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class _HomePageState extends State<HomePage> {
6060

6161
_fetchCategories() async {
6262
_categories =
63-
await appWooSignal((api) => api.getProductCategories(page: 100));
63+
await appWooSignal((api) => api.getProductCategories(perPage: 100));
6464
}
6565

6666
_fetchMoreProducts() async {

LabelStoreMax/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Label StoreMax
2-
# Version 2.1.0
2+
# Version 2.1.1
33
#authors: - "Anthony Gordon"
44
#documentation: https://woosignal.com/docs/app/ios/label-storemax
55
#homepage: https://woosignal.com/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# WooCommerce App: Label StoreMax
66

7-
### Label StoreMax - v2.1.0
7+
### Label StoreMax - v2.1.1
88

99

1010
[Official WooSignal WooCommerce App](https://woosignal.com)

0 commit comments

Comments
 (0)