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