This commit is contained in:
kong 2023-05-31 22:13:06 +07:00
parent d2469e310c
commit 8b51462cfd
53 changed files with 11954 additions and 121 deletions

View file

@ -232,9 +232,17 @@ HOT MELON TAIWANESE 12-02-01-0035 1 6 7 10 25 24 120 7:00 23
PEPSI YUZU 12-05-02-0053 1 14 53 23 13 24 120 4:00 23
PEPSI BANANA 12-05-02-0054 1 14 56 23 13 24 120 4:00 23
PEPSI LYCHEE 12-05-02-0048 1 14 11 23 13 24 120 4:00 23
เป๊ปดี จี่ก็ว่าดี 12-05-02-0057 1 14 11 23 13 24 120 7:00 23
เข้มจัดเลยพี่เป๊ปซี่กาแฟ 12-01-02-0056 1 14 3 4 5 23 13 24 120 8:00 23
ชาดำครับจารย์ 12-02-02-0048 1 14 10 23 13 24 120 9:00 23
เป๊ปซี่นมแน่นะวิ 12-03-02-0027 1 14 7 23 13 24 120 10:00 23
น้ำแดงอยู่ข้างเป๊ปซี่นะคะ 12-05-02-0058 1 14 21 23 13 24 120 11:00 23
24 120 12:00 23
24 120 13:00 23
24 120 14:00 23

Can't render this file because it has a wrong number of fields in line 40.

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View file

@ -0,0 +1,6 @@
normal_eng=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_en.png
normal_thai=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_th.png
press_eng=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_en.png
press_thai=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_th.png
disable_eng=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_en.png
disable_thai=ROOT/taobin_project/image/event/bn_pepsi_buy2_save_move_th.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -11,25 +11,56 @@ else:
file_xml.close()
if "template1" in param:
# " "
file_inc2 = open(directory_to_process + "/event/big_logo_back_to_school.inc", 'r')
file_inc2_content = file_inc2.read()
content_data = content_data_was_repack.replace(";BigLogoLayout", file_inc2_content)
file_inc2 = open(directory_to_process + "/event/promotion_template1.inc", 'r')
file_inc2_content = file_inc2.read()
file_inc_img = open(directory_to_process + "../image/event/image_template", 'r')
file_inc2_img_content = file_inc_img.read()
begin_text = content_data.index(";TAGESP")
end_text = content_data.index(";TAGESP", begin_text + 7)
#print("sub text = " + str(begin_text) + " end = " + str(end_text))
tmp1 = content_data[: begin_text - 7]
# replace key.
tmp2 = content_data[ end_text:-1]
#print("tmp1=" + tmp1)
#print("tmp2=" + tmp2)
sp_key = file_inc2_img_content.split("\n")
print("sp_key = " + str(len( sp_key)))
for sp_line in sp_key:
sp_line = sp_line.strip()
key_val = sp_line.split("=")
if len( key_val) == 2:
print("k = " + key_val[0] + " val=" + key_val[1])
file_inc2_content = file_inc2_content.replace( "###" + key_val[0], '"' + key_val[1].strip() + '"')
content_data = tmp1 + tmp2
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick.inc", 'r')
file_inc_event_click_content = file_inc_event_click.read()
file_xml3 = open(directory_to_process + "/event/page_recommend_backToSchool.xml", 'w')
file_xml3.write( content_data)
file_xml3.close()
file_inc2_content = file_inc2_content.replace("###EventOnClick", file_inc_event_click_content)
print(file_inc2_content)
#print( file_inc_content)
content_data_was_repack = file_content_main.replace(";dummy_layout.inc", file_inc_content)
content_data = content_data_was_repack.replace(";BigLogoLayout", file_inc2_content)
begin_text = content_data.index(";TAGESP")
end_text = content_data.index(";TAGESP", begin_text + 7)
#print("sub text = " + str(begin_text) + " end = " + str(end_text))
tmp1 = content_data[: begin_text - 7]
tmp2 = content_data[ end_text:-1]
#print("tmp1=" + tmp1)
#print("tmp2=" + tmp2)
content_data = tmp1 + tmp2
file_xml3_out = open(directory_to_process + "/event/out_put_file.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", "")
file_xml3_out_content = file_xml3_out_content.replace("\n", "")
file_xml3 = open(directory_to_process + file_xml3_out_content, 'w')
file_xml3.write( content_data)
file_xml3.close()

View file

@ -0,0 +1 @@
/event/promotion_pepsi.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

