Displaying All Users Wish Lists in Admin 3.4.11
Displaying All Users Wish Lists in Admin 3.4.11
Here is the same solution for X-Cart 3.4.11
Change to module ../skin1/admin/menu.tpl
Note: Add this line under the link to users.php (after line 3)
Wish lists
New module ../skin1/admin/main/adminwish.tpl
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>
<td valign=top>Purchased</td>
</tr>
{section name=cust_num loop=$wl_data}
<tr>
<td valign=top align=left>{$wl_data[cust_num].firstname} {$wl_data[cust_num].lastname}</td>
<td valign=top align=left>{$wl_data[cust_num].product}</td>
<td valign=top align=center>{$wl_data[cust_num].amount}</td>
<td valign=top align=right>${$wl_data[cust_num].price}</td>
<td valign=top align=center>{$wl_data[cust_num].purchased}</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%"}
New module ../admin/adminwish.php
<?
require "../smarty.php";
require "../config.php";
require "./auth.php";
require "../include/security.php";
$objects_per_page = $config["Appearance"]["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, xcart_wishlist.purchased 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");
?>
Change to module ../skin1/single/home.tpl
Note: Add these 2 lines after the line {include file="main/subscribe_confirmation.tpl"}
{elseif $main eq "adminwish"}
{include file="admin/main/adminwish.tpl"}
Thats it...
Simple.
Regards
Garry
__________________
All versions of X-Cart
Been in eCommerce 10 years, Coding, PM, SEO, Social. X-Cart 11 years. IT 30+ years.
Head of Web Dev for Australia's largest eCommerce 2 years.
Attended conferences, Velocity 2009 US, CeBit 2009, MySQL 2010 US, Online Retailer 2010, Web 2.0 2011 US, MySQL 2012 US (Percona).
Specialise in High Performance, High Volume, PHP, MySQL, HTML, CSS, JAVASCRIPT, SMARTY, MEMCACHED, APACHE, LIGHTTPD, FREEBSD, LINUX.
Email your requests to xcart@gazwebtech.com
|