X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Displaying All User's Wishlists in Admin (https://forum.x-cart.com/showthread.php?t=5762)

Jerrad 05-20-2005 09:17 AM

I'm really looking forward to it!
Thanks in advance, Carrie :D :D :D

BCSE 05-30-2005 05:43 PM

Available on my site now for free for 3.5.x and 4.0.x! :)

http://www.bcsengineering.com/store/customer/product.php?productid=116&MMCF_xf_wish

Carrie

Bella Forma 06-15-2005 05:16 PM

I have one minor issue with this but I am not sure if it's just my customised site that's causing the problem, not complaining too much though as it's free :) :)

All my products have variants of size/colour. In the Wishlist Viewer it will show the item for every single size/colour combination rather than just for the size/colour combination that has been selected.

Just thought you might want to know.

BCSE 06-15-2005 05:44 PM

Thanks for the note. This was originally created for 3.3.5!! 8O which seems so long ago. ;)

I'll put it on our list to do some time.

Thanks for letting me know!

Carrie

fablot 10-31-2005 02:07 PM

Displaying All Users Wish Lists in Admin 4.0.16
Here is the same solution for X-Cart 4.0.16


Change to module ../skin1/admin/menu.tpl
Code:

Wish lists


New module ../skin1/admin/main/adminwish.tpl

Code:

This page allows you to view all user's wishlists.


 
{capture name=dialog}
{ include file="customer/main/navigation.tpl" }
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr class="TableHead">
<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 {cycle values=", class='TableSubHead'"}>
<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].amount_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

Code:

<?
require "./auth.php";
require $xcart_dir."/include/security.php";

$objects_per_page = $config["Appearance"]["users_per_page_admin"];

#
# Obtain wishlist from database
#

$wl_data = func_query("select $sql_tbl[customers].firstname, $sql_tbl[customers].lastname, $sql_tbl[products].productid, $sql_tbl[products].product,$sql_tbl[wishlist].amount, $sql_tbl[pricing].price, $sql_tbl[wishlist].amount_purchased from $sql_tbl[customers], $sql_tbl[wishlist], $sql_tbl[products], $sql_tbl[pricing] where $sql_tbl[wishlist].login=$sql_tbl[customers].login and $sql_tbl[wishlist].productid=$sql_tbl[products].productid and $sql_tbl[wishlist].productid=$sql_tbl[pricing].productid");

$total_items = count($wl_data);
$total_nav_pages = ceil($total_items/$objects_per_page)+1;

require $xcart_dir."/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?");

$location[] = array("All Wish-list");

$smarty->assign("location", $location);
$smarty->assign("wl_data",$wl_data);
$smarty->assign("main","adminwish");

@include $xcart_dir."/modules/gold_display.php";
func_display("admin/home.tpl",$smarty);
?>


Change to module ../skin1/single/home.tpl

Code:

{elseif $main eq "adminwish"}
{include file="admin/main/adminwish.tpl"}


salutes and good job

anandat 11-03-2005 09:06 PM

Hi fablot,
Thanks for posting the code :)
This code is perfectly working with version 4.0.12 also \:D/

Thanks.

mrkenzie 07-21-2006 12:56 PM

Has anyone got this to work in 4.1.x? I keep getting the following output for adminwish.php:

Quote:

assign("navigation_script","adminwish.php?"); $location[] = array("All Wish-list"); $smarty->assign("location", $location); $smarty->assign("wl_data",$wl_data); $smarty->assign("main","adminwish"); @include $xcart_dir."/modules/gold_display.php"; func_display("admin/home.tpl",$smarty); ?>

Never mind, I fixed it:

Needed to be:
Code:

<?php
in the beginning (just in case anyone else has the same problem).

Thanks.

jeanne 07-25-2006 04:13 PM

variants
 
Has anyone gotten this to work properly with variants?
I like the way that it works in 4.1.2, but I can't seem to wrap my head around how to get it to work with variants in 4.0.17

Jeanne
4.0.17 Gold


All times are GMT -8. The time now is 02:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.