@ -5,9 +5,7 @@
<Filename>
eval(
If show_eng = "true" Then
Var return = ###normal_eng
Else
Var return = ###normal_thai
EndIf
@ -16,9 +14,7 @@
<FilenamePress>
eval(
If show_eng = "true" Then
Var return = ###press_eng
Var return = ###press_eng
Else
Var return = ###press_thai
EndIf
@ -27,9 +23,7 @@
<FilenameDisable>
eval(
If show_eng = "true" Then
Var return = ###disable_eng
Else
Var return = ###disable_thai
EndIf

View file

@ -2,37 +2,19 @@
; zone promote
If OpenFromPageBoard = 1 Then
If SongkranEnable = 1 Then
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend3.xml"
If PepsiProEnable = 1 Then
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
Var OpenFromPageBoard = 0
Else
If OreoForFreeEnable = 1 Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_backToSchool.xml"
Var OpenFromPageBoard = 0
EndIf
If OreoDueEnable = 1 Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_oreo_buy2_save_more.xml"
Var OpenFromPageBoard = 0
EndIf
If OpenFromPageBoard = 1 Then
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
EndIf
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
EndIf
Else
If SongkranEnable = 1 Then
Open "ROOT/taobin_project/xml/page_catalog_group_recommend3.xml"
If PepsiProEnable = 1 Then
Open "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
Else
If OreoForFreeEnable = 1 Then
Open "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_backToSchool.xml"
EndIf
If OreoDueEnable = 1 Then
Open "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_oreo_buy2_save_more.xml"
EndIf
Open "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
EndIf

View file

@ -1,63 +1,58 @@
Var PromotionIDOreoBuyTwoSaveMore = 0
Var BackToSchoolForFreeEnable = 0
;DEBUGVAR SystemDateMonthInt
;DEBUGVAR SystemDateDayInt
Var OreoForFreeEnable = 0
; Reset flag away.
Var OreoDueEnable = 0
Var OreoForFreeEnable = 0
Var SoundBackToSchoolEnable = 0
Var PromotionIDOreoBuyTwoSaveMore = 0
Var BackToSchoolForFreeEnable = 0
If SystemDateMonthInt = 5 Then
If SystemDateDayInt = 6 Then
Var OreoDueEnable = 1
EndIf
If SystemDateDayInt = 7 Then
Var OreoDueEnable = 1
EndIf
Var SoundBackToSchoolType = 0
; End
Var PepsiProEnable = 0
If SystemDateMonthInt = 6 Then
If SystemDateDayInt = 12 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 13 Then
Var OreoDueEnable = 1
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 14 Then
Var OreoDueEnable = 1
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 15 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 16 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 19 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 20 Then
Var OreoDueEnable = 1
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 21 Then
Var OreoDueEnable = 1
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 27 Then
Var OreoDueEnable = 1
If SystemDateDayInt = 22 Then
Var PepsiProEnable = 1
EndIf
If SystemDateDayInt = 28 Then
Var OreoDueEnable = 1
If SystemDateDayInt = 23 Then
Var PepsiProEnable = 1
EndIf
EndIf
If SystemDateMonthInt = 5 Then
If SystemDateDayInt > 7 Then
If SystemDateDayInt < 13 Then
Var OreoForFreeEnable = 1
EndIf
EndIf
If SystemDateDayInt > 14 Then
If SystemDateDayInt < 20 Then
Var OreoForFreeEnable = 1
EndIf
EndIf
EndIf
If BoxID = 200001 Then
Var OreoDueEnable = 0
Var OreoForFreeEnable = 0
@ -68,25 +63,17 @@ If BoxID = 200000 Then
Var OreoForFreeEnable = 0
EndIf
Var OreoForFreeLimit = ""
READ_FILE "/mnt/sdcard/oreo_for_free_limit" OreoForFreeLimit
If BoxID = 172053 Then
Var PepsiProEnable = 1
EndIf
If BoxID = 172644 Then
Var PepsiProEnable = 1
EndIf
Var SoundBackToSchoolEnable = 1
DEBUGVAR OreoForFreeLimit
DEBUGVAR PepsiProEnable
DEBUGVAR OreoDueEnable
DEBUGVAR OreoForFreeEnable
; Init default
If SoundBackToSchoolType = "" Then
Var SoundBackToSchoolType = 1
EndIf
If SoundBackToSchoolType = 1 Then
Var SoundBackToSchoolType = 2
Else
Var SoundBackToSchoolType = 1
EndIf

View file

@ -669,14 +669,14 @@
</EventWebApp>
<EventUnitTest1>
WRITE_FILE "/mnt/sdcard/oreo_for_free_limit" "-"
</EventUnitTest1>
<EventUnitTest2>
WRITE_FILE "/mnt/sdcard/oreo_for_free_limit" "true"
</EventUnitTest2>
<EventUnitTest3>
Open "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_backToSchool.xml"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/event/promotion_pepsi.xml"
</EventUnitTest3>
<EventUnitTest4>
Open "/mnt/sdcard/coffeevending/taobin_project/xml/event/page_recommend_oreo_buy2_save_more.xml"

View file

@ -0,0 +1,45 @@
<?hurr
#include=menu_head.py
?>
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
;<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
; On open
<?hurr
#include=menu_catalog_default_init.py
?>
Var Timeout = 0
<?hurr
#include=menu_catalog_new_menu.py
?>
</EventOpen>
<?hurr
#include=menu_catalog_new.py
?>
<?hurr
#include=menu_new_layout_gen_v2.py
?>
<?hurr
#include=menu_new_layout_gen.py
?>
</Popup>

File diff suppressed because it is too large Load diff

View file

@ -227,35 +227,40 @@
EndIf
If SongkranEnable = 1 Then
If UserSelectProductCode = "12-01-02-0054" Then
Var PromotionIDCurrentOrder = 3
If PepsiProEnable = 1 Then
If UserSelectProductCode = "12-05-02-0046" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-01-02-0053" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-05-02-0047" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-02-02-0043" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-05-02-0053" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-02-02-0044" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-05-02-0054" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-03-02-0026" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-05-02-0057" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-05-02-0055" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-05-02-0058" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-05-02-0056" Then
Var PromotionIDCurrentOrder = 3
If UserSelectProductCode = "12-02-02-0048" Then
Var PromotionIDCurrentOrder = 5
EndIf
If UserSelectProductCode = "12-01-02-0056" Then
Var PromotionIDCurrentOrder = 5
EndIf
If SystemDateMonthInt = 5 Then
If SystemDateMonthInt = 7 Then
Var PromotionIDCurrentOrder = 0
EndIf
EndIf
DEBUGVAR PromotionIDCurrentOrder
Var RemainAmountStr = ""

View file

@ -108,8 +108,8 @@
Var RandomPromotionMyworld = 0
Var RandomSalePackage = 0
Var XMLPageVersion = "7.25"
Var XMLPageVersionInt = 725
Var XMLPageVersion = "7.26"
Var XMLPageVersionInt = 726
</EventOpen>
<Text>