Create template 2

This commit is contained in:
kong 2023-06-16 15:33:37 +07:00
parent 3d98720bb4
commit 4302a22b1d
26 changed files with 12203 additions and 27 deletions

View file

@ -1,6 +1,8 @@
if "v2" in param:
print("V2 ignore")
else:
print("params=" + param)
print( "dir= " + directory_to_process + "/page_catalog_group_recommend.xml");
file_xml = open(directory_to_process + "/page_catalog_group_recommend.xml", 'r')
file_content_main = file_xml.read()
@ -30,7 +32,7 @@ else:
file_inc2_content = file_inc2_content.replace( "###" + key_val[0], '"' + key_val[1].strip() + '"')
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick.inc", 'r')
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick1.inc", 'r')
file_inc_event_click_content = file_inc_event_click.read()
file_inc2_content = file_inc2_content.replace("###EventOnClick", file_inc_event_click_content)
@ -53,7 +55,7 @@ else:
content_data = tmp1 + tmp2
file_xml3_out = open(directory_to_process + "/event/out_put_file.txt", 'r')
file_xml3_out = open(directory_to_process + "/event/out_put_file1.txt", 'r')
file_xml3_out_content = file_xml3_out.read()
file_xml3_out_content = file_xml3_out_content.strip()
file_xml3_out_content = file_xml3_out_content.replace("\r", "")
@ -65,9 +67,9 @@ else:
if "template2" in param:
file_inc2 = open(directory_to_process + "/event/promotion_template1.inc", 'r')
file_inc2 = open(directory_to_process + "/event/promotion_template2.inc", 'r')
file_inc2_content = file_inc2.read()
file_inc_img = open(directory_to_process + "../image/event/image_template1", 'r')
file_inc_img = open(directory_to_process + "../image/event/image_template2", 'r')
file_inc2_img_content = file_inc_img.read()
# replace key.
@ -82,7 +84,7 @@ else:
file_inc2_content = file_inc2_content.replace( "###" + key_val[0], '"' + key_val[1].strip() + '"')
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick.inc", 'r')
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick2.inc", 'r')
file_inc_event_click_content = file_inc_event_click.read()
file_inc2_content = file_inc2_content.replace("###EventOnClick", file_inc_event_click_content)
@ -105,7 +107,7 @@ else:
content_data = tmp1 + tmp2
file_xml3_out = open(directory_to_process + "/event/out_put_file.txt", 'r')
file_xml3_out = open(directory_to_process + "/event/out_put_file2.txt", 'r')
file_xml3_out_content = file_xml3_out.read()
file_xml3_out_content = file_xml3_out_content.strip()
file_xml3_out_content = file_xml3_out_content.replace("\r", "")

View file

@ -0,0 +1 @@
/event/promotion_pepsi_end.xml

View file

@ -0,0 +1 @@
Open "ROOT/taobin_project/xml/page_catalog_group_pepsi_pro.xml"

View file

@ -0,0 +1 @@
Open "ROOT/taobin_project/xml/page_catalog_group_pepsi_pro.xml"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,46 @@
<Button>
<X> 42 </X>
<Y> 520 </Y>
<Filename>
eval(
If show_eng = "true" Then
Var return = ###normal_eng
Else
Var return = ###normal_thai
EndIf
)
</Filename>
<FilenamePress>
eval(
If show_eng = "true" Then
Var return = ###press_eng
Else
Var return = ###press_thai
EndIf
)
</FilenamePress>
<FilenameDisable>
eval(
If show_eng = "true" Then
Var return = ###disable_eng
Else
Var return = ###disable_thai
EndIf
)
</FilenameDisable>
<EventOnClick>
###EventOnClick
</EventOnClick>
</Button>
<EventUnitTest1>
Var BigButtonEnable = "Enable"
Refresh
</EventUnitTest1>
<EventUnitTest2>
Var BigButtonEnable = "Invisible"
Refresh
</EventUnitTest2>

View file

@ -3,7 +3,11 @@
If OpenFromPageBoard = 1 Then
If PepsiProEnable = 1 Then
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
If PepsiProCodeEnable = 0 Then
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
Else
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi_end.xml"
EndIf
Var OpenFromPageBoard = 0
Else
@ -13,7 +17,11 @@ If OpenFromPageBoard = 1 Then
Else
If PepsiProEnable = 1 Then
Open "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
If PepsiProCodeEnable = 0 Then
Open "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
Else
Open "ROOT/taobin_project/xml/event/promotion_pepsi_end.xml"
EndIf
Else
Open "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"

View file

