I tried making a custom link for Commerce 2 user orders page as /user/[current-user:uid]/orders and it does not work; it renders as /user/%5Bcurrent-user%3Auid%5D/orders

Comments

chike created an issue. See original summary.

chike’s picture

I tried this again now and this /user/[current-user:uid]/orders produces /user/1/orders for all users. I set Method for Commerce-order to Context from Commerce_order_item and Method for User to Context from User. Even if I set Context from... for all Methods, it still doesn't work: every user still gets user/1/orders referring to admin user id(1) and not the current user's user id.

esmoves’s picture

Is this already addressed? I encounter the same problem. The url is rendered /user/%7Bcurrent-user%3Auid%7D.

chike’s picture

I found a workaround for this: use the absolute url e.g. instead of /user/[current-user:uid]/orders use https://www.website.com/user/[current-user:uid]/orders likewise https://www.website.com/user/[current-user:uid]/stores worked.

develcuy’s picture

Version: 8.x-1.0-alpha2 » 9.1.x-dev
chike’s picture

gmaximus’s picture

#4 hasn't worked for me.