THA: Added V3 show original price when discount
This commit is contained in:
parent
bad95600a9
commit
ed10cb34f1
1 changed files with 98 additions and 23 deletions
|
|
@ -96,35 +96,108 @@
|
|||
if "show-blend-only" in xml_parameter:
|
||||
print("Hot price ignore ")
|
||||
else:
|
||||
out_xml('\t\t<HotPrice> eval( \n')
|
||||
out_xml('\t\t<HotPrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_1 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = "Free"\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_1 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_1 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_1 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_1 +'.Discount , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_1 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</HotPrice>\n')
|
||||
|
||||
out_xml( '\t\tIf $' + pd_code_1 + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return !assigned StringFmt( $' + pd_code_1 + '.Price , DisplayFormat, PreScaleConvertShow) \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
out_xml('\t\t) </HotPrice>\n')
|
||||
out_xml('\t\t<HotOriginalPrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_1 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_1 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return ""\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_1 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_1 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</HotOriginalPrice>\n')
|
||||
|
||||
|
||||
if "show-blend-only" in xml_parameter:
|
||||
print("Cold price ignore ")
|
||||
else:
|
||||
out_xml('\t\t<IcePrice> eval( \n')
|
||||
out_xml( '\t\tIf $' + pd_code_2 + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return !assigned StringFmt( $' + pd_code_2 + '.Price , DisplayFormat, PreScaleConvertShow) \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
out_xml('\t\t) </IcePrice>\n')
|
||||
out_xml('\t\t<IcePrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_2 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = "Free"\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_2 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_2 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_2 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_2 +'.Discount , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_2 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</IcePrice>\n')
|
||||
|
||||
out_xml('\t\t<IceOriginalPrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_2 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_2 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return ""\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_2 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_2 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</IceOriginalPrice>\n')
|
||||
|
||||
out_xml('\t\t<BlendPrice> eval( \n')
|
||||
out_xml( '\t\tIf $' + pd_code_3 + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return !assigned StringFmt( $' + pd_code_3 + '.Price , DisplayFormat, PreScaleConvertShow) \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
out_xml('\t\t) </BlendPrice>\n')
|
||||
out_xml('\t\t<BlendPrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_3 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = "Free"\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_3 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_3 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_3 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_3 +'.Discount , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_3 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</BlendPrice>\n')
|
||||
|
||||
out_xml('\t\t<BlendOriginalPrice>\n')
|
||||
out_xml('\t\t\teval(\n')
|
||||
out_xml('\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tIf $' + pd_code_3 +'.Price = -1 Then\n')
|
||||
out_xml('\t\t\t\t\tVar return = ""\n')
|
||||
out_xml('\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\tIf $' + pd_code_3 + '.Discount = "" Then\n')
|
||||
out_xml('\t\t\t\t\t\tVar return ""\n')
|
||||
out_xml('\t\t\t\t\tElse\n')
|
||||
out_xml('\t\t\t\t\t\tIf $' + pd_code_3 + '.Discount = > 0 Then\n')
|
||||
out_xml('\t\t\t\t\t\t\tVar return !assigned StringFmt( $' + pd_code_3 +'.Price , DisplayFormat, PreScaleConvertShow)\n')
|
||||
out_xml('\t\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t\tEndIf\n')
|
||||
out_xml('\t\t\t)\n')
|
||||
out_xml('\t\t</BlendOriginalPrice>\n')
|
||||
|
||||
|
||||
out_xml('\t\t<IceProcessingState>\n')
|
||||
|
|
@ -422,7 +495,7 @@
|
|||
out_xml('\t\t\t<Color> 0x322B26 </Color>\n')
|
||||
out_xml('\t\t\t<ColorDisable> 0xEAE6E1 </ColorDisable>\n')
|
||||
out_xml('\t\t\t<AutoResizeConfiguration>\n')
|
||||
out_xml('\t\t\t\t<Min> 16 </Min>\n')
|
||||
out_xml('\t\t\t\t<Min> 10 </Min>\n')
|
||||
out_xml('\t\t\t\t<Max> 22 </Max>\n')
|
||||
out_xml('\t\t\t\t<AdjustStep> 1 </AdjustStep>\n')
|
||||
out_xml('\t\t\t</AutoResizeConfiguration>\n')
|
||||
|
|
@ -441,9 +514,10 @@
|
|||
out_xml('\t\t\t<Font> KanitRegularTTF </Font>\n')
|
||||
out_xml('\t\t\t<Color> 0x6F5F51 </Color>\n')
|
||||
out_xml('\t\t\t<ColorDisable> 0xEAE6E1 </ColorDisable>\n')
|
||||
out_xml('\t\t\t<ColorDiscount> 0xCC0A14 </ColorDiscount>\n')
|
||||
out_xml('\t\t\t<AutoResizeConfiguration>\n')
|
||||
out_xml('\t\t\t\t<Min> 4 </Min>\n')
|
||||
out_xml('\t\t\t\t<Max> 20 </Max>\n')
|
||||
out_xml('\t\t\t\t<Max> 14 </Max>\n')
|
||||
out_xml('\t\t\t\t<AdjustStep> 1 </AdjustStep>\n')
|
||||
out_xml('\t\t\t</AutoResizeConfiguration>\n')
|
||||
out_xml('\t\t</MenuPriceTextConfiguration>\n')
|
||||
|
|
@ -451,6 +525,7 @@
|
|||
out_xml('\t\t<MenuIcePriceLabel> 000082 </MenuIcePriceLabel>\n')
|
||||
out_xml('\t\t<MenuBlendPriceLabel> 000083 </MenuBlendPriceLabel>\n')
|
||||
out_xml('\t\t<MenuUnavailableLabel> 000013 </MenuUnavailableLabel>\n')
|
||||
out_xml('\t\t<ShowOriginalPrice> "Enable" </ShowOriginalPrice>\n')
|
||||
out_xml('\t</Configuration>\n')
|
||||
out_xml('\t<Menus>\n')
|
||||
out_xml(';banners\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue