Commit c563b6a2 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce: only show available shipping method

parent 1c58d2f7
<tal:block tal:define="web_site here/getWebSiteValue;
currency web_site/WebSite_getShoppingCartDefaultCurrency;
currency_reference currency/getReference;
currency web_site/WebSite_getShoppingCartDefaultCurrency;
currency_reference currency/getReference;
available_shipping_resource_list web_site/SaleOrder_getAvailableShippingResourceList;
shipping_category_list here/portal_categories/product_line/shipping/objectValues">
available_shipping_resource_list python: [x for x in available_shipping_resource_list if x.Resource_getShopPrice() is not None];
available_category_list python: [x.getProductLineValue() for x in available_shipping_resource_list];
shipping_category_list python: [x for x in here.portal_categories.product_line.shipping.objectValues() if x in available_category_list];"
>
<tal:block tal:repeat="category shipping_category_list">
<div class="shipment_category_item_title">
......@@ -14,7 +17,7 @@
tal:content="category/getDescription"> Description </span>
</div>
<tal:block tal:repeat="resource available_shipping_resource_list">
<tal:block tal:condition="python: (resource.Resource_getShopPrice() is not None) and resource.getProductLineValue() == category">
<tal:block tal:condition="python: resource.getProductLineValue() == category">
<div class="shipment_method_item">
<input type="radio" tal:attributes="value resource/getRelativeUrl"
name="field_my_shipping_method">
......
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