From 2b9b3d8190c1a97c6e27dc06e18266d768720dd1 Mon Sep 17 00:00:00 2001 From: kenta-work Date: Mon, 11 Sep 2023 11:09:40 +0700 Subject: [PATCH 1/2] update topping2 to enable any light roast --- xml/page_topping_select8.xml | 233 +++++++++++++++++++++-------------- 1 file changed, 139 insertions(+), 94 deletions(-) diff --git a/xml/page_topping_select8.xml b/xml/page_topping_select8.xml index ebad6aca..4666a815 100644 --- a/xml/page_topping_select8.xml +++ b/xml/page_topping_select8.xml @@ -989,66 +989,6 @@ EndIf EndIf - If TOPPING2 = "add-show-1009" Then - If toppingID2index3 = 1060 Then - Var CustomCoffeeEnable = "True" - Var showCustomCoffee = "Enable" - Var showCoffeeQuantity = "Enable" - - If toppingID2Default = "" Then - Var CustomCoffeeQuantityState[0] = "PressForever" - Else - - If toppingID2index1 = toppingID2Default Then - Var CurrentCoffeeQuantityId = toppingID2index1 - Var CustomCoffeeQuantityState[0] = "PressForever" - Var CustomCoffeeQuantityState[1] = "Enable" - Var CustomCoffeeQuantityState[2] = "Enable" - - EndIf - - If toppingID2index3 = toppingID2Default Then - Var CurrentCoffeeQuantityId = toppingID2index3 - Var CustomCoffeeQuantityState[0] = "Enable" - Var CustomCoffeeQuantityState[1] = "PressForever" - Var CustomCoffeeQuantityState[2] = "Enable" - EndIf - - If toppingID2index4 = toppingID2Default Then - Var CurrentCoffeeQuantityId = toppingID2index4 - Var CustomCoffeeQuantityState[0] = "Enable" - Var CustomCoffeeQuantityState[1] = "Enable" - Var CustomCoffeeQuantityState[2] = "PressForever" - EndIf - EndIf - - - If toppingID2price1 > 0 Then - Var priceFormated !assigned StringFmt( toppingID2price1 , PriceCustomCoffeeFormat, PreScaleConvertShow) - Var CustomCoffeeQuantityAdditionalPrice[0] = "(+" + priceFormated - Var CustomCoffeeQuantityAdditionalPrice[0] = CustomCoffeeQuantityAdditionalPrice[0] + ")" - Else - Var CustomCoffeeQuantityAdditionalPrice[0] = "" - EndIf - - If toppingID2price3 > 0 Then - Var priceFormated !assigned StringFmt( toppingID2price3 , PriceCustomCoffeeFormat, PreScaleConvertShow) - Var CustomCoffeeQuantityAdditionalPrice[1] = "(+" + priceFormated - Var CustomCoffeeQuantityAdditionalPrice[1] = CustomCoffeeQuantityAdditionalPrice[1] + ")" - Else - Var CustomCoffeeQuantityAdditionalPrice[1] = "" - EndIf - - If toppingID2price4 > 0 Then - Var priceFormated !assigned StringFmt( toppingID2price4 , PriceCustomCoffeeFormat, PreScaleConvertShow) - Var CustomCoffeeQuantityAdditionalPrice[2] = "(+" + priceFormated - Var CustomCoffeeQuantityAdditionalPrice[2] = CustomCoffeeQuantityAdditionalPrice[2] + ")" - Else - Var CustomCoffeeQuantityAdditionalPrice[2] = "" - EndIf - EndIf - EndIf - If TOPPING9 = "single-shot-espv2" Then Var CustomCoffeeEnable = "True" Var showCustomCoffee = "Enable" @@ -1776,27 +1716,39 @@ If TOPPING2 = "shot coffee 1003" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" - + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf + DEBUGVAR TOPPING2 Refresh EndIf If TOPPING2 = "shot coffee 1007" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh EndIf If TOPPING2 = "shot coffee 1008" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1808,6 +1760,8 @@ Var ShotCoffeePremium = "Enable" Var showShotEnable = "Invisible" Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" EndIf DEBUGVAR TOPPING2 @@ -1815,9 +1769,13 @@ EndIf If TOPPING2 = "add-show-1101" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1825,9 +1783,13 @@ If TOPPING2 = "add-show-1102" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1835,18 +1797,26 @@ If TOPPING2 = "add-show-1103" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh EndIf If TOPPING2 = "add-show-1104" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1854,9 +1824,13 @@ If TOPPING2 = "add-show-1105" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1864,9 +1838,13 @@ If TOPPING2 = "add-show-1106" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1874,9 +1852,13 @@ If TOPPING2 = "add-show-1107" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1884,9 +1866,13 @@ If TOPPING2 = "add-show-1108" Then - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Invisible" - Var ExtraTopping = "Enable" + If toppingID2index3 = "" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + Else + Var EnableLightRoast = "Enable" + EndIf DEBUGVAR TOPPING2 Refresh @@ -1901,6 +1887,65 @@ EndIf + If EnableLightRoast = "Enable" Then + Var CustomCoffeeEnable = "True" + Var showCustomCoffee = "Enable" + var showCoffeeLevel = "Enable" + + If toppingID2Default = "" Then + Var CustomCoffeeQuantityState[1] = "PressForever" + Else + + If toppingID2index1 = toppingID2Default Then + Var CurrentCoffeeLevelId = toppingID2index1 + Var CustomCoffeeQuantityState[0] = "PressForever" + Var CustomCoffeeQuantityState[1] = "Enable" + Var CustomCoffeeQuantityState[2] = "Enable" + + EndIf + + If toppingID2index2 = toppingID2Default Then + Var CurrentCoffeeLevelId = toppingID2index2 + Var CustomCoffeeQuantityState[0] = "Enable" + Var CustomCoffeeQuantityState[1] = "PressForever" + Var CustomCoffeeQuantityState[2] = "Enable" + EndIf + + If toppingID2index3 = toppingID2Default Then + Var CurrentCoffeeLevelId = toppingID2index3 + Var CustomCoffeeQuantityState[0] = "Enable" + Var CustomCoffeeQuantityState[1] = "Enable" + Var CustomCoffeeQuantityState[2] = "PressForever" + EndIf + + EndIf + + + If toppingID2price1 > 0 Then + Var priceFormated !assigned StringFmt( toppingID2price1 , PriceCustomCoffeeFormat, PreScaleConvertShow) + Var CustomCoffeeQuantityAdditionalPrice[0] = "(+" + priceFormated + Var CustomCoffeeQuantityAdditionalPrice[0] = CustomCoffeeQuantityAdditionalPrice[0] + ")" + Else + Var CustomCoffeeQuantityAdditionalPrice[0] = "" + EndIf + + If toppingID2price2 > 0 Then + Var priceFormated !assigned StringFmt( toppingID2price2 , PriceCustomCoffeeFormat, PreScaleConvertShow) + Var CustomCoffeeQuantityAdditionalPrice[1] = "(+" + priceFormated + Var CustomCoffeeQuantityAdditionalPrice[1] = CustomCoffeeQuantityAdditionalPrice[1] + ")" + Else + Var CustomCoffeeQuantityAdditionalPrice[1] = "" + EndIf + + If toppingID2price3 > 0 Then + Var priceFormated !assigned StringFmt( toppingID2price3 , PriceCustomCoffeeFormat, PreScaleConvertShow) + Var CustomCoffeeQuantityAdditionalPrice[2] = "(+" + priceFormated + Var CustomCoffeeQuantityAdditionalPrice[2] = CustomCoffeeQuantityAdditionalPrice[2] + ")" + Else + Var CustomCoffeeQuantityAdditionalPrice[2] = "" + EndIf + EndIf + ;-END If TOPPING3 = "Collagen" Then Var CollagenState = "Enable" From 2eacf5c3110980aaaf2383497844c9603829e456 Mon Sep 17 00:00:00 2001 From: kenta-work Date: Mon, 11 Sep 2023 14:12:40 +0700 Subject: [PATCH 2/2] update topping2 index --- xml/page_topping_select5.xml | 2 +- xml/page_topping_select8.xml | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/xml/page_topping_select5.xml b/xml/page_topping_select5.xml index 32fba528..40e919ef 100644 --- a/xml/page_topping_select5.xml +++ b/xml/page_topping_select5.xml @@ -48,7 +48,7 @@ Var CHECK_EventOpen_Double = 0 If RecipeTag3 = "CoffeePlay" Then - ;Open "ROOT/taobin_project/xml/page_topping_select8.xml" + Open "ROOT/taobin_project/xml/page_topping_select8.xml" EndIf If BoxID = 200001 Then diff --git a/xml/page_topping_select8.xml b/xml/page_topping_select8.xml index 4666a815..82565966 100644 --- a/xml/page_topping_select8.xml +++ b/xml/page_topping_select8.xml @@ -1890,7 +1890,7 @@ If EnableLightRoast = "Enable" Then Var CustomCoffeeEnable = "True" Var showCustomCoffee = "Enable" - var showCoffeeLevel = "Enable" + var showCoffeeQuantity = "Enable" If toppingID2Default = "" Then Var CustomCoffeeQuantityState[1] = "PressForever" @@ -4975,13 +4975,14 @@ Var topping2 = toppingID2index1 EndIf If CustomCoffeeQuantityState[1] = "PressForever" Then - Var topping2 = toppingID2index3 + Var topping2 = toppingID2index2 EndIf If CustomCoffeeQuantityState[2] = "PressForever" Then - Var topping2 = toppingID2index4 + Var topping2 = toppingID2index3 EndIf Else - If toppingID2index3 = 1060 Then + If toppingID2index3 = "" Then + Else Var topping2 = 0 EndIf EndIf @@ -5014,7 +5015,8 @@ Var topping10 = 0 EndIf Else - If toppingID2index3 = 1060 Then + If toppingID2index3 = "" Then + Else Var topping2 = 0 EndIf Var topping7 = 0 @@ -5558,10 +5560,10 @@ Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price1 EndIf If CustomCoffeeQuantityState[1] = "PressForever" Then - Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price3 + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price2 EndIf If CustomCoffeeQuantityState[2] = "PressForever" Then - Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price4 + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price3 EndIf If CustomCoffeeLevelState[0] = "PressForever" Then