Commit 4d23cc27 authored by Romain Courteaud's avatar Romain Courteaud

Multiple bug fixes provided by François-Xavier Algrain.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41333 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 61fbf90e
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -198,7 +195,10 @@ ...@@ -198,7 +195,10 @@
- B2P in EU, tax\n - B2P in EU, tax\n
"""\n """\n
\n \n
return {context.Base_translateString(\'VAT\'): 20.0,}\n return {\'VAT\': {\'translated_title\':context.Base_translateString(\'VAT\'),\n
\'percent\': 19.6,\n
},\n
}\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -264,6 +264,33 @@ return {context.Base_translateString(\'VAT\'): 20.0,}\n ...@@ -264,6 +264,33 @@ return {context.Base_translateString(\'VAT\'): 20.0,}\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Person_getApplicableTaxList</string> </value> <value> <string>Person_getApplicableTaxList</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Get applicable tax information</string> </value> <value> <string>Get applicable tax information</string> </value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -61,7 +58,7 @@ ...@@ -61,7 +58,7 @@
#get live description\n #get live description\n
web_page = portal.portal_catalog(portal_type=\'Web Page\',\n web_page = portal.portal_catalog(portal_type=\'Web Page\',\n
default_follow_up_uid=context.getUid(),\n default_follow_up_uid=context.getUid(),\n
default_publication_section_uid=context.restrictedTraverse(\'portal_categories/publication_section/pamphlet/web/short\').getUid(),\n default_publication_section_uid=context.restrictedTraverse(\'portal_categories/publication_section/website/product/short_description\').getUid(),\n
#src__=1,\n #src__=1,\n
)\n )\n
if web_page is None or len(web_page) == 0:\n if web_page is None or len(web_page) == 0:\n
...@@ -133,6 +130,33 @@ return web_page[0].getObject().asStrippedHTML()\n ...@@ -133,6 +130,33 @@ return web_page[0].getObject().asStrippedHTML()\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Product_getRelatedDescription</string> </value> <value> <string>Product_getRelatedDescription</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -199,34 +196,45 @@ web_site = context.getWebSiteValue()\n ...@@ -199,34 +196,45 @@ web_site = context.getWebSiteValue()\n
isAnon = context.portal_membership.isAnonymousUser()\n isAnon = context.portal_membership.isAnonymousUser()\n
translateString = context.Base_translateString\n translateString = context.Base_translateString\n
shopping_cart = context.SaleOrder_getShoppingCart()\n shopping_cart = context.SaleOrder_getShoppingCart()\n
shopping_cart_item_list = context.SaleOrder_getShoppingCartItemList(include_shipping=True)\n shopping_cart_item_list = shopping_cart.SaleOrder_getShoppingCartItemList(include_shipping=True)\n
customer = context.SaleOrder_getShoppingCartCustomer()\n customer = shopping_cart.SaleOrder_getShoppingCartCustomer()\n
buyer = shopping_cart.SaleOrder_getShoppingCartBuyer()\n
\n \n
if isAnon:\n if isAnon:\n
# create first an account for user\n # create first an account for user\n
msg = translateString("You need to create an account to continue. If you already have please login.")\n msg = translateString("You need to create an account to continue. If you already have please login.")\n
web_site.Base_redirect(\'register\', \\\n web_site.Base_redirect(\'login_form\', \\\n
keep_items={\'portal_status_message\': msg})\n keep_items={\'portal_status_message\': msg})\n
return\n return\n
\n \n
# XXX: Implement check if payment is sucessfull\n #Check if payment is sucessfull\n
sale_order_module = context.getPortalObject().sale_order_module\n if buyer is None:\n
sale_order = sale_order_module.newContent(portal_type=\'Sale Order\')\n raise ValueError, "Impossible to finalize and order not payed"\n
sale_order.setDestination(customer.getRelativeUrl())\n
sale_order.setDestinationSection(customer.getRelativeUrl())\n
sale_order.setStartDate(DateTime())\n
sale_order.setReceivedDate(DateTime())\n
sale_order.setComment(shopping_cart.getComment())\n
\n \n
# set order default currency\n portal_type = "Sale %s" % shopping_cart.getPortalType()\n
sale_order.setDefaultPriceCurrency(web_site.WebSite_getShoppingCartDefaultCurrency().getRelativeUrl())\n module = context.getDefaultModule(portal_type)\n
sale_order = module.newContent(portal_type=portal_type,\n
destination_value = customer,\n
destination_section_value = customer,\n
destination_decision_value = customer,\n
source_section_value = buyer,\n
source_value = buyer,\n
start_date = DateTime(),\n
received_date = DateTime(),\n
comment = shopping_cart.getComment(),\n
# set order default currency,\n
default_price_currency = web_site.WebSite_getShoppingCartDefaultCurrency().getRelativeUrl(),\n
# set trade condition\n
specialise_value = web_site.SaleOrder_getDefaultTradeCondition()\n
)\n
\n \n
for order_line in shopping_cart_item_list:\n for order_line in shopping_cart_item_list:\n
resource = context.restrictedTraverse(order_line.getResource())\n resource = order_line.getResourceValue()\n
sale_order.newContent(portal_type = \'Sale Order Line\',\n sale_order.newContent(portal_type = order_line.getPortalType(),\n
resource = order_line.getResource(),\n resource = order_line.getResource(),\n
aggregate_list = order_line.getAggregateList(),\n
quantity = order_line.getQuantity(),\n quantity = order_line.getQuantity(),\n
price = resource.getPrice(),\n price = order_line.getPrice(),\n
title = resource.getTitle())\n title = resource.getTitle())\n
\n \n
# order it\n # order it\n
...@@ -289,8 +297,12 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n ...@@ -289,8 +297,12 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n
<string>True</string> <string>True</string>
<string>shopping_cart_item_list</string> <string>shopping_cart_item_list</string>
<string>customer</string> <string>customer</string>
<string>buyer</string>
<string>msg</string> <string>msg</string>
<string>sale_order_module</string> <string>None</string>
<string>ValueError</string>
<string>portal_type</string>
<string>module</string>
<string>sale_order</string> <string>sale_order</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>order_line</string> <string>order_line</string>
...@@ -313,6 +325,33 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n ...@@ -313,6 +325,33 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_finalizeShopping</string> </value> <value> <string>SaleOrder_finalizeShopping</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Finalize order</string> </value> <value> <string>Finalize order</string> </value>
......
<?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>"""Return the default trade condition"""\n
default = "sale_trade_condition_module/default_trade_condition"\n
\n
website = context.getWebSiteValue()\n
if website:\n
default = website.getLayoutProperty(\'ecommerce_default_trade_condition\', default)\n
\n
return context.getPortalObject().restrictedTraverse(default)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>default</string>
<string>_getattr_</string>
<string>context</string>
<string>website</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_getDefaultTradeCondition</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -192,7 +189,9 @@ ...@@ -192,7 +189,9 @@
<value> <string>shopping_cart = context.SaleOrder_getShoppingCart()\n <value> <string>shopping_cart = context.SaleOrder_getShoppingCart()\n
shipping_method = getattr(shopping_cart, \'shipping_method\', None)\n shipping_method = getattr(shopping_cart, \'shipping_method\', None)\n
if shipping_method is not None:\n if shipping_method is not None:\n
return shipping_method.getResource()\n return shipping_method.getResourceValue()\n
else:\n
return None\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -262,6 +261,33 @@ if shipping_method is not None:\n ...@@ -262,6 +261,33 @@ if shipping_method is not None:\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_getSelectedShippingResource</string> </value> <value> <string>SaleOrder_getSelectedShippingResource</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Get selected shipping method from shopping cart</string> </value> <value> <string>Get selected shipping method from shopping cart</string> </value>
......
<?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>"""Get the shopping cart customer"""\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
return shopping_cart.getDestinationDecisionValue()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>shopping_cart</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_getShoppingCartBuyer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get shopping cart customer object</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -53,9 +50,9 @@ ...@@ -53,9 +50,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># based on current Authenticated Member this script must return\n <value> <string>"""Get the shopping cart customer"""\n
# the Person object\n shopping_cart = context.SaleOrder_getShoppingCart()\n
return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n return shopping_cart.getDestinationSectionValue()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -100,6 +97,7 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n ...@@ -100,6 +97,7 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>shopping_cart</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -118,6 +116,33 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n ...@@ -118,6 +116,33 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_getShoppingCartCustomer</string> </value> <value> <string>SaleOrder_getShoppingCartCustomer</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Get shopping cart customer object</string> </value> <value> <string>Get shopping cart customer object</string> </value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -77,8 +74,8 @@ for order_line in shopping_cart_item_list:\n ...@@ -77,8 +74,8 @@ for order_line in shopping_cart_item_list:\n
if include_taxes:\n if include_taxes:\n
tax_info = context.Person_getApplicableTaxList()\n tax_info = context.Person_getApplicableTaxList()\n
if tax_info is not None:\n if tax_info is not None:\n
for tax_name, tax_percent in tax_info.items():\n for tax in tax_info.values():\n
total += total*(tax_percent/100)\n total += total*(tax[\'percent\']/100)\n
\n \n
if include_currency:\n if include_currency:\n
currency = web_site.WebSite_getShoppingCartDefaultCurrency()\n currency = web_site.WebSite_getShoppingCartDefaultCurrency()\n
...@@ -143,8 +140,8 @@ else:\n ...@@ -143,8 +140,8 @@ else:\n
<string>None</string> <string>None</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>tax_info</string> <string>tax_info</string>
<string>tax_name</string> <string>tax</string>
<string>tax_percent</string> <string>_getitem_</string>
<string>currency</string> <string>currency</string>
<string>str</string> <string>str</string>
</tuple> </tuple>
...@@ -169,6 +166,33 @@ else:\n ...@@ -169,6 +166,33 @@ else:\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_getShoppingCartTotalPrice</string> </value> <value> <string>SaleOrder_getShoppingCartTotalPrice</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Calculate total price for items in shopping cart</string> </value> <value> <string>Calculate total price for items in shopping cart</string> </value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -189,13 +186,23 @@ ...@@ -189,13 +186,23 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>\'\'\'\n <value> <string encoding="cdata"><![CDATA[
XXX: implement this check based on shopping cart content\n
for example if we sell online products there\'s no shipping. \n
\'\'\'\n \'\'\'\n
If all product have no Weight, it don\'t need to be sheep. \n
\'\'\'\n
return False\n
shopping_cart_items = context.SaleOrder_getShoppingCartItemList()\n
\n
weight = 0\n
for order_line in shopping_cart_items:\n
resource = order_line.getResourceValue()\n
weight += resource.getBaseWeight(0)\n
\n \n
return 1\n return weight > 0\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -239,7 +246,17 @@ return 1\n ...@@ -239,7 +246,17 @@ return 1\n
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple/> <tuple>
<string>False</string>
<string>_getattr_</string>
<string>context</string>
<string>shopping_cart_items</string>
<string>weight</string>
<string>_getiter_</string>
<string>order_line</string>
<string>resource</string>
<string>_inplacevar_</string>
</tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -257,6 +274,33 @@ return 1\n ...@@ -257,6 +274,33 @@ return 1\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_isShippingRequired</string> </value> <value> <string>SaleOrder_isShippingRequired</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Is shipping required for current shopping cart?</string> </value> <value> <string>Is shipping required for current shopping cart?</string> </value>
......
<?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>"""Set connected user as shopping cart customer"""\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
\n
if person is None:\n
person = shopping_cart.SaleOrder_getShoppingCartCustomer()\n
\n
shopping_cart.edit(destination_decision_value=person)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>person=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>person</string>
<string>_getattr_</string>
<string>context</string>
<string>shopping_cart</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_setShoppingCartBuyer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Set shopping cart customer object</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>"""Set connected user as shopping cart customer"""\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
member = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
shopping_cart.edit(destination_section_value=member)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>shopping_cart</string>
<string>member</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_setShoppingCartCustomer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Set shopping cart customer object</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -66,8 +63,11 @@ if parameter_dict[\'ACK\'] != \'Success\':\n ...@@ -66,8 +63,11 @@ if parameter_dict[\'ACK\'] != \'Success\':\n
if parameter_dict[\'PAYERID\'] != payer_id:\n if parameter_dict[\'PAYERID\'] != payer_id:\n
return "Identification failed.2 : %s" % parameter_dict[\'PAYERID\']\n return "Identification failed.2 : %s" % parameter_dict[\'PAYERID\']\n
\n \n
context.Base_redirect(\'SaleOrder_viewAsWeb\', \\\n #redirect user to the checkout section\n
keep_items={\'portal_status_message\':translateString("Your paypal account is authentificated.", mapping = dict()),\n website = context.getWebSiteValue() \n
section_url = website.getLayoutProperty(\'ecommerce_checkout_section_id\',"checkout")\n
website.Base_redirect(section_url, \\\n
keep_items={\'portal_status_message\':translateString("The payment procedure went well on Paypal."),\n
\'token\':token})\n \'token\':token})\n
</string> </value> </string> </value>
</item> </item>
...@@ -112,7 +112,8 @@ context.Base_redirect(\'SaleOrder_viewAsWeb\', \\\n ...@@ -112,7 +112,8 @@ context.Base_redirect(\'SaleOrder_viewAsWeb\', \\\n
<string>payer_id</string> <string>payer_id</string>
<string>parameter_dict</string> <string>parameter_dict</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>dict</string> <string>website</string>
<string>section_url</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -131,6 +132,33 @@ context.Base_redirect(\'SaleOrder_viewAsWeb\', \\\n ...@@ -131,6 +132,33 @@ context.Base_redirect(\'SaleOrder_viewAsWeb\', \\\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSection_checkPaypalIdentification</string> </value> <value> <string>WebSection_checkPaypalIdentification</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -81,6 +78,9 @@ if response_dict[\'ACK\'] != \'Success\':\n ...@@ -81,6 +78,9 @@ if response_dict[\'ACK\'] != \'Success\':\n
keep_items={\'portal_status_message\': \'%s : %s\' % (msg, str(response_dict)),\n keep_items={\'portal_status_message\': \'%s : %s\' % (msg, str(response_dict)),\n
\'editable_mode\': 1})\n \'editable_mode\': 1})\n
return\n return\n
\n
#Payment is ok. Set shopping cart is payed\n
context.SaleOrder_setShoppingCartBuyer()\n
\n \n
return context.SaleOrder_finalizeShopping()\n return context.SaleOrder_finalizeShopping()\n
</string> </value> </string> </value>
...@@ -149,6 +149,33 @@ return context.SaleOrder_finalizeShopping()\n ...@@ -149,6 +149,33 @@ return context.SaleOrder_finalizeShopping()\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSection_doPaypalPayment</string> </value> <value> <string>WebSection_doPaypalPayment</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -63,8 +60,12 @@ shopping_cart_product_list = shopping_cart.SaleOrder_getShoppingCartItemList()\n ...@@ -63,8 +60,12 @@ shopping_cart_product_list = shopping_cart.SaleOrder_getShoppingCartItemList()\n
shopping_cart_price = float(web_site.SaleOrder_getShoppingCartTotalPrice())\n shopping_cart_price = float(web_site.SaleOrder_getShoppingCartTotalPrice())\n
taxes_amount = float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_taxes=True, include_shipping=True)) - \\\n taxes_amount = float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_taxes=True, include_shipping=True)) - \\\n
float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_shipping=True));\n float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_shipping=True));\n
shipping = context.SaleOrder_getSelectedShippingResource()\n if shopping_cart.SaleOrder_isShippingRequired():\n
shipping_price = context.restrictedTraverse(shipping).getPrice()\n shipping = shopping_cart.SaleOrder_getSelectedShippingResource()\n
shipping_price = shipping.getPrice()\n
else:\n
shipping_price = 0\n
\n
customer = context.SaleOrder_getShoppingCartCustomer()\n customer = context.SaleOrder_getShoppingCartCustomer()\n
site_url = web_site.absolute_url()\n site_url = web_site.absolute_url()\n
\n \n
...@@ -72,8 +73,8 @@ order_parameter_dict[\'METHOD\'] = \'SetExpressCheckout\'\n ...@@ -72,8 +73,8 @@ order_parameter_dict[\'METHOD\'] = \'SetExpressCheckout\'\n
order_parameter_dict[\'RETURNURL\'] = \'%s/WebSection_checkPaypalIdentification\' % site_url\n order_parameter_dict[\'RETURNURL\'] = \'%s/WebSection_checkPaypalIdentification\' % site_url\n
order_parameter_dict[\'CANCELURL\'] = site_url\n order_parameter_dict[\'CANCELURL\'] = site_url\n
order_parameter_dict[\'PAYMENTACTION\'] = \'Sale\'\n order_parameter_dict[\'PAYMENTACTION\'] = \'Sale\'\n
actual_product_index = 0\n
\n \n
actual_product_index = 0\n
for product in shopping_cart_product_list:\n for product in shopping_cart_product_list:\n
resource = context.restrictedTraverse(product.getResource())\n resource = context.restrictedTraverse(product.getResource())\n
quantity = int(product.getQuantity())\n quantity = int(product.getQuantity())\n
...@@ -88,8 +89,8 @@ order_parameter_dict[\'ITEMAMT\'] = shopping_cart_price\n ...@@ -88,8 +89,8 @@ order_parameter_dict[\'ITEMAMT\'] = shopping_cart_price\n
order_parameter_dict[\'TAXAMT\'] = taxes_amount\n order_parameter_dict[\'TAXAMT\'] = taxes_amount\n
order_parameter_dict[\'SHIPPINGAMT\'] = shipping_price\n order_parameter_dict[\'SHIPPINGAMT\'] = shipping_price\n
order_parameter_dict[\'AMT\'] = shopping_cart_price + taxes_amount + shipping_price\n order_parameter_dict[\'AMT\'] = shopping_cart_price + taxes_amount + shipping_price\n
order_parameter_dict[\'CURRENCYCODE\'] = \'EUR\'\n order_parameter_dict[\'CURRENCYCODE\'] = context.WebSite_getShoppingCartDefaultCurrencyCode()\n
order_parameter_dict[\'NOSHIPPING\'] = \'1\'\n order_parameter_dict[\'NOSHIPPING\'] = str(not shopping_cart.SaleOrder_isShippingRequired())\n
order_parameter_dict[\'ALLOWNOTE\'] = \'0\'\n order_parameter_dict[\'ALLOWNOTE\'] = \'0\'\n
\n \n
return order_parameter_dict\n return order_parameter_dict\n
...@@ -153,6 +154,7 @@ return order_parameter_dict\n ...@@ -153,6 +154,7 @@ return order_parameter_dict\n
<string>quantity</string> <string>quantity</string>
<string>price</string> <string>price</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>str</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -171,6 +173,33 @@ return order_parameter_dict\n ...@@ -171,6 +173,33 @@ return order_parameter_dict\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_getPaypalOrderParameterDict</string> </value> <value> <string>WebSite_getPaypalOrderParameterDict</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -56,7 +53,11 @@ ...@@ -56,7 +53,11 @@
<value> <string>""" \n <value> <string>""" \n
Return reference of the default currency used in Shopping Cart.\n Return reference of the default currency used in Shopping Cart.\n
"""\n """\n
return context.getWebSiteValue().WebSite_getShoppingCartDefaultCurrency().getReference()\n website = context.getWebSiteValue()\n
if website:\n
return website.WebSite_getShoppingCartDefaultCurrency().getReference()\n
else:\n
return \'\'\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -101,6 +102,7 @@ return context.getWebSiteValue().WebSite_getShoppingCartDefaultCurrency().getRef ...@@ -101,6 +102,7 @@ return context.getWebSiteValue().WebSite_getShoppingCartDefaultCurrency().getRef
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>website</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -119,6 +121,33 @@ return context.getWebSiteValue().WebSite_getShoppingCartDefaultCurrency().getRef ...@@ -119,6 +121,33 @@ return context.getWebSiteValue().WebSite_getShoppingCartDefaultCurrency().getRef
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_getShoppingCartDefaultCurrencyCode</string> </value> <value> <string>WebSite_getShoppingCartDefaultCurrencyCode</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value>
<object>
<klass>
<global name="PropertyGetter" module="Products.ERP5Type.Accessor.Constant"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>_id</string> </key>
<value> <string>isIndexable</string> </value>
</item>
<item>
<key> <string>value</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Get default Currency symbol for Shopping Cart</string> </value> <value> <string>Get default Currency symbol for Shopping Cart</string> </value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -53,7 +50,7 @@ ...@@ -53,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>return \'%s/%s\' % (context.getRelativeUrl(), \'Resource_viewAsShop\')\n <value> <string>return \'%s/%s\' % (context.getAbsoluteUrl(), \'Resource_viewAsShop\')\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ListField" module="Products.Formulator.StandardFields"/>
<global name="ListField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -279,7 +276,7 @@ ...@@ -279,7 +276,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.SaleOrder_getSelectedShippingResource()</string> </value> <value> <string>python: here.SaleOrder_getSelectedShippingResource().getRelativeUlr()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -83,9 +80,7 @@ ...@@ -83,9 +80,7 @@
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list/>
<string>shipping</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -95,6 +90,7 @@ ...@@ -95,6 +90,7 @@
<string>fake_form</string> <string>fake_form</string>
<string>submit</string> <string>submit</string>
<string>fake_payment</string> <string>fake_payment</string>
<string>shipping</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -37,7 +34,7 @@ ...@@ -37,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n <tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n
shopping_cart_item_list shopping_cart/SaleOrder_getShoppingCartItemList;\n shopping_cart_item_list shopping_cart/SaleOrder_getShoppingCartItemList;\n
...@@ -49,7 +46,7 @@ ...@@ -49,7 +46,7 @@
taxes_amount python: float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_taxes=True, include_shipping=True)) -\n taxes_amount python: float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_taxes=True, include_shipping=True)) -\n
float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_shipping=True));\n float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_shipping=True));\n
shipping here/SaleOrder_getSelectedShippingResource;\n shipping here/SaleOrder_getSelectedShippingResource;\n
shipping_price python: here.restrictedTraverse(shipping).getPrice();\n shipping_price python: shipping.getPrice();\n
paypal_method python: \'_express-checkout\';\n paypal_method python: \'_express-checkout\';\n
test_env python: True;\n test_env python: True;\n
test_base_url python: \'http://www.dentra.net:9080/erp5\';\n test_base_url python: \'http://www.dentra.net:9080/erp5\';\n
...@@ -129,7 +126,7 @@ ...@@ -129,7 +126,7 @@
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>
]]></string> </value> ]]></unicode> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -143,9 +140,13 @@ ...@@ -143,9 +140,13 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_viewPaypalForm</string> </value> <value> <string>SaleOrder_viewPaypalForm</string> </value>
</item> </item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Paypal button for external payment</string> </value> <value> <unicode>Paypal button for external payment</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -37,7 +34,7 @@ ...@@ -37,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n <tal:block tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n
web_site here/getWebSiteValue;">\n web_site here/getWebSiteValue;">\n
...@@ -55,12 +52,11 @@ ...@@ -55,12 +52,11 @@
</p>\n </p>\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:condition="python: shipping is not None"\n <tal:block tal:condition="python: shipping is not None">\n
tal:define="shipping_obj python: here.restrictedTraverse(shipping);">\n
<p>\n <p>\n
<span tal:replace="shipping_obj/getTitle"/> : \n <span tal:replace="shipping_obj/getTitle"/> : \n
<b>\n <b>\n
<span tal:replace="shipping_obj/getPrice"/>\n <span tal:replace="shipping/getPrice"/>\n
<span tal:replace="python: web_site.WebSite_getShoppingCartDefaultCurrency().getTitle()"/>\n <span tal:replace="python: web_site.WebSite_getShoppingCartDefaultCurrency().getTitle()"/>\n
</b>\n </b>\n
</p>\n </p>\n
...@@ -68,7 +64,7 @@ ...@@ -68,7 +64,7 @@
</tal:block>\n </tal:block>\n
]]></string> </value> ]]></unicode> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -82,9 +78,13 @@ ...@@ -82,9 +78,13 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_viewShippingRenderer</string> </value> <value> <string>SaleOrder_viewShippingRenderer</string> </value>
</item> </item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Shipping method custom renderer</string> </value> <value> <unicode>Shipping method custom renderer</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -37,7 +34,7 @@ ...@@ -37,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n <tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n
web_site here/getWebSiteValue;\n web_site here/getWebSiteValue;\n
...@@ -114,9 +111,8 @@ ...@@ -114,9 +111,8 @@
<td></td>\n <td></td>\n
<td class="used"><span tal:replace="python: here.Base_translateString(\'Shipping Price\')"/></td>\n <td class="used"><span tal:replace="python: here.Base_translateString(\'Shipping Price\')"/></td>\n
<td class="used" style="vertical-align=middle;">\n <td class="used" style="vertical-align=middle;">\n
<tal:block tal:condition="python: shipping is not None"\n <tal:block tal:condition="python: shipping is not None">\n
tal:define="shipping_obj python: here.restrictedTraverse(shipping);">\n <b><span tal:replace="python: \'%s %s\' % (shipping.getPrice(), currency_code)"/></b>\n
<b><span tal:replace="python: \'%s %s\' % (shipping_obj.getPrice(), currency_code)"/></b>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: shipping is None">\n <tal:block tal:condition="python: shipping is None">\n
<b>\n <b>\n
...@@ -131,15 +127,12 @@ ...@@ -131,15 +127,12 @@
<td></td>\n <td></td>\n
<td class="used"><span tal:replace="python: here.Base_translateString(\'Total HT\')"/></td>\n <td class="used"><span tal:replace="python: here.Base_translateString(\'Total HT\')"/></td>\n
<td class="used" style="vertical-align=middle;">\n <td class="used" style="vertical-align=middle;">\n
<tal:block tal:define="shipping_obj python: here.restrictedTraverse(shipping);">\n <b><span tal:replace="python: \'%s %s\' % (float(total_price) + shipping.getPrice(), currency_code)"/></b>\n
<b><span tal:replace="python: \'%s %s\' % (float(total_price) + shipping_obj.getPrice(), currency_code)"/></b>\n
</tal:block>\n
</td>\n </td>\n
</tr>\n </tr>\n
<tr class="shopping_cart_end_lines"\n <tr class="shopping_cart_end_lines"\n
tal:condition="python: shipping is not None"\n tal:condition="python: shipping is not None"\n
tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n tal:define="total_price python: here.SaleOrder_getShoppingCartTotalPrice(include_shipping=True, \n
total_price python: here.SaleOrder_getShoppingCartTotalPrice(include_shipping=True, \n
include_taxes=True,\n include_taxes=True,\n
include_currency=True);">\n include_currency=True);">\n
<td></td>\n <td></td>\n
...@@ -169,8 +162,8 @@ ...@@ -169,8 +162,8 @@
tal:define="tax_info here/Person_getApplicableTaxList">\n tal:define="tax_info here/Person_getApplicableTaxList">\n
<p tal:condition="python: tax_info is not None">\n <p tal:condition="python: tax_info is not None">\n
<span tal:replace="python: here.Base_translateString(\'* Applicable taxes\')"/> :\n <span tal:replace="python: here.Base_translateString(\'* Applicable taxes\')"/> :\n
<tal:block tal:repeat="tax_name python: tax_info.keys()">\n <tal:block tal:repeat="tax python: tax_info.values()">\n
<span tal:content="python: \'%s (%s %s)\' %(tax_name, tax_info[tax_name], \'%\')">item </span>\n <span tal:content="python: \'%s (%s %s)\' %(tax[\'translated_title\'], tax[\'percent\'], \'%\')">item </span>\n
</tal:block>\n </tal:block>\n
</p>\n </p>\n
<p tal:condition="python: tax_info is None">\n <p tal:condition="python: tax_info is None">\n
...@@ -182,7 +175,7 @@ ...@@ -182,7 +175,7 @@
</tal:block>\n </tal:block>\n
]]></string> </value> ]]></unicode> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -196,9 +189,13 @@ ...@@ -196,9 +189,13 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_viewShoppingCartRenderer</string> </value> <value> <string>SaleOrder_viewShoppingCartRenderer</string> </value>
</item> </item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Edit/Review shopping cart content custom renderer</string> </value> <value> <unicode>Edit/Review shopping cart content custom renderer</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -37,7 +34,7 @@ ...@@ -37,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n <tal:block tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n
tax_info here/Person_getApplicableTaxList;\n tax_info here/Person_getApplicableTaxList;\n
...@@ -51,8 +48,8 @@ ...@@ -51,8 +48,8 @@
<div tal:condition="python: tax_info is not None">\n <div tal:condition="python: tax_info is not None">\n
<p><span tal:replace="python: here.Base_translateString(\'For your location the following taxes are applicable\')"/> :</p>\n <p><span tal:replace="python: here.Base_translateString(\'For your location the following taxes are applicable\')"/> :</p>\n
<ul>\n <ul>\n
<tal:block tal:repeat="tax_name python: tax_info.keys()">\n <tal:block tal:repeat="tax python: tax_info.values()">\n
<b><li tal:content="python: \'%s (%s %s)\' %(tax_name, tax_info[tax_name], \'%\')">item </li></b>\n <b><li tal:content="python: \'%s (%s %s)\' %(tax[\'translated_title\'], tax[\'percent\'], \'%\')">item </li></b>\n
</tal:block>\n </tal:block>\n
</ul>\n </ul>\n
</div>\n </div>\n
...@@ -69,7 +66,7 @@ ...@@ -69,7 +66,7 @@
</tal:block>\n </tal:block>\n
]]></string> </value> ]]></unicode> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -83,9 +80,13 @@ ...@@ -83,9 +80,13 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_viewTaxesRenderer</string> </value> <value> <string>SaleOrder_viewTaxesRenderer</string> </value>
</item> </item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Taxes custom renderer</string> </value> <value> <unicode>Taxes custom renderer</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -52,7 +49,7 @@ ...@@ -52,7 +49,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>left</string> <string>normal</string>
<string>right</string> <string>right</string>
<string>center</string> <string>center</string>
<string>bottom</string> <string>bottom</string>
...@@ -76,7 +73,7 @@ ...@@ -76,7 +73,7 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>left</string> </key> <key> <string>normal</string> </key>
<value> <value>
<list> <list>
<string>thankyou</string> <string>thankyou</string>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -57,9 +54,23 @@ ...@@ -57,9 +54,23 @@
#the goal of this script is to get all the related product of this section\n #the goal of this script is to get all the related product of this section\n
current_web_section = context.REQUEST.get(\'current_web_section\', context)\n current_web_section = context.REQUEST.get(\'current_web_section\', context)\n
product_list = []\n product_list = []\n
kw[\'portal_type\'] = \'Product\'\n \n
kw[\'limit\'] = limit\n if not kw.has_key(\'portal_type\'):\n
product_list = current_web_section.getDocumentValueList(all_versions=1, all_languages=1, **kw)\n kw[\'portal_type\'] = \'Product\'\n
\t\t \n
if not kw.has_key(\'limit\'):\t\t \n
kw[\'limit\'] = limit\t\t \n
\t\t \n
if not kw.has_key(\'all_versions\'):\t\t \n
kw[\'all_versions\'] = 1\t\t \n
\t\t \n
if not kw.has_key(\'all_languages\'):\t\t \n
kw[\'all_languages\'] = 1\t\t \n
\t\t \n
for key in [\'limit\',\'all_versions\',\'all_languages\']:\t\t \n
kw[key] = int(kw[key])\t\t \n
\t\t \n
product_list = current_web_section.getDocumentValueList(**kw)\n
return product_list\n return product_list\n
</string> </value> </string> </value>
</item> </item>
...@@ -121,6 +132,10 @@ return product_list\n ...@@ -121,6 +132,10 @@ return product_list\n
<string>current_web_section</string> <string>current_web_section</string>
<string>product_list</string> <string>product_list</string>
<string>_write_</string> <string>_write_</string>
<string>_getiter_</string>
<string>key</string>
<string>int</string>
<string>_getitem_</string>
<string>_apply_</string> <string>_apply_</string>
</tuple> </tuple>
</value> </value>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -92,6 +89,7 @@ ...@@ -92,6 +89,7 @@
<string>my_ecommerce_product_list</string> <string>my_ecommerce_product_list</string>
<string>my_ecommerce_base_currency</string> <string>my_ecommerce_base_currency</string>
<string>my_ecommerce_payment_mode_list</string> <string>my_ecommerce_payment_mode_list</string>
<string>my_ecommerce_default_trade_condition</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_ecommerce_default_trade_condition</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Default Sale Trade Condition</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.portal_catalog(portal_type=\'Sale Trade Condition\', sort_on=((\'title\', \'ASC\'),),checked_permission=\'View\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -61,7 +58,9 @@ ...@@ -61,7 +58,9 @@
from random import choice\n from random import choice\n
\n \n
web_site = context.getWebSiteValue() or context.REQUEST.get(\'current_web_site\')\n web_site = context.getWebSiteValue() or context.REQUEST.get(\'current_web_site\')\n
kw[\'portal_type\'] = \'Product\'\n \n
if not kw.has_key(\'portal_type\'):\t \t \n
kw[\'portal_type\'] = \'Product\'\n
\n \n
# Getting all the products from all the visible Web Section.\n # Getting all the products from all the visible Web Section.\n
product_dict = {}\n product_dict = {}\n
...@@ -153,8 +152,7 @@ return product_list\n ...@@ -153,8 +152,7 @@ return product_list\n
<string>random_uid_list</string> <string>random_uid_list</string>
<string>key_list</string> <string>key_list</string>
<string>random_uid</string> <string>random_uid</string>
<string>append</string> <string>$list0</string>
<string>$append0</string>
<string>uid</string> <string>uid</string>
<string>product_list</string> <string>product_list</string>
</tuple> </tuple>
......
271 272
\ 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