Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
7f82568d
Commit
7f82568d
authored
Feb 15, 2013
by
Rafael Monnerat
Committed by
Xiaowu Zhang
Feb 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_commerce_related
parent
4e38aa86
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
122 deletions
+28
-122
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getDefaultTradeCondition.xml
...kins/erp5_commerce/SaleOrder_getDefaultTradeCondition.xml
+0
-84
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_editShoppingCart.xml
...ortal_skins/erp5_commerce/WebSection_editShoppingCart.xml
+16
-17
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_finalizeShopping.xml
...ortal_skins/erp5_commerce/WebSection_finalizeShopping.xml
+1
-1
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_paymentRedirect.xml
...portal_skins/erp5_commerce/WebSection_paymentRedirect.xml
+3
-3
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart.xml
...5_commerce_widget_library/WebSection_viewShoppingCart.xml
+2
-2
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart/my_payment_mode.xml
...t_library/WebSection_viewShoppingCart/my_payment_mode.xml
+4
-13
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart/submit_payment.xml
...et_library/WebSection_viewShoppingCart/submit_payment.xml
+1
-1
bt5/erp5_commerce/bt/revision
bt5/erp5_commerce/bt/revision
+1
-1
No files found.
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getDefaultTradeCondition.xml
deleted
100644 → 0
View file @
4e38aa86
<?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 default trade condition for thie ecommerce site\n
\n
TODO:\n
- (rafael) This script should be removed or turned into a preference at least.\n
\n
"""\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>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleOrder_getDefaultTradeCondition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
DEPRECATED
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/
SaleOrder
_editShoppingCart.xml
→
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/
WebSection
_editShoppingCart.xml
View file @
7f82568d
...
...
@@ -200,7 +200,7 @@
request = context.REQUEST\n
translateString = context.Base_translateString \n
if field_my_buy_quantity is None:\n
field_my_buy_quantity
=
context.REQUEST.get("field_my_buy_quantity", None)\n
field_my_buy_quantity
=
context.REQUEST.get("field_my_buy_quantity", None)\n
\n
if field_my_shipping_method is None:\n
field_my_shipping_method=context.REQUEST.get("field_my_shipping_method", None) \n
...
...
@@ -209,11 +209,9 @@ if field_my_payment_mode is None:\n
field_my_payment_mode = context.REQUEST.get("field_my_payment_mode", None) \n
\n
quantity = field_my_buy_quantity\n
shipping_method = field_my_shipping_method\n
shopping_cart_items = context.SaleOrder_getShoppingCartItemList(include_shipping=True)\n
shopping_cart_products_items = filter(lambda x: x.getId()!=\'shipping_method\', shopping_cart_items)\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
shopping_cart_product_item_list = context.SaleOrder_getShoppingCartItemList()\n
\n
# Handle change in quantity for shopping items\n
if quantity is not None:\n
...
...
@@ -223,7 +221,7 @@ if quantity is not None:\n
quantity = [quantity]\n
\n
counter = 0\n
for order_line in shopping_cart_product
s_items
:\n
for order_line in shopping_cart_product
_item_list
:\n
new_quantity = int(quantity[counter])\n
if new_quantity>
=1:\n
order_line.setQuantity(new_quantity)\n
...
...
@@ -233,23 +231,24 @@ if quantity is not None:\n
counter += 1\n
\n
# Handle shipping\n
order_line = getattr(shopping_cart, \'shipping_method\', None)
\n
if shipping_method not in [\'\', None]:
\n
shipping = context.getPortalObject().restrictedTraverse(shipping_method)
\n
if order_line is not None:
\n
shopping_cart.manage_delObjects(order_line.getId()
)\n
if field_my_shipping_method not in [\'\', None]:
\n
line = getattr(shopping_cart, \'shipping_method\', None)
\n
if line is not None:
\n
shopping_cart.manage_delObjects(line.getId())
\n
shipping = context.getPortalObject().restrictedTraverse(field_my_shipping_method
)\n
# create new shipping method order line\n
order_line = shopping_cart.newContent(id=\'shipping_method\', portal_type=\'Sale Order Line\')\n
# .. and update it\n
order_line.setResource(shipping.getRelativeUrl())\n
order_line.setQuantity(1)\n
shopping_cart.newContent(\n
id=\'shipping_method\', \n
portal_type=\'Sale Order Line\', \n
resource_value=shipping, \n
quantity=1)\n
\n
# Handle payment mode and comment\n
if field_my_comment is not None:\n
shopping_cart.setComment(field_my_comment)\n
\n
if field_my_payment_mode is not None:\n
shopping_cart.setPaymentConditionPaymentMode(field_my_payment_mode)
# XXX This is bad because it does not use trade conditions XXX
\n
shopping_cart.setPaymentConditionPaymentMode(field_my_payment_mode)\n
\n
if redirect:\n
# Hardcode redirection.\n
...
...
@@ -274,7 +273,7 @@ if redirect:\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleOrder
_editShoppingCart
</string>
</value>
<value>
<string>
WebSection
_editShoppingCart
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_finalizeShopping.xml
View file @
7f82568d
...
...
@@ -225,7 +225,7 @@ sale_order = module.newContent(portal_type=portal_type,\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
specialise
= shopping_cart.getSpecialise
()\n
)\n
\n
for order_line in shopping_cart_item_list:\n
...
...
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/
SaleOrder
_paymentRedirect.xml
→
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/
WebSection
_paymentRedirect.xml
View file @
7f82568d
...
...
@@ -61,7 +61,7 @@ isAnon = context.portal_membership.isAnonymousUser()\n
translateString = context.Base_translateString\n
\n
# Make sure we save shopping cart informations modified on last minute.\n
context.
SaleOrder
_editShoppingCart(redirect=False, **kw)\n
context.
WebSection
_editShoppingCart(redirect=False, **kw)\n
\n
shopping_cart = context.SaleOrder_getShoppingCart()\n
field_my_comment = shopping_cart.getComment()\n
...
...
@@ -73,7 +73,7 @@ if isAnon:\n
msg = translateString("You need to login or create an account to continue.")\n
from ZTUtils import make_query\n
parameter_string = make_query(field_my_comment=field_my_comment, field_my_payment_mode=field_my_payment_mode)\n
coming_from_url = \'%s/
SaleOrder
_paymentRedirect?%s\' % (context.absolute_url(), parameter_string)\n
coming_from_url = \'%s/
WebSection
_paymentRedirect?%s\' % (context.absolute_url(), parameter_string)\n
return web_site.Base_redirect(\'login_form\', \\\n
keep_items={\'portal_status_message\': msg,\n
\'came_from\': coming_from_url})\n
...
...
@@ -107,7 +107,7 @@ context.Base_redirect(\'WebSection_viewShoppingCart\', \\\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleOrder
_paymentRedirect
</string>
</value>
<value>
<string>
WebSection
_paymentRedirect
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart.xml
View file @
7f82568d
...
...
@@ -35,7 +35,7 @@
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
SaleOrder
_editShoppingCart
</string>
</value>
<value>
<string>
WebSection
_editShoppingCart
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -139,7 +139,7 @@
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Product_view
</string>
</value>
<value>
<string>
WebSection_viewShoppingCart
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
...
...
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart/my_payment_mode.xml
View file @
7f82568d
...
...
@@ -134,26 +134,20 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
<tuple/>
</tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.
getWebSiteValue().
SaleOrder_getShoppingCart().getPaymentConditionPaymentMode()
</string>
</value>
<value>
<string>
python: here.SaleOrder_getShoppingCart().getPaymentConditionPaymentMode()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
<tuple/>
</tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
...
...
@@ -166,10 +160,7 @@
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
<tuple/>
</tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
...
...
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewShoppingCart/submit_payment.xml
View file @
7f82568d
...
...
@@ -164,7 +164,7 @@
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
SaleOrder
_paymentRedirect:method
</string>
</value>
<value>
<string>
WebSection
_paymentRedirect:method
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_commerce/bt/revision
View file @
7f82568d
31
4
31
5
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment