Commit 73ad6938 authored by Vincent Desmares's avatar Vincent Desmares

improve shopping cart renderer

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27404 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 86817d40
...@@ -92,11 +92,16 @@ div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div ...@@ -92,11 +92,16 @@ div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div
div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_left a {font-weight: bold; font-size:105%;}\n div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_left a {font-weight: bold; font-size:105%;}\n
div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_right {float:right; text-align:right; padding:2px;}\n div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_right {float:right; text-align:right; padding:2px;}\n
div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_right a {font-weight: bold; font-size:121%;}\n div.subcontent-box.cartbox fieldset.widget div.field table tr td.cart_bottom div.cart_right a {font-weight: bold; font-size:121%;}\n
div.selected-product {height : 120px; width:<tal:block tal:replace="main_content_width"/>px; padding-left:25px; margin-bottom:10px;}\n \n
\n
div.selected-product {height : 110px; width:<tal:block tal:replace="main_content_width"/>px; padding-left:25px; margin-bottom:10px;}\n
div.selected-product div {float:left; width:100px; height:100px; text-align:center; padding-right: 25px;}\n div.selected-product div {float:left; width:100px; height:100px; text-align:center; padding-right: 25px;}\n
div.selected-product img {padding:0px; margin:0px; margin-left:10px; margin-right:10px;}\n div.selected-product img {border:solid 1px #000; padding:0px; margin-left:10px; margin-right:10px; margin-top:5px; margin-bottom:2px;}\n
div.selected-product img:hover {border:solid 1px #000; padding:0px; margin:0px; margin-left:10px; margin-right:10px;}\n
.cart_item_name {width:180px;}\n .cart_item_name {width:180px;}\n
.headline {float:left; width:<tal:block tal:replace="main_content_width"/>px;}\n .headline {float:left; width:<tal:block tal:replace="main_content_width"/>px;}\n
\n
\n
.resource_left {float:left; width:<tal:block tal:replace="python: (main_content_width / 3) * 2"/>px;}\n .resource_left {float:left; width:<tal:block tal:replace="python: (main_content_width / 3) * 2"/>px;}\n
.resource_right {float:right; background-color:red; width:<tal:block tal:replace="python: main_content_width / 3"/>px; background-color:<tal:block tal:replace="body_color"/>;}\n .resource_right {float:right; background-color:red; width:<tal:block tal:replace="python: main_content_width / 3"/>px; background-color:<tal:block tal:replace="body_color"/>;}\n
.resource_center {clear:both; background-color:<tal:block tal:replace="body_color"/>; padding:10px;}\n .resource_center {clear:both; background-color:<tal:block tal:replace="body_color"/>; padding:10px;}\n
...@@ -128,6 +133,21 @@ div.resource_image label {display:none;}\n ...@@ -128,6 +133,21 @@ div.resource_image label {display:none;}\n
.product_list:hover {border-top: 1px solid <tal:block tal:replace="primary_color"/>; border-bottom: 1px solid <tal:block tal:replace="primary_color"/>; background-color:<tal:block tal:replace="secondary_color"/>;}\n .product_list:hover {border-top: 1px solid <tal:block tal:replace="primary_color"/>; border-bottom: 1px solid <tal:block tal:replace="primary_color"/>; background-color:<tal:block tal:replace="secondary_color"/>;}\n
.product_list_bis:hover {border-top: 1px solid <tal:block tal:replace="primary_color"/>;border-bottom: 1px solid <tal:block tal:replace="primary_color"/>; background-color:<tal:block tal:replace="secondary_color"/>;}\n .product_list_bis:hover {border-top: 1px solid <tal:block tal:replace="primary_color"/>;border-bottom: 1px solid <tal:block tal:replace="primary_color"/>; background-color:<tal:block tal:replace="secondary_color"/>;}\n
\n \n
.shopping_cart_renderer_title {float:left; margin-top:8px;}\n
.shopping_cart_renderer_remove {float:right; margin-top:3px;}\n
.shopping_cart_renderer_remove a img {border:none;}\n
.shopping_cart_renderer_remove a img:hover {border:none;}\n
\n
.shopping_cart_renderer_shipping label a {display:none;}\n
.shopping_cart_renderer_submit label a {display:none;}\n
\n
div.shopping_cart_renderer_shipping {width: <tal:block tal:replace="python: main_content_width - 40"/>px; height:20px; margin-bottom:20px; margin-top:20px; padding-left:20px; padding-right:20px; padding-top: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;}\n
.shopping_cart_renderer_shipping div {float:right; height:20px;}\n
div.shopping_cart_renderer_submit {width: <tal:block tal:replace="python: main_content_width - 40"/>px; height:20px; margin-bottom:20px; padding-left:20px; padding-right:20px; padding-top: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;}\n
.shopping_cart_renderer_submit div {float:right; height:20px;}\n
\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
......
...@@ -143,6 +143,13 @@ ...@@ -143,6 +143,13 @@
<tal:block metal:use-macro="here/aggregate_render/macros/aggregate_render"/>\n <tal:block metal:use-macro="here/aggregate_render/macros/aggregate_render"/>\n
</tal:block>\n </tal:block>\n
</tal:block> \n </tal:block> \n
<div class="main_content">\n
<div class="corner-content-1col-top"></div> \n
<div class="content-1col-nobox">\n
<tal:block tal:content="structure here/WebSection_viewSelectedProductWidget"/>\n
</div>\n
<div class="corner-content-1col-bottom"></div> \n
</div>\n
</div>\n </div>\n
\n \n
<!-- SUBCONTENT -->\n <!-- SUBCONTENT -->\n
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="ListField" module="Products.Formulator.StandardFields"/>
<string>Products.Formulator.StandardFields</string> <tuple/>
<string>ListField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -201,7 +198,7 @@ ...@@ -201,7 +198,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>shopping_cart_renderer_shipping</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
<string>Products.ERP5Form.InputButtonField</string> <tuple/>
<string>InputButtonField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -128,7 +125,7 @@ ...@@ -128,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>hiddenLabel</string> </value> <value> <string>hiddenLabel shopping_cart_renderer_submit</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -154,6 +151,10 @@ ...@@ -154,6 +151,10 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>SaleOrder_editShoppingCart:method</string> </value> <value> <string>SaleOrder_editShoppingCart:method</string> </value>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="EditorField" module="Products.ERP5Form.EditorField"/>
<string>Products.ERP5Form.EditorField</string> <tuple/>
<string>EditorField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -184,6 +181,10 @@ ...@@ -184,6 +181,10 @@
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -288,11 +289,8 @@ ...@@ -288,11 +289,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="ListBox" module="Products.ERP5Form.ListBox"/>
<string>Products.ERP5Form.ListBox</string> <tuple/>
<string>ListBox</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -325,6 +322,10 @@ ...@@ -325,6 +322,10 @@
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
...@@ -498,6 +499,12 @@ ...@@ -498,6 +499,12 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Sale Order Lines</string> </value> <value> <string>Sale Order Lines</string> </value>
</item> </item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
...@@ -526,11 +533,8 @@ ...@@ -526,11 +533,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<string>Products.Formulator.MethodField</string> <tuple/>
<string>Method</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<tal:block tal:define="shopping_cart_items here/SaleOrder_getShoppingCartItemList;\n <tal:block tal:define="shopping_cart here/SaleOrder_getShoppingCart;\n
total_price python: here.SaleOrder_getShoppingCartTotalPrice(include_currency=True);\n shopping_cart_items shopping_cart/SaleOrder_getShoppingCartItemList;\n
empty_cart python: here.SaleOrder_isShoppingCartEmpty();\n total_price python: shopping_cart.SaleOrder_getShoppingCartTotalPrice(include_currency=True);\n
confirm_mode python: bool(options.get(\'confirm_mode\', False))">\n empty_cart python: shopping_cart.SaleOrder_isShoppingCartEmpty();\n
confirm_mode python: bool(options.get(\'confirm_mode\', 0))">\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
\n
<tal:block tal:condition = "empty_cart"> \n <tal:block tal:condition = "empty_cart"> \n
<h3><span tal:replace="python: here.Base_translateString(\'You shopping cart is empty.\')"/></h3>\n <h3><span tal:replace="python: here.Base_translateString(\'You shopping cart is empty.\')"/></h3>\n
</tal:block>\n </tal:block>\n
...@@ -65,17 +65,22 @@ ...@@ -65,17 +65,22 @@
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.restrictedTraverse(resource.getSupplyLinePriceCurrency()).getTitle()"> \n currency python: here.restrictedTraverse(shopping_cart.getPriceCurrency());\n
currency_title python: currency.getTitle(); \n
currency_symbole python: currency.getShortTitle();">\n
<td>\n <td>\n
<p> \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
<span tal:replace="resource/getTitle"/> \n <span tal:replace="resource/getTitle"/> \n
</a>\n </a>\n
</div>\n
<div class="shopping_cart_renderer_remove">\n
<a tal:condition="not: confirm_mode"\n <a tal:condition="not: confirm_mode"\n
tal:attributes="href python: \'%s/SaleOrder_deleteShoppingCartItem?field_my_order_line_id=%s\' \n tal:attributes="href python: \'%s/SaleOrder_deleteShoppingCartItem?field_my_order_line_id=%s\' \n
%(here.absolute_url(), order_line_id)">\n %(here.absolute_url(), order_line_id)">\n
<img src="images/edittrash.png" title="Remove from shopping cart"/></a>\n <img src="images/icon_remove.gif" title="Remove from shopping cart"/>\n
<p>\n </a>\n
</div>\n
</td>\n </td>\n
<td>\n <td>\n
<select tal:condition="not: confirm_mode"\n <select tal:condition="not: confirm_mode"\n
...@@ -88,10 +93,10 @@ ...@@ -88,10 +93,10 @@
<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"/>\n <span tal:replace="price"/> <span tal:replace="currency_title"/>\n
</td>\n </td>\n
<td>\n <td>\n
<span tal:replace="python: price*quantity"/> <span tal:replace="currency"/>\n <span tal:replace="python: price*quantity"/> <span tal:replace="currency_title"/>\n
</td>\n </td>\n
</tr>\n </tr>\n
</tal:block>\n </tal:block>\n
...@@ -99,7 +104,7 @@ ...@@ -99,7 +104,7 @@
<td><br/><span tal:replace="python: here.Base_translateString(\'Sub Total\')"/></td>\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><br/>\n <td style="vertical-align=middle;">\n
<b>\n <b>\n
<span tal:replace="total_price"/>\n <span tal:replace="total_price"/>\n
</b>\n </b>\n
......
...@@ -64,7 +64,13 @@ ...@@ -64,7 +64,13 @@
<div tal:define="product_href python: \'%s/product_module/%s/%s\' % (site_url, product.getId(), \'Resource_viewAsShop\');\n <div tal:define="product_href python: \'%s/product_module/%s/%s\' % (site_url, product.getId(), \'Resource_viewAsShop\');\n
price product/getPrice">\n price product/getPrice">\n
<a href="#" tal:attributes="href product_href">\n <a href="#" tal:attributes="href product_href">\n
<img tal:attributes="src python: product.getDefaultImageAbsoluteUrl() + \'?display=thumbnail\'" width="75" height="75"/>\n <img tal:condition="python: product.getDefaultImage() is not None"\n
tal:attributes="src python: product.getDefaultImageAbsoluteUrl() + \'?display=thumbnail\'" width="75" height="75"/>\n
<tal:block tal:condition="python: product.getDefaultImage() is None">\n
<br />\n
<span>No image available.</span>\n
<br />\n
</tal:block>\n
</a>\n </a>\n
<a href="#" tal:content="python: product.getTranslatedTitle()"\n <a href="#" tal:content="python: product.getTranslatedTitle()"\n
tal:attributes="href product_href">A product</a>\n tal:attributes="href product_href">A product</a>\n
......
125 126
\ 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