v2.3.0 updates, dependancy version bump and bug fixes
This commit is contained in:
parent
cdb34c7b8d
commit
b2df6c5224
@ -1,3 +1,9 @@
|
||||
## [2.3.0] - 2020-11-18
|
||||
|
||||
* Option to set if prices include tax
|
||||
* Pubspec.yaml dependency updates
|
||||
* Bug fixes
|
||||
|
||||
## [2.2.2] - 2020-10-30
|
||||
|
||||
* Bug fix for Android build
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
# APP CONFIGURATION
|
||||
# Updates the package name and display name for your app
|
||||
|
||||
# Run in the terminal: "flutter pub run flutter_application_id:main"
|
||||
|
||||
flutter_application_id:
|
||||
android:
|
||||
id: "com.woosignal.label-android"
|
||||
name: "Label StoreMax"
|
||||
ios:
|
||||
id: "com.woosignal.label-ios"
|
||||
name: "Label StoreMax"
|
||||
@ -16,7 +16,7 @@ import 'dart:ui';
|
||||
Developer Notes
|
||||
|
||||
SUPPORT EMAIL - support@woosignal.com
|
||||
VERSION - 2.2.2
|
||||
VERSION - 2.3.0
|
||||
https://woosignal.com
|
||||
*/
|
||||
|
||||
@ -38,7 +38,11 @@ const app_privacy_url = "https://yourdomain.com/privacy";
|
||||
|
||||
const app_currency_symbol = "\£";
|
||||
const app_currency_iso = "gbp";
|
||||
|
||||
const app_products_prices_include_tax = true;
|
||||
|
||||
const Locale app_locale = Locale('en');
|
||||
|
||||
const List<Locale> app_locales_supported = [
|
||||
Locale('en'),
|
||||
Locale('es'),
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:label_storemax/helpers/shared_pref.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
import 'package:label_storemax/models/cart_line_item.dart';
|
||||
import 'package:label_storemax/models/checkout_session.dart';
|
||||
import 'package:label_storemax/models/shipping_type.dart';
|
||||
@ -148,9 +149,10 @@ class Cart {
|
||||
cartItems.where((c) => c.taxStatus == 'taxable').toList();
|
||||
double cartSubtotal = 0;
|
||||
|
||||
if (taxableCartLines.length > 0) {
|
||||
if (app_products_prices_include_tax == false &&
|
||||
taxableCartLines.length > 0) {
|
||||
cartSubtotal = taxableCartLines
|
||||
.map<double>((m) => parseWcPrice(m.subtotal))
|
||||
.map<double>((m) => parseWcPrice(m.subtotal) * m.quantity)
|
||||
.reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
|
||||
@ -62,8 +62,12 @@ class _AccountDetailPageState extends State<AccountDetailPage>
|
||||
];
|
||||
_tabController = TabController(vsync: this, length: _tabs.length);
|
||||
_activeBody = showAppLoader();
|
||||
_fetchWpUserData();
|
||||
_fetchOrders();
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() async {
|
||||
await _fetchWpUserData();
|
||||
await _fetchOrders();
|
||||
}
|
||||
|
||||
_fetchWpUserData() async {
|
||||
|
||||
@ -80,21 +80,24 @@ class _CartPageState extends State<CartPage> {
|
||||
return;
|
||||
}
|
||||
if (cartLineItems.length <= 0) {
|
||||
showEdgeAlertWith(context,
|
||||
showEdgeAlertWith(
|
||||
context,
|
||||
title: trans(context, "Cart"),
|
||||
desc: trans(context,
|
||||
trans(context, "You need items in your cart to checkout")),
|
||||
desc: trans(context, "You need items in your cart to checkout"),
|
||||
style: EdgeAlertStyle.WARNING,
|
||||
icon: Icons.shopping_cart);
|
||||
icon: Icons.shopping_cart,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!cartLineItems.every(
|
||||
(c) => c.stockStatus == 'instock' || c.stockStatus == 'onbackorder')) {
|
||||
showEdgeAlertWith(context,
|
||||
showEdgeAlertWith(
|
||||
context,
|
||||
title: trans(context, "Cart"),
|
||||
desc: trans(context, trans(context, "There is an item out of stock")),
|
||||
desc: trans(context, "There is an item out of stock"),
|
||||
style: EdgeAlertStyle.WARNING,
|
||||
icon: Icons.shopping_cart);
|
||||
icon: Icons.shopping_cart,
|
||||
);
|
||||
return;
|
||||
}
|
||||
CheckoutSession.getInstance.initSession();
|
||||
@ -120,7 +123,7 @@ class _CartPageState extends State<CartPage> {
|
||||
showEdgeAlertWith(
|
||||
context,
|
||||
title: trans(context, "Cart"),
|
||||
desc: trans(context, trans(context, "Maximum stock reached")),
|
||||
desc: trans(context, "Maximum stock reached"),
|
||||
style: EdgeAlertStyle.WARNING,
|
||||
icon: Icons.shopping_cart,
|
||||
);
|
||||
@ -187,8 +190,10 @@ class _CartPageState extends State<CartPage> {
|
||||
splashColor: Colors.transparent,
|
||||
child: Align(
|
||||
child: Padding(
|
||||
child: Text(trans(context, "Clear Cart"),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
child: Text(
|
||||
trans(context, "Clear Cart"),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
),
|
||||
padding: EdgeInsets.only(right: 8),
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
@ -217,10 +222,11 @@ class _CartPageState extends State<CartPage> {
|
||||
color: Colors.black45,
|
||||
),
|
||||
Padding(
|
||||
child: Text(trans(context, "Empty Basket"),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyText2),
|
||||
child: Text(
|
||||
trans(context, "Empty Basket"),
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.bodyText2,
|
||||
),
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
)
|
||||
],
|
||||
@ -266,9 +272,11 @@ class _CartPageState extends State<CartPage> {
|
||||
return Text("");
|
||||
else
|
||||
return new Padding(
|
||||
child: wsRow2Text(context,
|
||||
child: wsRow2Text(
|
||||
context,
|
||||
text1: trans(context, "Total"),
|
||||
text2: (_isLoading ? "" : snapshot.data)),
|
||||
text2: (_isLoading ? "" : snapshot.data),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 15, top: 15),
|
||||
);
|
||||
}
|
||||
|
||||
@ -676,7 +676,7 @@ packages:
|
||||
name: wp_json_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.4"
|
||||
version: "2.0.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@ -1,15 +1,11 @@
|
||||
# Official WooSignal App Template for WooCommerce
|
||||
|
||||
# Label StoreMax
|
||||
# Version 2.2.2
|
||||
# Version 2.3.0
|
||||
# Homepage: https://woosignal.com
|
||||
# Author: Anthony Gordon <agordon@woosignal.com>
|
||||
# Documentation: https://woosignal.com/docs/app/ios/label-storemax
|
||||
|
||||
### App Configuration
|
||||
# 1 Open: "lib/labelconfig.dart" and edit the variables
|
||||
# 2 Open: "flutter_application_id.yaml" and update package name and display name
|
||||
|
||||
### Change App Icon
|
||||
# 1 Replace: assets/icon/appicon.png (1024px1024px icon size)
|
||||
# 2 Run this command from terminal: "flutter pub run flutter_launcher_icons:main"
|
||||
@ -30,7 +26,7 @@ dependencies:
|
||||
woosignal: ^1.2.1
|
||||
woosignal_stripe: ^0.0.6
|
||||
razorpay_flutter: ^1.2.2
|
||||
wp_json_api: ^0.1.4
|
||||
wp_json_api: ^2.0.0
|
||||
shared_preferences: ^0.5.12
|
||||
cached_network_image: ^2.3.3
|
||||
page_transition: ^1.1.7+2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user