Add Wednesday melon promotion (not test yet)

This commit is contained in:
Kenta420 2024-05-07 17:56:23 +07:00
parent 658a70ff53
commit fd032aa287
95 changed files with 70322 additions and 9124 deletions

View file

@ -178,6 +178,59 @@
else:
from_tea_time_pro = False
if current_file_name == "page_catalog_group_pro_wednesday_melon.skt":
wednesday_melon_prices = {
"12-03-01-0022": 25,
"12-03-02-0022": 30,
"12-03-03-0022": 35,
"12-01-01-0039": 30,
"12-01-02-0039": 35,
"12-21-01-0039": 30,
"12-21-02-0039": 35,
"12-03-03-0028": 40,
"12-05-02-0044": 20,
"12-05-02-0047": 15,
"12-05-03-0047": 20,
"12-05-02-0105": 15,
"12-05-03-0105": 20,
"12-99-02-0011": 20,
"12-99-02-0013": 30,
"12-99-02-0014": 20,
"12-99-02-0015": 15,
"12-99-02-0016": 20,
"12-99-02-0018": 25,
"12-99-03-0016": 35
}
wednesday_melon_original_prices = {
"12-03-01-0022": 35,
"12-03-02-0022": 40,
"12-03-03-0022": 45,
"12-01-01-0039": 40,
"12-01-02-0039": 45,
"12-21-01-0039": 40,
"12-21-02-0039": 45,
"12-03-03-0028": 50,
"12-05-02-0044": 30,
"12-05-02-0047": 25,
"12-05-03-0047": 30,
"12-05-02-0105": 25,
"12-05-03-0105": 30,
"12-99-02-0011": 30,
"12-99-02-0013": 40,
"12-99-02-0014": 30,
"12-99-02-0015": 25,
"12-99-02-0016": 30,
"12-99-02-0018": 35,
"12-99-03-0016": 45
}
wednesday_melon_fix_price = True
else:
wednesday_melon_prices = {}
wednesday_melon_original_prices = {}
wednesday_melon_fix_price = False
#print ("######################################################################################################")
idx_of_eng = 2
out_xml('<FrameScroll> \r\n')
@ -380,7 +433,13 @@
out_xml( '\t\tVar OriginalPriceD1 = ' + str(GetOriginalPrice(monday_banana_original_prices, pd_code_1)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD2 = ' + str(GetOriginalPrice(monday_banana_original_prices, pd_code_2)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD3 = ' + str(GetOriginalPrice(monday_banana_original_prices, pd_code_3)) + '\r\n')
elif wednesday_melon_fix_price:
out_xml( '\t\tVar PriceD1 = ' + str(GetPrice(wednesday_melon_prices, pd_code_1)) + '\r\n')
out_xml( '\t\tVar PriceD2 = ' + str(GetPrice(wednesday_melon_prices, pd_code_2)) + '\r\n')
out_xml( '\t\tVar PriceD3 = ' + str(GetPrice(wednesday_melon_prices, pd_code_3)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD1 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_1)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD2 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_2)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD3 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_3)) + '\r\n')
else:
out_xml( '\t\tVar PriceD1 = $' + spl[4] + '.Price\r\n')
out_xml( '\t\tVar PriceD2 = $' + spl[5] + '.Price\r\n')
@ -472,6 +531,9 @@
if monday_banana_fix_price:
out_xml( '\t\tVar FromMondayBananaPro = 1 \r\n')
if wednesday_melon_fix_price:
out_xml( '\t\tVar FromWednesdayMelonPro = 1 \r\n')
if from_my_mint_promotion:
out_xml( '\t\tVar FromMyMintPro = 1 \r\n')
@ -621,6 +683,8 @@
out_xml( '\t<Value> StringFmt( ' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(monday_banana_prices, spl[4])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif wednesday_melon_prices:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[4])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[4] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
@ -630,6 +694,8 @@
out_xml( '\t<Value> "฿' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> "฿' + str(GetPrice(monday_banana_prices, spl[4])) + '" </Value>\r\n')
elif wednesday_melon_prices:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[4])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
@ -684,6 +750,8 @@
out_xml( '\t<Value> StringFmt( ' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(monday_banana_prices, spl[5])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif wednesday_melon_fix_price:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[5])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[5] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
@ -693,6 +761,8 @@
out_xml( '\t<Value> "฿' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> "฿' + str(GetPrice(monday_banana_prices, spl[5])) + '" </Value>\r\n')
elif wednesday_melon_fix_price:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[5])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
@ -763,6 +833,8 @@
out_xml( '\t<Value> StringFmt( ' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(monday_banana_prices, spl[6])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
elif wednesday_melon_fix_price:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[6])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[6] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
@ -772,6 +844,8 @@
out_xml( '\t<Value> "฿' + str(GetPrice_Old(rerun_prices, pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
elif monday_banana_fix_price:
out_xml( '\t<Value> "฿' + str(GetPrice(monday_banana_prices, spl[6])) + '" </Value>\r\n')
elif wednesday_melon_fix_price:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[6])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
@ -961,9 +1035,17 @@
out_xml( '\t\tVar OpenFromXML = CurrentXMLFileName2\r\n')
out_xml( '\t\tVar PriceD1 = $' + spl[8] + '.Price\r\n')
out_xml( '\t\tVar PriceD2 = $' + spl[9] + '.Price\r\n')
out_xml( '\t\tVar PriceD3 = $' + spl[10] + '.Price\r\n')
if wednesday_melon_fix_price:
out_xml( '\t\tVar PriceD1 = ' + str(GetPrice(wednesday_melon_prices, pd_code_1)) + '\r\n')
out_xml( '\t\tVar PriceD2 = ' + str(GetPrice(wednesday_melon_prices, pd_code_2)) + '\r\n')
out_xml( '\t\tVar PriceD3 = ' + str(GetPrice(wednesday_melon_prices, pd_code_3)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD1 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_1)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD2 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_2)) + '\r\n')
out_xml( '\t\tVar OriginalPriceD3 = ' + str(GetOriginalPrice(wednesday_melon_original_prices, pd_code_3)) + '\r\n')
else:
out_xml( '\t\tVar PriceD1 = $' + spl[8] + '.Price\r\n')
out_xml( '\t\tVar PriceD2 = $' + spl[9] + '.Price\r\n')
out_xml( '\t\tVar PriceD3 = $' + spl[10] + '.Price\r\n')
out_xml( '\t\tVar PD_CODE1 = "' + pd_code_1 + '"\r\n')
out_xml( '\t\tVar PD_CODE2 = "' + pd_code_2 + '"\r\n')
@ -1056,6 +1138,9 @@
if from_tea_time_pro:
out_xml( '\t\tVar FromTeaTimePro = 1 \r\n')
if wednesday_melon_fix_price:
out_xml( '\t\tVar FromWednesdayMelonPro = 1 \r\n')
out_xml( '\t\t\r\n')
out_xml( '\t\t\r\n')
@ -1164,9 +1249,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[8] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[8])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' +spl[8] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[8] + '.Price ) </Value>\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[8])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[8] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
@ -1211,9 +1302,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[9] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[9])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' +spl[9] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[9] + '.Price ) </Value>\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[9])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[9] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
@ -1257,9 +1354,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[10] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> StringFmt( ' + str(GetPrice(wednesday_melon_prices, spl[10])) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' +spl[10] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[10] + '.Price ) </Value>\r\n')
if wednesday_melon_prices:
out_xml( '\t<Value> "฿' + str(GetPrice(wednesday_melon_prices, spl[10])) + '" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[10] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')