@ -18,6 +18,7 @@ Var SoundBackToSchoolType = 0
Var PepsiProEnable = 0
Var PepsiPromoteVideo = 0
Var PepsiProCodeEnable = 0
If SystemDateMonthInt = 6 Then
If SystemDateDayInt = 12 Then
@ -52,6 +53,15 @@ If SystemDateMonthInt = 6 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 24 Then
Var PepsiProEnable = 1
Var PepsiProCodeEnable = 1
EndIf
If SystemDateDayInt = 25 Then
Var PepsiProEnable = 1
Var PepsiProCodeEnable = 1
EndIf
If SystemDateDayInt > 23 Then
Var PepsiPromoteVideo = 0
Else
@ -64,12 +74,14 @@ If BoxID = 200001 Then
Var OreoDueEnable = 0
Var OreoForFreeEnable = 0
Var PepsiProEnable = 0
Var PepsiProCodeEnable = 0
EndIf
If BoxID = 200000 Then
Var OreoDueEnable = 0
Var OreoForFreeEnable = 0
Var PepsiProEnable = 0
Var PepsiProCodeEnable = 0
EndIf
If BoxID = 172053 Then
@ -91,6 +103,7 @@ DEBUGVAR PepsiPromoteVideo
If InternationalEnable = 1 Then
Var PepsiProEnable = 0
Var PepsiPromoteVideo = 0
Var PepsiProCodeEnable = 0
EndIf

View file

@ -148,7 +148,21 @@
Var CocktailShow = "false"
Var RoadShow = "false"
EndIf
Var RoadShow = "false"
READ_FILE "/mnt/sdcard/free_mode_enable" free_mode_str
STRCONTAIN "bonusbonus" free_mode_str free_mode_enable
If free_mode_enable = "true" Then
If BoxID = 200434 Then
Var RoadShow = "true"
EndIf
If BoxID = 200435 Then
Var RoadShow = "true"
EndIf
EndIf
Var TermTemOnline = "false"
Var TaobinOnline = "false"
@ -632,15 +646,6 @@
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page/bp_main_page_member.png"
If CountryName = "Australia" Then
Var TextPriceMenuSize = 12
Var TextPriceMenuY = 266
Var ShowButtonClick2 = "Enable"
Var ButtontoTopupMenu = "Invisible"
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page_en/bp_main_page_member.png"
Var show_eng_button_stage = "Invisible"
EndIf
Machine __arm_toggle

File diff suppressed because it is too large Load diff

View file

View file

