diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencyCode.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencyCode.xml index 2cb1869567940751ba61c2ba19e7a67b395cf568..969aa1a3862c230a750d4d01dbe4910c0333e06e 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencyCode.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencyCode.xml @@ -125,7 +125,7 @@ return context.getPortalObject().SaleOrder_getShoppingCartDefaultCurrency().getR </item> <item> <key> <string>title</string> </key> - <value> <string>Get default currency symbole for shop</string> </value> + <value> <string>Get default currency symbol for shop</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbole.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbol.xml similarity index 99% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbole.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbol.xml index c86b33ae67e777f31710b384d6a66583f2c57b79..92042350e9229f86200a09ac831ca38221dff7f3 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbole.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartDefaultCurrencySymbol.xml @@ -121,7 +121,7 @@ return context.getPortalObject().SaleOrder_getShoppingCartDefaultCurrency().getS </item> <item> <key> <string>id</string> </key> - <value> <string>SaleOrder_getShoppingCartDefaultCurrencySymbole</string> </value> + <value> <string>SaleOrder_getShoppingCartDefaultCurrencySymbol</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml index 8a7cd1468eb13764a8adac620be0cbfa5ccd82f0..92d8c93c789d166c638ef74b5561ae924b280416 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml @@ -54,16 +54,22 @@ <item> <key> <string>_body</string> </key> <value> <string># redirect the user to the good payment form\n +translateString = context.Base_translateString\n \n if field_my_payment_mode is None:\n - return "error"\n -\n -if field_my_payment_mode == \'Credit Card\':\n - return context.getWebSectionValue().SaleOrder_viewAsWebConfirmCreditCardPayment()\n -elif field_my_payment_mode.lower() == \'paypal\':\n - return context.getWebSectionValue().SaleOrder_viewAsWebConfirmPayPalPayment()\n + msg = translateString("You must select a payment mode.")\n else:\n - return "This method is actually not activated, sorry : %s" % field_my_payment_mode\n + if field_my_payment_mode.lower() == \'credit card\':\n + return context.getWebSectionValue().SaleOrder_viewAsWebConfirmCreditCardPayment()\n + elif field_my_payment_mode.lower() == \'paypal\':\n + return context.getWebSectionValue().SaleOrder_viewAsWebConfirmPayPalPayment()\n + else:\n + msg = translateString("This payment mode is actually not activated, sorry: ${payment_mode}", \n + mapping=dict(payment_mode=field_my_payment_mode))\n +\n +context.Base_redirect(\'SaleOrder_viewAsWebConfirmPaymentMode\', \\\n + keep_items={\'portal_status_message\': msg})\n +return\n </string> </value> </item> <item> @@ -102,9 +108,12 @@ else:\n <tuple> <string>field_my_payment_mode</string> <string>kw</string> - <string>None</string> <string>_getattr_</string> <string>context</string> + <string>translateString</string> + <string>None</string> + <string>msg</string> + <string>dict</string> </tuple> </value> </item> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_checkPaypalIdentification.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_checkPaypalIdentification.xml index 7c28610401f66d79ec2bd15dab851af9b0bf8f95..06096bcfa32f93d9c288e701c71e627d4a485de2 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_checkPaypalIdentification.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_checkPaypalIdentification.xml @@ -54,12 +54,11 @@ <item> <key> <string>_body</string> </key> <value> <string>translateString = context.Base_translateString\n -web_site = context.getWebSiteValue()\n \n token = context.REQUEST.get(\'token\')\n payer_id = context.REQUEST.get(\'PayerID\')\n \n -parameter_dict = web_site.WebSite_getExpressCheckoutDetails(token)\n +parameter_dict = context.WebSection_getExpressCheckoutDetails(token)\n \n if parameter_dict[\'ACK\'] != \'Success\':\n return "Identification failed.1 : %s" % parameter_dict[\'ACK\']\n @@ -109,7 +108,6 @@ context.ERP5Site_redirect(\'%s/checkout\' % context.getWebSiteValue().absolute_u <string>_getattr_</string> <string>context</string> <string>translateString</string> - <string>web_site</string> <string>token</string> <string>payer_id</string> <string>parameter_dict</string> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_doExpressCheckoutPayment.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doExpressCheckoutPayment.xml similarity index 96% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_doExpressCheckoutPayment.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doExpressCheckoutPayment.xml index 56562bf4152df3459383e517e36d0ae00988ad81..2e1ec574ee37551f949d5ecf25320fc1711d8dc1 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_doExpressCheckoutPayment.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doExpressCheckoutPayment.xml @@ -60,7 +60,7 @@ order_parameter_dict[\'TOKEN\'] = token\n order_parameter_dict[\'PAYERID\'] = payer_id\n order_parameter_dict[\'METHOD\'] = \'DoExpressCheckoutPayment\'\n \n -response_parameter_dict = context.ERP5Base_submitPaypalNVPRequest(parameter_dict=order_parameter_dict,\n +response_parameter_dict = context.WebSection_submitPaypalNVPRequest(parameter_dict=order_parameter_dict,\n nvp_url=context.WebSite_getPaypalUrl(api=\'nvp\'))\n return response_parameter_dict\n </string> </value> @@ -123,7 +123,7 @@ return response_parameter_dict\n </item> <item> <key> <string>id</string> </key> - <value> <string>WebSite_doExpressCheckoutPayment</string> </value> + <value> <string>WebSection_doExpressCheckoutPayment</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doPaypalPayment.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doPaypalPayment.xml index 82ca2d86b5603ce6a82796662e1ccd5280dded5c..069fcce5441428ba42c0886e86361ac2a3a6ffb4 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doPaypalPayment.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_doPaypalPayment.xml @@ -66,14 +66,14 @@ if isAnon:\n return\n \n ## check if the id of the token correspond to the good products\n -parameter_dict = context.WebSite_getExpressCheckoutDetails(token)\n +parameter_dict = context.WebSection_getExpressCheckoutDetails(token)\n if parameter_dict[\'ACK\'] != \'Success\':\n msg = translateString("This paypal session is not initialised with the actual card.")\n context.Base_redirect(\'\', \\\n keep_items={\'portal_status_message\': msg,})\n \n payer_id = parameter_dict[\'PAYERID\']\n -response_dict = context.WebSite_doExpressCheckoutPayment(token, payer_id)\n +response_dict = context.WebSection_doExpressCheckoutPayment(token, payer_id)\n \n if response_dict[\'ACK\'] != \'Success\':\n msg = translateString("Your payment failed because of ")\n diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getExpressCheckoutDetails.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getExpressCheckoutDetails.xml similarity index 96% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getExpressCheckoutDetails.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getExpressCheckoutDetails.xml index d9a986130b7b745fe021a90b237515edd0bf5f48..cae4534009884e99d6b74a0eaf56fcb8b1e06614 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getExpressCheckoutDetails.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getExpressCheckoutDetails.xml @@ -59,7 +59,7 @@ if security_parameter_dict is None:\n security_parameter_dict[\'TOKEN\'] = token\n security_parameter_dict[\'METHOD\'] = \'GetExpressCheckoutDetails\'\n \n -response_parameter_dict = context.ERP5Base_submitPaypalNVPRequest(parameter_dict=security_parameter_dict,\n +response_parameter_dict = context.WebSection_submitPaypalNVPRequest(parameter_dict=security_parameter_dict,\n nvp_url=context.WebSite_getPaypalUrl(api=\'nvp\', alternative_url=alternative_url))\n return response_parameter_dict\n </string> </value> @@ -124,7 +124,7 @@ return response_parameter_dict\n </item> <item> <key> <string>id</string> </key> - <value> <string>WebSite_getExpressCheckoutDetails</string> </value> + <value> <string>WebSection_getExpressCheckoutDetails</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getNewPaypalToken.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getNewPaypalToken.xml similarity index 95% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getNewPaypalToken.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getNewPaypalToken.xml index 5bf6799b88470d1bfdb32eb546940de7fcbfffcf..a65a050d485b8966e5e4a5501103cdacaf256b18 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSite_getNewPaypalToken.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_getNewPaypalToken.xml @@ -53,7 +53,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>response_parameter_dict = context.ERP5Base_submitPaypalNVPRequest(parameter_dict=context.WebSite_getPaypalOrderParameterDict(),\n + <value> <string>response_parameter_dict = context.WebSection_submitPaypalNVPRequest(parameter_dict=context.WebSite_getPaypalOrderParameterDict(),\n nvp_url=context.WebSite_getPaypalUrl(api=\'nvp\', alternative_url=alternative_url))\n \n if response_parameter_dict is None:\n @@ -122,7 +122,7 @@ return \'\'\n </item> <item> <key> <string>id</string> </key> - <value> <string>WebSite_getNewPaypalToken</string> </value> + <value> <string>WebSection_getNewPaypalToken</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Base_submitPaypalNVPRequest.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_submitPaypalNVPRequest.xml similarity index 91% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Base_submitPaypalNVPRequest.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_submitPaypalNVPRequest.xml index 4cc10914bb6949e3c4e4bae553b068723a4ef760..45dd754cb170e549eba24a8838a8a246800ba0b1 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Base_submitPaypalNVPRequest.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_submitPaypalNVPRequest.xml @@ -19,7 +19,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>ERP5Base_submitPaypalNVPRequest</string> </value> + <value> <string>WebSection_submitPaypalNVPRequest</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Site_unrestrictedGetPrice.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_unrestrictedGetPrice.xml similarity index 91% rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Site_unrestrictedGetPrice.xml rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_unrestrictedGetPrice.xml index 0b4f73b9430737634fe17c9783c192bfd239e972..9a074cd01ca80787811f25df01697305f22c9139 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/ERP5Site_unrestrictedGetPrice.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/WebSection_unrestrictedGetPrice.xml @@ -19,7 +19,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>ERP5Site_unrestrictedGetPrice</string> </value> + <value> <string>WebSection_unrestrictedGetPrice</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_multiflex_layout/erp5_web_multiflex5_commerce_layout/product_list_decoratedPrice.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_multiflex_layout/erp5_web_multiflex5_commerce_layout/product_list_decoratedPrice.xml index e74ab3880ab2abb081613f5458a3d060d67b2e47..69c3656db930b2981e584e182ac54b1441c56b7e 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_multiflex_layout/erp5_web_multiflex5_commerce_layout/product_list_decoratedPrice.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_multiflex_layout/erp5_web_multiflex5_commerce_layout/product_list_decoratedPrice.xml @@ -275,7 +275,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: \'%s %s\' % (here.ERP5Site_unrestrictedGetPrice(cell), cell.SaleOrder_getShoppingCartDefaultCurrencyCode())</string> </value> + <value> <string>python: \'%s %s\' % (here.WebSection_unrestrictedGetPrice(cell), cell.SaleOrder_getShoppingCartDefaultCurrencyCode())</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewPaypalForm.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewPaypalForm.xml index b6149cb765db358d3b2b2a96f8e47e8fcf722162..e8278d767825b43f61bd594925c0a2c0f0bce6eb 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewPaypalForm.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewPaypalForm.xml @@ -39,8 +39,7 @@ <key> <string>_text</string> </key> <value> <string encoding="cdata"><![CDATA[ -<tal:block tal:define="web_site python: here.getWebSiteValue();\n - 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_price python: float(shopping_cart.SaleOrder_getShoppingCartTotalPrice());\n taxes_amount python: float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_taxes=True, include_shipping=True)) -\n @@ -59,7 +58,7 @@ \n <!-- # can be _cart, _xclick, _express-checkout -->\n <tal:block tal:condition="python: paypal_method == \'_express-checkout\'">\n - <tal:block tal:define="token python: web_site.WebSite_getNewPaypalToken()">\n + <tal:block tal:define="token python: here.WebSection_getNewPaypalToken()">\n <a tal:condition="python: token is not None and token != \'\'"\n tal:attributes="href python: \'%s?cmd=_express-checkout&token=%s&AMT=70.0&CURRENCYCODE=EUR\' % (action, token)">\n <img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="PayPal - The safer, easier way to pay online!" style="border:none;">\n diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewSelectedProductWidget.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewSelectedProductWidget.xml index 6e37647b2c6ead7851f534b2b376f3201f31d108..f6702b312dcc38dfb5f5080aa74659a0b0a2ba5d 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewSelectedProductWidget.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_viewSelectedProductWidget.xml @@ -57,12 +57,12 @@ <div tal:define="site_url python:here.getWebSiteValue().absolute_url();\n current_web_section python:request.get(\'current_web_section\', here);\n shopping_cart here/SaleOrder_getShoppingCart;\n - currency_symbole python: shopping_cart.SaleOrder_getShoppingCartDefaultCurrencySymbole();"\n + currency_symbol python: shopping_cart.SaleOrder_getShoppingCartDefaultCurrencySymbol();"\n i18n:translate="" i18n:domain="ui" i18n:attributes="title"\n title="Sections accessible from here." class="selected-product">\n <tal:block tal:repeat="product python: here.WebSection_getProductList(limit=5)">\n <div tal:define="product_href python: \'%s/product_module/%s/%s\' % (site_url, product.getId(), \'Resource_viewAsShop\');\n - price python: here.ERP5Site_unrestrictedGetPrice(product)">\n + price python: here.WebSection_unrestrictedGetPrice(product)">\n <a href="#" tal:attributes="href product_href">\n <img tal:condition="python: product.getDefaultImageValue() not in (None, \'\') and product.getDefaultImageValue().getData() not in (None, \'\')"\n tal:attributes="src python: product.getDefaultImageAbsoluteUrl() + \'?display=thumbnail&format=png&resolution=75\'" width="75"/>\n @@ -77,7 +77,7 @@ tal:attributes="href product_href">A product</a>\n <br />\n <tal:block tal:condition="python: price is not None">\n - <span tal:content="python: \'%s %s\' % (price, currency_symbole)"></span>\n + <span tal:content="python: \'%s %s\' % (price, currency_symbol)"></span>\n </tal:block>\n <tal:block tal:condition="python: price is None">\n <span>The price is not setted yet.</span>\n diff --git a/bt5/erp5_commerce/bt/revision b/bt5/erp5_commerce/bt/revision index 4b9bce48238e62028651de99e7f2b218771cd806..b912dc118c6d152c61ec7a6dd1962596853bc8f7 100644 --- a/bt5/erp5_commerce/bt/revision +++ b/bt5/erp5_commerce/bt/revision @@ -1 +1 @@ -148 \ No newline at end of file +155 \ No newline at end of file