Added: Rerun promotion
This commit is contained in:
parent
a09907615b
commit
a0334ca60e
13 changed files with 14745 additions and 39 deletions
|
|
@ -13,6 +13,95 @@
|
|||
else:
|
||||
fixed_price = 0
|
||||
|
||||
if current_file_name == "page_catalog_group_pro_rerun.skt":
|
||||
def GetPrice(product_code_1, product_code_2, product_code_3):
|
||||
prices = {
|
||||
"12-02-02-0043": 15,
|
||||
"12-99-05-0057": 15,
|
||||
"12-99-05-0059": 15,
|
||||
"12-02-02-0044": 20,
|
||||
"12-99-03-0046": 20,
|
||||
"12-99-02-0050": 20,
|
||||
"12-99-02-0011": 25,
|
||||
"12-99-02-0015": 25,
|
||||
"12-99-02-0003": 30,
|
||||
"12-99-02-0001": 30,
|
||||
"12-03-02-0036": 30,
|
||||
"12-03-03-0035": 35,
|
||||
"12-99-03-0066": 30
|
||||
}
|
||||
|
||||
|
||||
|
||||
if product_code_1 in prices:
|
||||
return prices[product_code_1]
|
||||
elif product_code_2 in prices:
|
||||
return prices[product_code_2]
|
||||
elif product_code_3 in prices:
|
||||
return prices[product_code_3]
|
||||
else:
|
||||
return ""
|
||||
|
||||
def GetOriginalPrice(product_code_1, product_code_2, product_code_3):
|
||||
original_prices = {
|
||||
"12-02-02-0043": 35,
|
||||
"12-99-05-0057": 20,
|
||||
"12-99-05-0059": 20,
|
||||
"12-02-02-0044": 25,
|
||||
"12-99-03-0046": 25,
|
||||
"12-99-02-0050": 25,
|
||||
"12-99-02-0011": 30,
|
||||
"12-99-02-0015": 30,
|
||||
"12-99-02-0003": 35,
|
||||
"12-99-02-0001": 35,
|
||||
"12-03-02-0036": 40,
|
||||
"12-03-03-0035": 45,
|
||||
"12-99-03-0066": 60
|
||||
}
|
||||
|
||||
if product_code_1 in original_prices:
|
||||
return original_prices[product_code_1]
|
||||
elif product_code_2 in original_prices:
|
||||
return original_prices[product_code_2]
|
||||
elif product_code_3 in original_prices:
|
||||
return original_prices[product_code_3]
|
||||
else:
|
||||
return ""
|
||||
|
||||
def GetTricker(product_code_1, product_code_2, product_code_3):
|
||||
trickers = {
|
||||
"12-02-02-0043": "PMD20",
|
||||
"12-99-05-0057": "PMD05",
|
||||
"12-99-05-0059": "PMD05",
|
||||
"12-02-02-0044": "PMD05",
|
||||
"12-99-03-0046": "PMD05",
|
||||
"12-99-02-0011": "PMD05",
|
||||
"12-99-02-0015": "PMD05",
|
||||
"12-99-02-0003": "PMD05",
|
||||
"12-99-02-0001": "PMD05",
|
||||
"12-03-02-0036": "PMD10",
|
||||
"12-03-03-0035": "PMD10",
|
||||
"12-99-03-0066": "PMD30"
|
||||
}
|
||||
|
||||
if product_code_1 in trickers:
|
||||
return trickers[product_code_1]
|
||||
elif product_code_2 in trickers:
|
||||
return trickers[product_code_2]
|
||||
elif product_code_3 in trickers:
|
||||
return trickers[product_code_3]
|
||||
else:
|
||||
return ""
|
||||
get_price = GetPrice
|
||||
get_original_price = GetOriginalPrice
|
||||
get_tricker = GetTricker
|
||||
rerun_fix_price = True
|
||||
else:
|
||||
get_price = None
|
||||
get_original_price = None
|
||||
get_tricker = None
|
||||
rerun_fix_price = False
|
||||
|
||||
if current_file_name == "page_catalog_group_pro_mymint.skt":
|
||||
from_my_mint_promotion = True
|
||||
menu_white_color_catalog = True
|
||||
|
|
@ -201,9 +290,15 @@
|
|||
|
||||
out_xml( '\t\tVar OpenFromXML = CurrentXMLFileName2\r\n')
|
||||
|
||||
out_xml( '\t\tVar PriceD1 = $' + spl[4] + '.Price\r\n')
|
||||
out_xml( '\t\tVar PriceD2 = $' + spl[5] + '.Price\r\n')
|
||||
out_xml( '\t\tVar PriceD3 = $' + spl[6] + '.Price\r\n')
|
||||
if rerun_fix_price:
|
||||
out_xml( '\t\tVar PriceD1 = ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '\r\n')
|
||||
out_xml( '\t\tVar PriceD2 = ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '\r\n')
|
||||
out_xml( '\t\tVar PriceD3 = ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '\r\n')
|
||||
out_xml( '\t\tVar OldPrice = ' + str(get_original_price(pd_code_1, pd_code_2, 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')
|
||||
out_xml( '\t\tVar PriceD3 = $' + spl[6] + '.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')
|
||||
|
|
@ -284,6 +379,10 @@
|
|||
if fixed_price > 0:
|
||||
out_xml( '\t\tVar From15THBPro = 1 \r\n')
|
||||
|
||||
if rerun_fix_price:
|
||||
out_xml( '\t\tVar FromRerunPro = 1 \r\n')
|
||||
out_xml( '\t\tVar RerunProCode = "' + get_tricker(pd_code_1, pd_code_2, pd_code_3) + '"\r\n')
|
||||
|
||||
if from_my_mint_promotion:
|
||||
out_xml( '\t\tVar FromMyMintPro = 1 \r\n')
|
||||
|
||||
|
|
@ -412,11 +511,15 @@
|
|||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> StringFmt( ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> StringFmt( $' + spl[4] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> "฿15" </Value>\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> "฿' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
|
@ -463,11 +566,15 @@
|
|||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> StringFmt( ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> StringFmt( $' + spl[5] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> "฿15" </Value>\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> "฿' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
|
@ -516,11 +623,15 @@
|
|||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> StringFmt( ' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + ' , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> StringFmt( $' + spl[6] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
||||
else:
|
||||
if fixed_price > 0:
|
||||
out_xml( '\t<Value> "฿15" </Value>\r\n')
|
||||
elif rerun_fix_price:
|
||||
out_xml( '\t<Value> "฿' + str(get_price(pd_code_1, pd_code_2, pd_code_3)) + '" </Value>\r\n')
|
||||
else:
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue