Commit a2e63cf1 authored by Vincent Desmares's avatar Vincent Desmares

vincentd

change checkout page and put currency code instead of currency title everywhere

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27845 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 70bad416
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
\n \n
#get cached description\n #get cached description\n
# TODO\n
\n \n
#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
...@@ -63,9 +64,6 @@ web_page = portal.portal_catalog(portal_type=\'Web Page\',\n ...@@ -63,9 +64,6 @@ web_page = portal.portal_catalog(portal_type=\'Web Page\',\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/pamphlet/web/short\').getUid(),\n
#src__=1,\n #src__=1,\n
)\n )\n
#context.pdb()\n
\n
#return web_page\n
if web_page is None or len(web_page) == 0:\n if web_page is None or len(web_page) == 0:\n
return context.Base_translateString("No more information for this product.")\n return context.Base_translateString("No more information for this product.")\n
return web_page[0].getObject().asStrippedHTML()\n return web_page[0].getObject().asStrippedHTML()\n
......
...@@ -80,7 +80,7 @@ if include_taxes:\n ...@@ -80,7 +80,7 @@ if include_taxes:\n
\n \n
if include_currency:\n if include_currency:\n
currency = context.SaleOrder_getShoppingCartDefaultCurrency()\n currency = context.SaleOrder_getShoppingCartDefaultCurrency()\n
return \'%s %s\' %(total, currency.getTitle())\n return \'%s %s\' %(total, currency.getReference())\n
else:\n else:\n
return str(total)\n return str(total)\n
</string> </value> </string> </value>
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
">\n ">\n
\n \n
.main_content h2 {margin:0px;}\n .main_content h2 {margin:0px;}\n
div.portal_status_message h3 {margin:0px;}\n
\n \n
#fieldset_left {padding:10px;}\n #fieldset_left {padding:10px;}\n
#fieldset_left div.field {margin-top:5px; margin-bottom: 10px;}\n #fieldset_left div.field {margin-top:5px; margin-bottom: 10px;}\n
...@@ -166,10 +167,14 @@ div.shopping_cart_renderer div.input {padding:0px;}\n ...@@ -166,10 +167,14 @@ div.shopping_cart_renderer div.input {padding:0px;}\n
.shopping_cart_renderer_shipping label a {display:none;}\n .shopping_cart_renderer_shipping label a {display:none;}\n
.shopping_cart_renderer_submit label a {display:none;}\n .shopping_cart_renderer_submit label a {display:none;}\n
\n \n
div.shopping_cart_renderer_shipping {clear:both; height:20px; margin-bottom:20px; margin-top:20px; padding-left:20px; padding-right:20px; padding-top:3px; padding-bottom:3px;}\n select.shopping_cart_renderer_shipping {float:right;}\n
input.shopping_cart_renderer_submit {float:right;}\n
\n
\n
div.shopping_cart_renderer_shipping {clear:both; height:20px; margin-bottom:20px; margin-top:20px; padding-left:20px; padding-right:20px; padding-top:3px; padding-bottom:3px; background-color: <tal:block tal:replace="body_color"/>;}\n
.shopping_cart_renderer_shipping label {float:left; width: <tal:block tal:replace="python: main_content_width / 4"/>px; height:20px;padding:0px;}\n .shopping_cart_renderer_shipping label {float:left; width: <tal:block tal:replace="python: main_content_width / 4"/>px; height:20px;padding:0px;}\n
.shopping_cart_renderer_shipping div {height:20px; padding:0px}\n .shopping_cart_renderer_shipping div {height:20px; padding:0px}\n
div.shopping_cart_renderer_submit {clear:both; height:20px; margin-bottom:20px; padding-left:20px; padding-right:20px; padding-top:3px; padding-bottom:3px;}\n div.shopping_cart_renderer_submit {clear:both; height:20px; margin-bottom:20px; padding-left:20px; padding-right:20px; padding-top:3px; padding-bottom:3px; background-color: <tal:block tal:replace="body_color"/>;}\n
.shopping_cart_renderer_submit label {float:left; width: <tal:block tal:replace="python: main_content_width / 8"/>px; height:20px;padding:0px;}\n .shopping_cart_renderer_submit label {float:left; width: <tal:block tal:replace="python: main_content_width / 8"/>px; height:20px;padding:0px;}\n
.shopping_cart_renderer_submit div {margin-left:10px; height:20px; padding:0px}\n .shopping_cart_renderer_submit div {margin-left:10px; height:20px; padding:0px}\n
\n \n
...@@ -197,6 +202,11 @@ fieldset.editable div.input {padding:0px;}\n ...@@ -197,6 +202,11 @@ fieldset.editable div.input {padding:0px;}\n
\n \n
.ecommerce_submit {margin:10px; margin-left:20px;}\n .ecommerce_submit {margin:10px; margin-left:20px;}\n
\n \n
.main_content table tr.shopping_cart_end_lines {border:none;}\n
.main_content table tr.shopping_cart_end_lines td {border:none;}\n
.main_content table tr.shopping_cart_end_lines td.used {border-bottom:solid 1px #CCC;}\n
\n
\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
......
...@@ -164,8 +164,10 @@ ...@@ -164,8 +164,10 @@
<tal:block tal:condition="python: request.get(\'portal_status_message\') is not None">\n <tal:block tal:condition="python: request.get(\'portal_status_message\') is not None">\n
<div class="main_content">\n <div class="main_content">\n
<div class="corner-content-1col-top"></div>\n <div class="corner-content-1col-top"></div>\n
<div class="content-1col-nobox">\n <div class="content-1col-nobox portal_status_message">\n
<span tal:content="python: request.get(\'portal_status_message\')"></span>\n <h3>\n
<span tal:content="python: request.get(\'portal_status_message\')"></span>\n
</h3>\n
</div>\n </div>\n
<div class="corner-content-1col-bottom"></div> \n <div class="corner-content-1col-bottom"></div> \n
</div>\n </div>\n
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.getPrice() and \'%s %s\' % (here.getPrice(), here.restrictedTraverse(here.getSaleSupplyLinePriceCurrency()).getShortTitle()) or \'No price.\'</string> </value> <value> <string>python: here.getPrice() and \'%s %s\' % (here.getPrice(), here.restrictedTraverse(here.getSaleSupplyLinePriceCurrency()).getReference()) or \'No price.\'</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<string>right</string> <string>right</string>
<string>center</string> <string>center</string>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -79,14 +80,21 @@ ...@@ -79,14 +80,21 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>shipping</string>
<string>taxes</string>
</list>
</value>
</item>
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>shopping_cart</string> <string>shopping_cart</string>
<string>discounts</string> <string>discounts</string>
<string>shipping</string>
<string>taxes</string>
<string>fake_form</string> <string>fake_form</string>
<string>customer</string> <string>customer</string>
<string>submit</string> <string>submit</string>
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<tal:block tal:define="customer here/SaleOrder_getShoppingCartCustomer">\n <tal:block tal:define="customer here/SaleOrder_getShoppingCartCustomer">\n
\n <br />\n
<h2>Customer</h2>\n <h2>Customer Information</h2>\n
\n \n
<table>\n <table>\n
<tr>\n <tr>\n
......
...@@ -41,9 +41,10 @@ ...@@ -41,9 +41,10 @@
<tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n <tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n
shopping_cart_items shopping_cart/SaleOrder_getShoppingCartItemList;\n shopping_cart_items shopping_cart/SaleOrder_getShoppingCartItemList;\n
total_price python: shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_currency=True);\n total_price python: shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_currency=False);\n
empty_cart python: shopping_cart.SaleOrder_isShoppingCartEmpty();\n empty_cart python: shopping_cart.SaleOrder_isShoppingCartEmpty();\n
confirm_mode python: bool(options.get(\'confirm_mode\', 0))">\n confirm_mode python: bool(options.get(\'confirm_mode\', 0));\n
currency_code python: here.SaleOrder_getShoppingCartDefaultCurrencyCode();">\n
<h2>\n <h2>\n
<span tal:replace="python: here.Base_translateString(\'My shopping cart\')"/>\n <span tal:replace="python: here.Base_translateString(\'My shopping cart\')"/>\n
</h2>\n </h2>\n
...@@ -53,21 +54,19 @@ ...@@ -53,21 +54,19 @@
\n \n
<tal:block tal:condition = "not: empty_cart">\n <tal:block tal:condition = "not: empty_cart">\n
<div class="ListContent">\n <div class="ListContent">\n
<table cellpadding="0" cellspacing="0" width="65%">\n <table cellpadding="0" cellspacing="0" width="65%"\n
tal:define="shipping here/SaleOrder_getSelectedShippingResource">\n
<tr>\n <tr>\n
<td class="Data" tal:content="python: here.Base_translateString(\'Product\')"/>\n <td class="Data" tal:content="python: here.Base_translateString(\'Product\')"/>\n
<td class="Data" tal:content="python: here.Base_translateString(\'Quantity\')"/>\n <td class="Data" tal:content="python: here.Base_translateString(\'Quantity\')"/>\n
<td class="Data" tal:content="python: here.Base_translateString(\'Price\')"/>\n <td class="Data" tal:content="python: here.Base_translateString(\'Unit Price\')"/>\n
<td class="Data" tal:content="python: here.Base_translateString(\'Total\')"/>\n <td class="Data" tal:content="python: here.Base_translateString(\'Total\')"/>\n
</tr>\n </tr>\n
<tal:block tal:repeat="order_line shopping_cart_items">\n <tal:block tal:repeat="order_line shopping_cart_items">\n
<tr tal:define="resource python: here.restrictedTraverse(order_line.getResource());\n <tr tal:define="resource python: here.restrictedTraverse(order_line.getResource());\n
quantity python: int(order_line.getQuantity());\n quantity python: int(order_line.getQuantity());\n
price python: resource.getPrice();\n price python: resource.getPrice();\n
order_line_id python: order_line.getId();\n order_line_id python: order_line.getId();">\n
currency python: here.SaleOrder_getShoppingCartDefaultCurrency();\n
currency_title python: currency.getTitle(); \n
currency_symbole python: currency.getShortTitle();">\n
<td>\n <td>\n
<div tal:attributes="class python: bool(confirm_mode) and \' \' or \'shopping_cart_renderer_title\'">\n <div tal:attributes="class python: bool(confirm_mode) and \' \' or \'shopping_cart_renderer_title\'">\n
<a href="" tal:attributes="href resource/absolute_url">\n <a href="" tal:attributes="href resource/absolute_url">\n
...@@ -93,24 +92,84 @@ ...@@ -93,24 +92,84 @@
<span tal:condition="confirm_mode" tal:content="quantity"/>\n <span tal:condition="confirm_mode" tal:content="quantity"/>\n
</td>\n </td>\n
<td>\n <td>\n
<span tal:replace="price"/> <span tal:replace="currency_title"/>\n <span tal:replace="price"/> <span tal:replace="currency_code"/>\n
</td>\n </td>\n
<td>\n <td>\n
<span tal:replace="python: price*quantity"/> <span tal:replace="currency_title"/>\n <span tal:replace="python: price*quantity"/> <span tal:replace="currency_code"/>\n
</td>\n </td>\n
</tr>\n </tr>\n
</tal:block>\n </tal:block>\n
<tr>\n <tr class="shopping_cart_end_lines">\n
<td><br/><span tal:replace="python: here.Base_translateString(\'Sub Total\')"/></td>\n
<td></td>\n <td></td>\n
<td></td>\n <td></td>\n
<td style="vertical-align=middle;">\n <td class="used"><span tal:replace="python: here.Base_translateString(\'Sub Total\')"/></td>\n
<td class="used" style="vertical-align=middle;">\n
<b>\n <b>\n
<span tal:replace="total_price"/>\n <span tal:replace="python: \'%s %s\' % (total_price, currency_code)"/>\n
</b>\n
</td>\n
</tr>\n
<tr class="shopping_cart_end_lines" tal:condition="confirm_mode">\n
<td></td>\n
<td></td>\n
<td class="used"><span tal:replace="python: here.Base_translateString(\'Shipping Price\')"/></td>\n
<td class="used" style="vertical-align=middle;">\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_obj.getPrice(), currency_code)"/></b>\n
</tal:block>\n
<tal:block tal:condition="python: shipping is None">\n
<span tal:replace="python: here.Base_translateString(\'Your current cart selection requires shipping.\')"/><br />\n
<span tal:replace="python: here.Base_translateString(\'Please select shipping from \')"/>\n
<a tal:attributes="href python: \'%s/cart\' % here.getWebSiteValue().absolute_url()">here</a>.\n
</tal:block>\n
</td>\n
</tr>\n
<tr class="shopping_cart_end_lines"\n
tal:condition="python: shipping is not None and confirm_mode">\n
<td></td>\n
<td></td>\n
<td class="used"><span tal:replace="python: here.Base_translateString(\'Total HT\')"/></td>\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_obj.getPrice(), currency_code)"/></b>\n
</tal:block>\n
</td>\n
</tr>\n
<tr class="shopping_cart_end_lines"\n
tal:condition="python: shipping is not None and confirm_mode"\n
tal:define="shipping here/SaleOrder_getSelectedShippingResource;\n
total_price python: here.SaleOrder_getShoppingCartTotalPrice(include_shipping=True, \n
include_taxes=True,\n
include_currency=True);">\n
<td></td>\n
<td></td>\n
<td class="used">\n
<div>\n
<span tal:replace="python: here.Base_translateString(\'Total TTC *\')"/>\n
</div>\n
</td>\n
<td class="used" style="vertical-align=middle;">\n
<b>\n
<tal:block>\n
<span tal:replace="total_price"/>\n
</tal:block>\n
</b>\n </b>\n
</td>\n </td>\n
</tr>\n </tr>\n
</table>\n </table>\n
<tal:block tal:condition="python: here.SaleOrder_getSelectedShippingResource() is not None and confirm_mode"\n
tal:define="tax_info here/Person_getApplicableTaxList">\n
<p tal:condition="python: tax_info is not None">\n
<span tal:replace="python: here.Base_translateString(\'* Applicable taxes\')"/> :\n
<tal:block tal:repeat="tax_name python: tax_info.keys()">\n
<span tal:content="python: \'%s (%s %s)\' %(tax_name, tax_info[tax_name], \'%\')">item </span>\n
</tal:block>\n
</p>\n
<p tal:condition="python: tax_info is None">\n
<span tal:replace="python: here.Base_translateString(\'No taxe are applicable for your region.\')"></span>\n
</p>\n
</tal:block>\n
</div>\n </div>\n
</tal:block> \n </tal:block> \n
</tal:block>\n </tal:block>\n
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<tal:block tal:condition = "not: empty_cart">\n <tal:block tal:condition = "not: empty_cart">\n
<tr><td class="cart_middle">\n <tr><td class="cart_middle">\n
<div class="cart_left">\n <div class="cart_left">\n
<span tal:replace="python: here.Base_translateString(\'Total price\')"/> \n <span tal:replace="python: here.Base_translateString(\'Total cart\')"/> \n
</div>\n </div>\n
<div class="cart_right">\n <div class="cart_right">\n
<span tal:replace="total_price"/>\n <span tal:replace="total_price"/>\n
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<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_name python: tax_info.keys()">\n
<li tal:content="python: \'%s (%s %s)\' %(tax_name, tax_info[tax_name], \'%\')">item </li>\n <b><li tal:content="python: \'%s (%s %s)\' %(tax_name, tax_info[tax_name], \'%\')">item </li></b>\n
</tal:block>\n </tal:block>\n
</ul>\n </ul>\n
</div>\n </div>\n
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<p>Your order will be processed by our personel now.</p>\n <p>Your order will be processed by our personel now.</p>\n
\n \n
<p> If you want to check your orders you can do it \n <p> If you want to check your orders you can do it \n
<a href="SaleOrderModule_viewAsWebSaleOrderList">here</a>\n <a tal:attributes="href python: \'%s/SaleOrderModule_viewAsWebSaleOrderList\' % here.getWebSiteValue().absolute_url()">here</a>\n
</p> </p>
]]></string> </value> ]]></string> </value>
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<string>my_ecommerce_base_product_line</string> <string>my_ecommerce_base_product_line</string>
<string>my_ecommerce_default_content</string> <string>my_ecommerce_default_content</string>
<string>my_ecommerce_product_list</string> <string>my_ecommerce_product_list</string>
<string>my_ecommerce_base_currency</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>enabled</string>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_ecommerce_base_currency</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>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<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">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </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>description</string> </key>
<value> <string>Your site will list by default all product of this product line.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<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>size</string> </key>
<value> <int>5</int> </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 Currency</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: here.getPortalType() == \'Web Site\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(i.getTitle(), i.getId()) for i in here.getPortalObject().currency_module.contentValues()]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
137 138
\ 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