pombreda / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

the cart listing colum's titles stay visible #273

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
when a user updates the quantities to 0 so that the cart is empty, the cart
listing colum's titles stay visible.
In the template cart-listing you can add a condition in the tag fieldset

<fieldset tal:condition="view/isNotEmpty"
      i18n:domain="plonegetpaid">
where isNotEmpty is an attribute of the class ContainerViewlet defined in
getpaid.core.cart.ShoppingCart

Original issue reported on code.google.com by danielle...@gmail.com on 4 Jul 2009 at 7:14

GoogleCodeExporter commented 9 years ago

Original comment by cjj.ifpe...@gmail.com on 22 Feb 2010 at 2:41

GoogleCodeExporter commented 9 years ago
If you try this by the way of portal_view_customizations
you come up with a
Unauthorized: You are not allowed to access 'label' in this context
to try it successfully  we may as well have  to change the role assigned to the 
permission View
/Plone/portal_view_customizations/zope.interface.interface-cart-listing/manage_a
ccess

but it works with a direct change of the file cart-listing.pt

We can accompany this change with a modification of the template cart-manage.pt
for example
  <metal:block fill-slot="getpaid_content">
      <h3 tal:condition="view/size" i18n:translate="heading_cart_manage" >Your Shopping Cart</h3>
      <h3 tal:condition="not:view/size" i18n:translate="heading_cart_empty" >Your Cart is empty</h3>
       <tal:block tal:replace="structure  view/manager/render"/>
  </metal:block>

Original comment by danielle...@gmail.com on 17 Dec 2010 at 3:36