@ -534,7 +534,7 @@
Var block_index_override = 0
Var block_index_move = 0
</Script>
; menu_new_list 9
; menu_new_list 10
; ==================> Len = 11
; - 12-99-02-0009 -
<Block>
@ -1030,6 +1030,254 @@
<Value> text_unavailable </Value>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
; - - -
; ==================> Len = 11
; - 12-99-02-0019 -
<Block>
<MarginLeft> 33 </MarginLeft>
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 12-99-02-0019.Button,$Sum1299020019) </State>
<Button>
<State> $Sum1299020019 </State>
<Filename> "ROOT/taobin_project/image/page_drink_n//bn_PEPSI_TEA.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_drink_press_n//bn_PEPSI_TEA.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/image/page_drink_disable_n2//bn_PEPSI_TEA.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOnClick>
Var NameDrink = "ON FLEEK"
Var NameDrinkTH = "เป๊ปซี่ชาดำครับจารย์"
Var DrinkDescriptionTH = "ชาไทย เป๊ปซี่"
Var DrinkDescription = "Thai tea, Pepsi"
Var PictureDrink = "ROOT/taobin_project/image/page_drink_picture2_n/" + "bn_PEPSI_TEA.png"
Var OpenFromXML = CurrentXMLFileName2
Var PriceD1 = $-.Price
Var PriceD2 = $12-99-02-0019.Price
Var PriceD3 = $-.Price
Var PD_CODE1 = "##-##-##-####"
Var PD_CODE2 = "12-99-02-0019"
Var PD_CODE3 = "##-##-##-####"
Var PD_STAGE_1 = "Disable2"
Var PD_STAGE_2 = $12-99-02-0019.Button
Var PD_STAGE_3 = "Disable2"
Var SelectCountDrinkType = 0
Var DefaultDrinkType = 0
If PD_STAGE_1 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 1
EndIf
If PD_STAGE_2 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 2
EndIf
If PD_STAGE_3 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 3
EndIf
If PD_STAGE_2 = "Enable" Then
Topping "Load" "12-99-02-0019"
Else
If PD_STAGE_1 = "Enable" Then
Topping "Load" "-"
Else
Topping "Load" "-"
EndIf
EndIf
Var menu_name_eng_hot = $##-##-##-####.NameE
Var menu_desc_eng_hot = $##-##-##-####.descriptionE
Var menu_name_thai_hot = $##-##-##-####.Name
Var menu_desc_thai_hot = $##-##-##-####.description
Var menu_name_eng_cold = $12-99-02-0019.NameE
Var menu_desc_eng_cold = $12-99-02-0019.descriptionE
Var menu_name_thai_cold = $12-99-02-0019.Name
Var menu_desc_thai_cold = $12-99-02-0019.description
Var menu_name_eng_blender = $##-##-##-####.NameE
Var menu_desc_eng_blender = $##-##-##-####.descriptionE
Var menu_name_thai_blender = $##-##-##-####.Name
Var menu_desc_thai_blender = $##-##-##-####.description
DEBUGVAR PD_STAGE_1
DEBUGVAR PD_STAGE_2
DEBUGVAR PD_STAGE_3
Var SelectDrinkType = 0
Open "ROOT/taobin_project/xml/page_topping_select5.xml"
</EventOnClick>
</Button>
<Text>
<X> 16 </X>
<Y> 164 </Y>
<Size> 24 </Size>
<Width>220</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<State> showthaiText </State>
<Value> "เป๊ปซี่ชาดำครับจารย์" </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 220 </Y>
<Size> 14 </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<State> showthaiText </State>
<Value> "ชาไทย เป๊ปซี่" </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 164 </Y>
<Size> 22 </Size>
<Width>220</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<State> showengText </State>
<Value> "ON FLEEK" </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 220 </Y>
<Size> 14 </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<State> showengText </State>
<Value> "Thai tea, Pepsi" </Value>
</Text>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>
</Image>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<State> "Invisible" </State>
<Filename> Var( DirImage2 + "hot.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>
</Image>
<Text>
<X> 50 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "cold.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>
<State> $12-99-02-0019.Button </State>
</Image>
<Text>
<X> 115 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $12-99-02-0019.Button </State>
<Value> StringFmt( $12-99-02-0019.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 146 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "blend.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>
<State> "Invisible" </State>
</Image>
<Text>
<X> 180 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitRegularTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<State>
eval(
If ICE_PROCESS_STATUS = 2 Then
Var ice_tab_process_show = "Invisible"
Else
Var ice_tab_process_show = "Invisible"
EndIf
Var return = ice_tab_process_show
)
</State>
<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>
<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>
</Image>
<Image>
<X> 49 </X>
<Y> 117 </Y>
<State>
eval(
If $Sum1299020019 = "Disable" Then
STRCONTAIN "ERR" $##-##-##-####.TAG tag1_is_disable
STRCONTAIN "ERR" $12-99-02-0019.TAG tag2_is_disable
STRCONTAIN "ERR" $##-##-##-####.TAG tag3_is_disable
Var return = "Invisible"
If tag1_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag2_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag3_is_disable = "true" Then
Var return = "Enable"
EndIf
Else
Var return = "Invisible"
EndIf
)
</State>
<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>
</Image>
<Text>
<X> 84 </X>
<Y> 266 </Y>
<Size> 10 </Size>
<Font> OpunMediumTTF </Font>
<Color> 0xDE794E </Color>
<State> ice_tab_process_show </State>
<Value> ice_show_open </Value>
</Text>
<Text>
<X> 48 </X>
<Y> 116 </Y>
<Size> 32 </Size>
<Width>128</Width>
<Height>64</Height>
<Font> MITRegularTTF </Font>
<Color> 0x5A5A5A </Color>
<Mode> "disable-show" </Mode>
<State> $Sum1299020019 </State>
<Value> text_unavailable </Value>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
; - - -
; ==================> Len = 11
@ -2289,7 +2537,7 @@
<Volume> SoundVolume </Volume>
<EventOnClick>
Var NameDrink = "DONT MESS WITH MELON"
Var NameDrinkTH = "เป๊ปซี่อยู่ข้างล่อนนะคะ"
Var NameDrinkTH = "เป๊ปรักล่อนนะ"
Var DrinkDescriptionTH = "เป๊ปซี่ น้ำเชื่อมเมล่อน โซดา"
Var DrinkDescription = "Pepsi, Melon Syrup& Ice"
Var PictureDrink = "ROOT/taobin_project/image/page_drink_picture2_n/" + "bn_PEPSI_MELON.png"
@ -2360,7 +2608,7 @@
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<State> showthaiText </State>
<Value> "เป๊ปซี่อยู่ข้างล่อนนะคะ" </Value>
<Value> "เป๊ปรักล่อนนะ" </Value>
</Text>
<Text>
<X> 16 </X>

View file

@ -256,6 +256,10 @@
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-99-02-0019" Then
Var PromotionIDCurrentOrder = 5
EndIf
If SystemDateMonthInt = 7 Then
Var PromotionIDCurrentOrder = 0
EndIf
@ -267,6 +271,22 @@
Var RemainAmountStr = ""
If ModeFreeEnable = 1 Then
Var RemainAmountStr = "Free###size=150"
Var Seeker.VendingCode = "MKF"
Var Seeker.IntVendingCampaign = PriceDrink
Var Seeker.FreeVendingCampaign = 1
Var Seeker.CodeChannel = 1
Var Seeker.CodeNumber = IDNum
Open "ROOT/taobin_project/xml/page_payment_cash.xml"
EndIf
If ChildrenFree = 1 Then

View file

@ -443,7 +443,8 @@
__CMD "prepar-cup-from-order" 0 "-" "-"
Var PayState5 = "Disable"
;Open "ROOT/taobin_project/xml/page_page_camera.xml"
</EventOpen>

View file

@ -1380,6 +1380,9 @@
If RoadShow = "true" Then
Var PriceShowValue = "Free"
Var ModeFreeEnable = 1
Else
Var ModeFreeEnable = 0
EndIf
DEBUGVAR showShotEnable