Has anyone developed a way to create a new order from a user page or within a view? Perhaps a block snippet that has a "create a new order for this user" link. Or a view with a "Create order for node author" field. If not I'll make something next week.
Create new order from user page
|
|
I took a peek inside the uc_order module and noticed that going to example.com/admin/store/orders/create/1 would create an order for user one. 1 being the uid. I created a simple php block with this code. It provides a link on user profile pages to create an order for the user.
<?php
$user = arg(0);
$uid = arg(1);
if (is_numeric($uid) && ($user == 'user')) print(l('create order for this user', 'admin/store/orders/create/' . $uid));
?>|
|






Joined: 08/09/2007