insert a "view your order history" and "view [username]s store" link
Last modified: August 23, 2009 - 21:21
description
Inserts a simple "view your order history" and "View [username]s store" link in the user profile page. Requires the store.module to be enabled and setup. The store.module is part of the ecommerce.module suite of modules.
Usage
- For use in your user profile page override
- Using a text editor like NOTEPAD.EXE or an equivalent, copy and paste the code into your user_profile.tpl.php file
- Tested and works with Drupal 4.5 and 4.6
- Change the div class name or the link text to suit.
View order history link
<?php if ($GLOBALS['user']->uid == $user->uid): /* check to see if it is the owner of the profile before displaying this link */ ?>
<div class="orders">
<?php print l(t('View your order history'), "store/history/$user->uid")
</div>
<?php endif; /* end of snippet */ ?> View [username]s store link
<div class="storelink">
<?php print l('view '. $user->name. 's store', 'store/'. $user->uid); ?>
</div>