Commit 435dd9d1 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce: return useless calls

parent 7a2c616e
......@@ -63,9 +63,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -149,17 +147,4 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Resource_getWebShopImageURL()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -3,25 +3,31 @@ DRESSING DAILS<br />By TOM TAYLOR<br />
<span class="price">14,89 &euro;</span>
<span class="old_price">29,95 &euro;</span>
"""
if not context.getWebSiteValue():
return
clean = 0
if context.REQUEST.get("variation", None) is None:
context.REQUEST.set("variation", context.REQUEST.get("default_displayed_variation"))
clean = 1
price = cell.Resource_getShopPrice()
old_price = cell.getDefaultSaleSupplyLineBasePrice()
#old_price = cell.getDefaultSaleSupplyLineBasePrice()
currency = here.WebSite_getShoppingCartDefaultCurrencyCode()
title = cell.getTitle()
if currency == 'EUR':
currency = '&euro;'
elif currency == 'CNY':
currency = '¥'
output = """%s<br /><br />""" % (title.upper(),)
if old_price is not None and price != old_price:
output += """<span class="new_price">%s %s</span>""" % (price, currency)
output += """<br /><span class="old_price">%s %s</span>""" % (old_price, currency)
else:
output += """<span class="price">%s %s</span>""" % (price, currency)
#if old_price is not None and price != old_price:
# output += """<span class="new_price">%s %s</span>""" % (price, currency)
# output += """<br /><span class="old_price">%s %s</span>""" % (old_price, currency)
#else:
# output += """<span class="price">%s %s</span>""" % (price, currency)
output += """<span class="price">%s %s</span>""" % (price, currency)
if clean:
context.REQUEST.set("variation", None)
......
......@@ -11,7 +11,6 @@
<value>
<list>
<string>default</string>
<string>enabled</string>
</list>
</value>
</item>
......@@ -59,12 +58,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -88,10 +81,6 @@
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>product_list_thumbnail</string> </value>
......@@ -123,17 +112,4 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Resource_getWebShopImageURL()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment