I got it I believe. Again this was written for 3.3.5. This displays all the wish list items for every person. It will display X number of items per page where X depends on the variable "Users per page (admin)" in general settings. It could easily depend on another variable if you so desire to change it. One thing I don't like about it is I haven't figured out yet how to list just unique names instead of repeating the user's name multiple times depending on how many items in their wish list. (hope that made sense!) Right now I don't have time to figure that out part out though.
Here's the new admin/adminwish.php
Quote:
<?
require "../smarty.php";
require "../config.php";
require "./auth.php";
require "../include/security.php";
$objects_per_page = $config["General"]["users_per_page_admin"];
#
# Obtain wishlist from database
#
$wl_data = func_query("select xcart_customers.firstname, xcart_customers.lastname, xcart_products.product, xcart_wishlist.amount, xcart_pricing.price from xcart_customers, xcart_wishlist, xcart_products, xcart_pricing where xcart_wishlist.login=xcart_customers.login and xcart_wishlist.productid=xcart_products.productid and xcart_wishlist.productid=xcart_pricing.productid") ;
$total_items = count($wl_data);
$total_nav_pages = ceil($total_items/$objects_per_page)+1;
require "../include/navigation.php";
if (is_array($wl_data))
$wl_data = array_slice($wl_data, $first_page, $objects_per_page);;
$smarty->assign("navigation_script","adminwish.php?");
$smarty->assign("wl_data",$wl_data);
$smarty->assign("main","adminwish");
@include "../modules/gold_display.php";
$smarty->display("admin/home.tpl");
?>
|
The new skin1/admin/main/adminwish.tpl
Quote:
This page allows you to view all user's wishlists.
{capture name=dialog}
{ include file="customer/main/navigation.tpl" }
<table border=0 cellspacing=5>
<tr>
<td valign=top>Name</td>
<td valign=top>Products Desired</td>
<td valign=top>Quantity</td>
<td valign=top>Price Each</td>
</tr>
{section name=cust_num loop=$wl_data}
<tr>
<td valign=top>{$wl_data[cust_num].firstname} {$wl_data[cust_num].lastname}</td>
<td valign=top> {$wl_data[cust_num].product}</td>
<td valign=top> {$wl_data[cust_num].amount}</td>
<td valign=top> ${$wl_data[cust_num].price}</td>
</tr>
{/section}
</table>
{ include file="customer/main/navigation.tpl" }
{/capture}
{include file="dialog.tpl" title="Wish Lists" content=$smarty.capture.dialog extra="width=100%"}
|
and don't forget to add this after the first if statement in the
Quote:
{elseif $main eq "adminwish"}
{include file="admin/main/adminwish.tpl"}
|
Hope this helps someone!
Carrie