DO inter and thai
This commit is contained in:
parent
0a1047061f
commit
077e214534
25 changed files with 7571 additions and 1219 deletions
|
|
@ -1,115 +1,5 @@
|
|||
if "v2" in param:
|
||||
|
||||
idx_lang_malay = 5
|
||||
idx_lang_japan = 4
|
||||
idx_lang_china = 3
|
||||
idx_lang_thai = 2
|
||||
idx_lang_eng = 1
|
||||
|
||||
|
||||
idx_name = 0
|
||||
idx_desc = 1
|
||||
idx_img = 2
|
||||
|
||||
|
||||
idx_hot_product_code = 7
|
||||
idx_cold_product_code = idx_hot_product_code + 1
|
||||
idx_blend_product_code = idx_cold_product_code + 1
|
||||
|
||||
#
|
||||
idx_hot_product_code2 = idx_blend_product_code + 1
|
||||
idx_cold_product_code2 = idx_hot_product_code2 + 1
|
||||
idx_blend_product_code2 = idx_cold_product_code2 + 1
|
||||
idx_of_eng = 2
|
||||
idx_of_eng_des = 3
|
||||
idx_of_thai = 0
|
||||
idx_of_thai_des = 1
|
||||
print ("--------------------------------------------------------------------------------------------------------------------------")
|
||||
|
||||
|
||||
if current_file_name == "page_catalog_group_recommend.skt":
|
||||
touch_less_gen = True
|
||||
else:
|
||||
touch_less_gen = False
|
||||
|
||||
out_xml('<FrameScroll> \r\n')
|
||||
if touch_less_gen == True:
|
||||
out_xml('<Max> 16 </Max>\r\n')
|
||||
out_xml('<X> 10 </X>\r\n')
|
||||
out_xml('<Y> 497 </Y>\r\n')
|
||||
out_xml('<Width> 1080 </Width>\r\n')
|
||||
out_xml('<ScrollHeight> "auto" </ScrollHeight>\r\n')
|
||||
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
|
||||
out_xml('<Column> 4 </Column>\r\n')
|
||||
out_xml('<Script>\r\n')
|
||||
|
||||
print("current_file_name " + current_file_name)
|
||||
|
||||
|
||||
if touch_less_gen == False:
|
||||
|
||||
out_xml('\t Var block_index_override = 0\r\n')
|
||||
out_xml('\t Var block_index_move = 0\r\n')
|
||||
else:
|
||||
|
||||
out_xml('\t Var block_index_override = 4\r\n')
|
||||
out_xml('\t Var block_index_move = 1\r\n')
|
||||
|
||||
|
||||
out_xml('\tIf Seeker = "curr" Then\r\n')
|
||||
out_xml('\t\tVar TouchLessStg = "Enable"\r\n')
|
||||
out_xml('\t\tVar TouchLessQrStg = "Enable"\r\n')
|
||||
out_xml('\tElse\r\n')
|
||||
out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
||||
out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
||||
out_xml('\tEndIf\r\n')
|
||||
|
||||
out_xml('\tIf WebAppShow = "Invisible" Then\r\n')
|
||||
out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
||||
out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
||||
out_xml('\tEndIf\r\n')
|
||||
|
||||
|
||||
out_xml('</Script>\r\n')
|
||||
|
||||
pd_code_available = '##-##-##-####'
|
||||
count = 0
|
||||
count_test = 0
|
||||
if touch_less_gen == True:
|
||||
out_xml( '<Block>\r\n')
|
||||
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
||||
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
||||
out_xml('\t<Width> 225 </Width>\r\n')
|
||||
out_xml('\t<Height> 296 </Height>\r\n')
|
||||
out_xml('\t<State> "Enable" </State> \r\n')
|
||||
out_xml('\t<Image>\r\n')
|
||||
out_xml('\t<X> 0 </X>\r\n')
|
||||
out_xml('\t<Y> 0 </Y>\r\n')
|
||||
out_xml('\t<State> TouchLessStg </State> \r\n')
|
||||
out_xml('\t<Filename> Var( DirImage + "/touch_less_order.png" )</Filename>\r\n')
|
||||
out_xml('\t<FilenameDisable> Var( DirImage + "/touch_less_order_db.png" )</FilenameDisable>\r\n')
|
||||
out_xml('\t</Image>\r\n')
|
||||
out_xml('\t<QRCode>\r\n')
|
||||
out_xml('\t<X> 40 </X>\r\n')
|
||||
out_xml('\t<Y> 153 </Y>\r\n')
|
||||
out_xml('\t<Width> 150 </Width>\r\n')
|
||||
out_xml('\t<Color> "0xeae6e1" </Color>\r\n')
|
||||
out_xml('\t<QRColor> "0x513C2F" </Color>\r\n')
|
||||
out_xml('\t<Height> 150 </Height>\r\n')
|
||||
|
||||
#out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
||||
#out_xml('\t<Service> "Herr" </Service>\r\n')
|
||||
out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
||||
out_xml('\t<Service> testservice </Service>\r\n')
|
||||
|
||||
out_xml('\t</QRCode>\r\n')
|
||||
out_xml('</Block>\r\n')
|
||||
|
||||
#out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
|
||||
for spl in menu_new_list:
|
||||
#product_code = s
|
||||
#if spl[ idx_of_eng] == "IGNORE":
|
||||
# continue
|
||||
def GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code):
|
||||
print(" size " + str( len(spl)) + " img=" + spl[ idx_img][1] )
|
||||
out_xml( '\t; ==================> Len = ' + str(len(spl)) + '\r\n')
|
||||
menu_img = spl[ idx_img][1]
|
||||
|
|
@ -556,14 +446,124 @@
|
|||
|
||||
|
||||
out_xml( '</Block>\r\n')
|
||||
|
||||
idx_lang_malay = 5
|
||||
idx_lang_japan = 4
|
||||
idx_lang_china = 3
|
||||
idx_lang_thai = 2
|
||||
idx_lang_eng = 1
|
||||
|
||||
out_xml( '\t; parallel '+ spl[ idx_name][ idx_hot_product_code2] + ' ' + spl[ idx_name][ idx_cold_product_code2] + ' ' + spl[ idx_name][ idx_blend_product_code2] + ' \r\n')
|
||||
|
||||
idx_name = 0
|
||||
idx_desc = 1
|
||||
idx_img = 2
|
||||
|
||||
|
||||
idx_hot_product_code = 7
|
||||
idx_cold_product_code = idx_hot_product_code + 1
|
||||
idx_blend_product_code = idx_cold_product_code + 1
|
||||
|
||||
#
|
||||
idx_hot_product_code2 = idx_blend_product_code + 1
|
||||
idx_cold_product_code2 = idx_hot_product_code2 + 1
|
||||
idx_blend_product_code2 = idx_cold_product_code2 + 1
|
||||
idx_of_eng = 2
|
||||
idx_of_eng_des = 3
|
||||
idx_of_thai = 0
|
||||
idx_of_thai_des = 1
|
||||
print ("--------------------------------------------------------------------------------------------------------------------------")
|
||||
|
||||
|
||||
if current_file_name == "page_catalog_group_recommend.skt":
|
||||
touch_less_gen = True
|
||||
else:
|
||||
touch_less_gen = False
|
||||
|
||||
out_xml('<FrameScroll> \r\n')
|
||||
if touch_less_gen == True:
|
||||
out_xml('<Max> 16 </Max>\r\n')
|
||||
out_xml('<X> 10 </X>\r\n')
|
||||
out_xml('<Y> 497 </Y>\r\n')
|
||||
out_xml('<Width> 1080 </Width>\r\n')
|
||||
out_xml('<ScrollHeight> "auto" </ScrollHeight>\r\n')
|
||||
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
|
||||
out_xml('<Column> 4 </Column>\r\n')
|
||||
out_xml('<Script>\r\n')
|
||||
|
||||
print("current_file_name " + current_file_name)
|
||||
|
||||
|
||||
if touch_less_gen == False:
|
||||
|
||||
out_xml('\t Var block_index_override = 0\r\n')
|
||||
out_xml('\t Var block_index_move = 0\r\n')
|
||||
else:
|
||||
print("dummy")
|
||||
#out_xml('\t Var block_index_override = 4\r\n')
|
||||
#out_xml('\t Var block_index_move = 1\r\n')
|
||||
#out_xml('\tIf Seeker = "curr" Then\r\n')
|
||||
#out_xml('\t\tVar TouchLessStg = "Enable"\r\n')
|
||||
#out_xml('\t\tVar TouchLessQrStg = "Enable"\r\n')
|
||||
#out_xml('\tElse\r\n')
|
||||
#out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
||||
#out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
||||
#out_xml('\tEndIf\r\n')
|
||||
#out_xml('\tIf WebAppShow = "Invisible" Then\r\n')
|
||||
#out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
||||
#out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
||||
#out_xml('\tEndIf\r\n')
|
||||
|
||||
|
||||
out_xml('</Script>\r\n')
|
||||
|
||||
pd_code_available = '##-##-##-####'
|
||||
count = 0
|
||||
count_test = 0
|
||||
#if touch_less_gen == True:
|
||||
# out_xml( '<Block>\r\n')
|
||||
# out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
||||
# out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
||||
# out_xml('\t<Width> 225 </Width>\r\n')
|
||||
# out_xml('\t<Height> 296 </Height>\r\n')
|
||||
# out_xml('\t<State> "Enable" </State> \r\n')
|
||||
# out_xml('\t<Image>\r\n')
|
||||
# out_xml('\t<X> 0 </X>\r\n')
|
||||
# out_xml('\t<Y> 0 </Y>\r\n')
|
||||
# out_xml('\t<State> TouchLessStg </State> \r\n')
|
||||
# out_xml('\t<Filename> Var( DirImage + "/touch_less_order.png" )</Filename>\r\n')
|
||||
# out_xml('\t<FilenameDisable> Var( DirImage + "/touch_less_order_db.png" )</FilenameDisable>\r\n')
|
||||
# out_xml('\t</Image>\r\n')
|
||||
# out_xml('\t<QRCode>\r\n')
|
||||
# out_xml('\t<X> 40 </X>\r\n')
|
||||
# out_xml('\t<Y> 153 </Y>\r\n')
|
||||
# out_xml('\t<Width> 150 </Width>\r\n')
|
||||
# out_xml('\t<Color> "0xeae6e1" </Color>\r\n')
|
||||
# out_xml('\t<QRColor> "0x513C2F" </Color>\r\n')
|
||||
# out_xml('\t<Height> 150 </Height>\r\n')
|
||||
#
|
||||
# #out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
||||
# #out_xml('\t<Service> "Herr" </Service>\r\n')
|
||||
# out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
||||
# out_xml('\t<Service> testservice </Service>\r\n')
|
||||
#
|
||||
# out_xml('\t</QRCode>\r\n')
|
||||
# out_xml('</Block>\r\n')
|
||||
#
|
||||
#out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
|
||||
for spl in menu_new_list:
|
||||
#product_code = s
|
||||
#if spl[ idx_of_eng] == "IGNORE":
|
||||
# continue
|
||||
|
||||
GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code)
|
||||
#out_xml( '\t; parallel '+ spl[ idx_name][ idx_hot_product_code2] + ' ' + spl[ idx_name][ idx_cold_product_code2] + ' ' + spl[ idx_name][ idx_blend_product_code2] + ' \r\n')
|
||||
#print("++++++++++++++++++++++++++++++ " + str( count_test) )
|
||||
#count_test = count_test + 1
|
||||
#if count_test > 5 :
|
||||
# break
|
||||
|
||||
|
||||
if spl[ idx_name][ idx_hot_product_code2] != "-" or spl[ idx_name][ idx_cold_product_code2] != "-" or spl[ idx_name][ idx_blend_product_code2] != "-":
|
||||
GenMenuBlock( idx_hot_product_code2, idx_cold_product_code2, idx_blend_product_code2)
|
||||
out_xml( '; hurr\r\n')
|
||||
|
||||
out_xml('</FrameScroll>\r\n')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue