Commit 207cedd4 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Remove script and update ZPT

We use field instead to present such information.
parent 04849a93
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>""" \n
Return the current step for checkout procedure that will be displayed on Shopping Cart page.\n
\n
TODO:\n
- findout where this is used\n
- make sure that this script is either used everywhere\n
(and centralized sales workflow) or nowhere (local approach,\n
spaguettish but more consistent)\n
"""\n
web_site = context.getWebSiteValue()\n
shopping_cart = web_site.SaleOrder_getShoppingCart()\n
empty_cart = shopping_cart.SaleOrder_isShoppingCartEmpty()\n
is_consistent = shopping_cart.SaleOrder_isConsistent()\n
is_anonymous = context.portal_membership.isAnonymousUser()\n
\n
if empty_cart:\n
return context.Base_translateString(\'Add a product to your Shopping Cart.\')\n
\n
if not is_consistent:\n
return context.Base_translateString(\'Select a Shipping Service.\')\n
\n
if is_consistent and is_anonymous:\n
return context.Base_translateString(\'Please, you must login to proceed.\')\n
\n
if is_consistent and not is_anonymous:\n
return context.Base_translateString(\'Select your billing address.\')\n
\n
return\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getShoppingCartCheckoutStep</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get current Shopping Cart step for checkout procedure.</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -40,19 +40,8 @@ ...@@ -40,19 +40,8 @@
web_site here/getWebSiteValue;\n web_site here/getWebSiteValue;\n
currency_code web_site/WebSite_getShoppingCartDefaultCurrencyCode;\n currency_code web_site/WebSite_getShoppingCartDefaultCurrencyCode;\n
shopping_cart_item_list shopping_cart/SaleOrder_getShoppingCartItemList;\n shopping_cart_item_list shopping_cart/SaleOrder_getShoppingCartItemList;\n
empty_cart shopping_cart/SaleOrder_isShoppingCartEmpty;\n
total_price python: shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_currency=False);">\n total_price python: shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_currency=False);">\n
<h2>\n
<span tal:replace="python: here.Base_translateString(\'My shopping cart\')"/>\n
</h2>\n
<h6>\n
<span tal:replace="python: web_site.WebSite_getShoppingCartCheckoutStep()"/>\n
</h6>\n
<tal:block tal:condition = "empty_cart"> \n
<h3><span tal:replace="python: here.Base_translateString(\'Your shopping cart is empty.\')"/></h3><br/>\n
</tal:block>\n
\n \n
<tal:block tal:condition = "not: empty_cart">\n
<div class="ListContent">\n <div class="ListContent">\n
<table cellpadding="0" cellspacing="0" width="65%"\n <table cellpadding="0" cellspacing="0" width="65%"\n
tal:define="shipping here/SaleOrder_getSelectedShippingResource">\n tal:define="shipping here/SaleOrder_getSelectedShippingResource">\n
...@@ -177,7 +166,6 @@ ...@@ -177,7 +166,6 @@
</p>\n </p>\n
</tal:block>\n </tal:block>\n
</div>\n </div>\n
</tal:block>\n
</tal:block> </tal:block>
]]></unicode> </value> ]]></unicode> </value>
......
299 300
\ No newline at end of file \ No newline at end of file
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