Commit 6f7c7ba3 authored by Lucas Carvalho's avatar Lucas Carvalho

* removed hard coded values.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29617 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0538574f
......@@ -60,7 +60,8 @@ if step is None:\n
\n
if context.request.get(\'plop\', None) is not None:\n
context.REQUEST.set(\'step\', 2)\n
return context.getWebSectionValue().restrictedTraverse(\'person_module/1\').Person_viewAsWeb(context.REQUEST)\n
person_object = context.getWebSiteValue().SaleOrder_getShoppingCartCustomer()\n
return context.getWebSectionValue().restrictedTraverse(person_object.getRelativeUrl()).Person_viewAsWeb(context.REQUEST)\n
</string> </value>
</item>
<item>
......@@ -101,6 +102,7 @@ if context.request.get(\'plop\', None) is not None:\n
<string>context</string>
<string>None</string>
<string>step</string>
<string>person_object</string>
</tuple>
</value>
</item>
......
......@@ -41,16 +41,19 @@
<tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n
shopping_cart_item_list shopping_cart/SaleOrder_getShoppingCartItemList;\n
web_site here/getWebSiteValue;\n
currency_code web_site/WebSite_getShoppingCartDefaultCurrencyCode;\n
customer here/SaleOrder_getShoppingCartCustomer;\n
applicable_tax python: customer.Person_getApplicableTaxList().get(\'VAT\');\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
float(shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_shipping=True));\n
shipping here/SaleOrder_getSelectedShippingResource;\n
shipping_price python: here.restrictedTraverse(shipping).getPrice();\n
customer here/SaleOrder_getShoppingCartCustomer;\n
paypal_method python: \'_express-checkout\';\n
test_env python: True;\n
test_base_url python: \'http://www.dentra.net:9080/erp5\';\n
base_url python:here.getWebSiteValue().absolute_url();\n
base_url python: here.getWebSiteValue().absolute_url();\n
action python: test_env and \'https://www.sandbox.paypal.com/cgi-bin/webscr\'\n
or \'https://www.paypal.com/cgi-bin/webscr\';\n
TPE python: options.get(\'TPE\', \'my_merchant_key_location\');\n
......@@ -60,7 +63,7 @@
<tal:block tal:condition="python: paypal_method == \'_express-checkout\'">\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
tal:attributes="href python: \'%s?cmd=_express-checkout&token=%s&AMT=70.0&CURRENCYCODE=%s\' % (action, token, currency_code)">\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
</a>\n
<span tal:condition="python: token is None or token == \'\'" tal:content="python: here.Base_translateString(\'Paypal is not available actually.\')"></span>\n
......@@ -81,7 +84,7 @@
\n
<tal:block tal:condition="python: paypal_method == \'_cart\'" tal:repeat="item shopping_cart_item_list">\n
<input type="hidden" name="cmd" value="_cart">\n
<input type="hidden" name="tax_cart" value="20">\n
<input type="hidden" name="tax_cart" tal:attributes="value applicable_tax">\n
<tal:block tal:define="resource python: here.restrictedTraverse(item.getResource());\n
quantity python: int(item.getQuantity());\n
price python: resource.getPrice();">\n
......@@ -113,7 +116,7 @@
<input type="hidden" name="night_phone_b" tal:attributes="value customer/getDefaultTelephoneText">\n
\n
<input type="hidden" name="shipping" tal:attributes="value shipping_price">\n
<input type="hidden" name="currency_code" value="EUR">\n
<input type="hidden" name="currency_code" tal:attributes="value currency_code">\n
<input type="hidden" name="button_subtype" value="products">\n
<input type="hidden" name="display" value="1">\n
<input type="hidden" name="upload" value="1">\n
......
......@@ -78,7 +78,7 @@
<span><span tal:replace="python: here.Base_translateString(\'You are logged as\')"/> <span tal:replace="customer/getTitle"/></span>\n
</p>\n
<a class="articlelink" \n
tal:attributes="href python: \'%s/SaleOrderModule_viewAsWebSaleOrderList\' % website.sale_order_module.absolute_url()">\n
tal:attributes="href python: \'%s/sale_order_module/SaleOrderModule_viewAsWebSaleOrderList\' % website.absolute_url()">\n
<span tal:replace="python: here.Base_translateString(\'My Orders\')"/>\n
</a> &nbsp;\n
<a class="articlelink" \n
......
238
\ No newline at end of file
240
\ 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