eZ Community » Forums » Setup & design » List orders by customers
expandshrink

List orders by customers

List orders by customers

Tuesday 13 December 2005 11:28:01 am - 4 replies

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.

Wednesday 14 December 2005 8:53:31 am

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

Wednesday 14 December 2005 11: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.

Thursday 15 December 2005 8:44:00 am

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.

Modified on Thursday 15 December 2005 8:44:32 am by Ɓukasz Serwatka

Wednesday 01 June 2011 6:09:50 pm

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}

Modified on Wednesday 01 June 2011 6:10:13 pm by Lo' F.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from