Forums / Setup & design / List orders by customers

List orders by customers

Author Message

Nicolas OTTAVI

Tuesday 13 December 2005 2:28:01 am

Hi,

I want to give access to the orderlist to my customers. How should I do ?
the orderlist/ or custumerorderview lead me to an access denied errror, and I can't found any policy rules allowing users to see these precious information.

Thanks for your help,
C.

Łukasz Serwatka

Tuesday 13 December 2005 11:53:31 pm

Hi Claude,

You will have grant access to module "shop" and function "administrate". Then your users will have access to shop/orderlist and to shop/customerlist

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Nicolas OTTAVI

Wednesday 14 December 2005 2:36:36 am

Thanks for the answer Lukasz,

but with such rights a customer can see all orders made on the shop. It seems we can not limitate this right to his <b>own</b> orders.

That's an issue to my point of view ? I will probably post a "enhancement report", what do you think about it ? Is it relevant ?

thanks,
C.

Łukasz Serwatka

Wednesday 14 December 2005 11:44:00 pm

Yes, for now there is no fetch function for orders. However you can create new siteaccess with access to shop/orderlist. or use public and override template:

design/standard/templates/shop/orderlist.tpl

There is array $order_list, you can look can compare current user_id with user_id from order

{let current_user=fetch( user, current_user )}
{section name="Order" loop=$order_list sequence=array(bglight,bgdark)}
    {section show=eq( $Order:item.user_id, $current_user.contentobject_id )}
        display something here
    {/section}
{/secction}
{/let}

You will have to count of order per user in loop and store it in $order_list_count and pass to google navigator.

This should work. Feel free to report new enhancement.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Lo' F.

Wednesday 01 June 2011 9:09:50 am

or...

{let current_user=fetch( user, current_user )}
{section name="Order" loop=$order_list sequence=array(bglight,bgdark)}
{section-exclude match=$Order:item.user_id|ne($current_user.contentobject_id)}
        display something here
{/section}
{/let}

loredanaebook.it