campaign fix
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
BIN
.idea/caches/gradle_models.ser
generated
BIN
.idea/caches/gradle_models.ser
generated
Binary file not shown.
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6,"versionName":"1.12","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"1.13","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
@@ -138,11 +138,13 @@ public class CampaignProductDetailsActivity extends BaseActivity {
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
if((menuProductOptionModel.getType().toLowerCase().equals("radio") ||
|
||||
menuProductOptionModel.getType().toLowerCase().equals("select") &&
|
||||
!isAnyOptionValueSelected(menuProductOptionModel.getOptionValueModelList()))){
|
||||
menuProductOptionValueModel.setSelected(true);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -266,11 +268,13 @@ public class CampaignProductDetailsActivity extends BaseActivity {
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
if((menuProductOptionModel.getType().toLowerCase().equals("radio") ||
|
||||
menuProductOptionModel.getType().toLowerCase().equals("select") &&
|
||||
!isAnyOptionValueSelected(menuProductOptionModel.getOptionValueModelList()))){
|
||||
menuProductOptionValueModel.setSelected(true);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,9 +160,29 @@ public class CreateOrderActivity extends BaseActivity {
|
||||
return cartInfoModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Kampanya urunu detay sayfasında urunun fiyatı 0 olan tum optionlarını seçiyor,
|
||||
* bunun da düzeltilmesi gerekiyor!!
|
||||
*/
|
||||
|
||||
/**
|
||||
* eğer kampanya kullanıldıysa cartInfoModel de isPizzapassCampaignUsed ve isKebappassCampaignUsed
|
||||
* alanalrını true olarak set ediyoruz. create order ekranlarında herhangi bir yerde sepet sorgusu yapınca
|
||||
* buradaki cartInfoModel i de güncelliyoruz. fakat isPizzapassCampaignUsed ve isKebappassCampaignUsed alanları
|
||||
* servisten gelmeyen değerler, bizim loaklde tuttuğumuz değişkenler. bu sebeple bu alanlar servisten hep false geliyor,
|
||||
* buradakinde true olsa bile değişkeni guncellediğimiz için bu alanlar kayboluyor. bunu engellemek için bu metodu yazdım.
|
||||
*/
|
||||
public void setCartInfoSafeForCampaigns(CartInfoModel cartInfoModel) {
|
||||
cartInfoModel.setPizzapassCampaignUsed(this.cartInfoModel.isPizzapassCampaignUsed());
|
||||
cartInfoModel.setKebappassCampaignUsed(this.cartInfoModel.isKebappassCampaignUsed());
|
||||
this.cartInfoModel = cartInfoModel;
|
||||
}
|
||||
|
||||
/*
|
||||
public void setCartInfo(CartInfoModel cartInfoModel) {
|
||||
this.cartInfoModel = cartInfoModel;
|
||||
}
|
||||
*/
|
||||
|
||||
public ShippingMethodModel getSelectedShippingMethod(){
|
||||
return selectedShippingMethod;
|
||||
|
||||
@@ -656,7 +656,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
response.body().getData() != null &&
|
||||
response.body().isSuccess()){
|
||||
response.body().getData().checkNull();
|
||||
createOrderActivity.setCartInfo(response.body().getData());
|
||||
createOrderActivity.setCartInfoSafeForCampaigns(response.body().getData());
|
||||
}
|
||||
else
|
||||
ApiErrorUtils.parseError(response);
|
||||
@@ -698,7 +698,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
response.body().isSuccess()){
|
||||
CartInfoModel cartInfoModel = response.body().getData();
|
||||
cartInfoModel.checkNull();
|
||||
createOrderActivity.setCartInfo(cartInfoModel);
|
||||
createOrderActivity.setCartInfoSafeForCampaigns(cartInfoModel);
|
||||
//setOrderTotalText(response.body().getData());
|
||||
cartTotalList.clear();
|
||||
cartTotalList.addAll(cartInfoModel.getTotalsList());
|
||||
|
||||
@@ -293,7 +293,7 @@ public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
||||
CreateOrderActivity createOrderActivity = (CreateOrderActivity) BaseActivity.currentActivity;
|
||||
CartInfoModel cartInfoModel = response.body().getData();
|
||||
cartInfoModel.checkNull();
|
||||
createOrderActivity.setCartInfo(cartInfoModel);
|
||||
createOrderActivity.setCartInfoSafeForCampaigns(cartInfoModel);
|
||||
createOrderActivity.setSelectedPaymentMethod(selectedPaymentMethod);
|
||||
createOrderActivity.onNextClicked(FRAGMENT_NAME);
|
||||
}
|
||||
|
||||
@@ -15,9 +15,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:textColor="@color/black"
|
||||
fontPath="fonts/Quicksand-Bold.ttf"/>
|
||||
fontPath="fonts/Quicksand-Bold.ttf"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/optionPriceDescriptionLayout"
|
||||
android:layout_toStartOf="@+id/optionPriceDescriptionLayout"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/optionPriceDescriptionLayout"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
|
||||
@@ -15,9 +15,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:textColor="@color/black"
|
||||
fontPath="fonts/Quicksand-Bold.ttf"/>
|
||||
fontPath="fonts/Quicksand-Bold.ttf"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/optionPriceDescriptionLayout"
|
||||
android:layout_toStartOf="@+id/optionPriceDescriptionLayout"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/optionPriceDescriptionLayout"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
|
||||
Reference in New Issue
Block a user