I am learning as I go and this is the first mod that I feel would be useful to others so here it is:
This mod should allow the customer to see how many items they have in their wishlist in the side menu:
Display No. of items in wishlist
4.1.9 - not tested in other versions
1. Create a php file and call it wishlist_qty.php
Place it in (XCART DIR)/modules/wishlist
PHP Code:
<?php
$hebs_res = db_query("SELECT $sql_tbl[wishlist].wishlistid FROM $sql_tbl[wishlist] WHERE $sql_tbl[wishlist].login='$login'");
$wishlist_qty = db_num_rows($hebs_res);
db_free_result($hebs_res);
$smarty->assign("wishlist_qty",$wishlist_qty);
?>
2. Add the following code to (XCART DIR)auth.php at the end before ?>
PHP Code:
if($active_modules["Wishlist"]) {
include $xcart_dir."/modules/Wishlist/wishlist_qty.php";
}
3. Add the following code to (XCART DIR)/skin1/authbox.tpl
HTML Code:
{if $active_modules.Wishlist eq "Y"}
<a href="cart.php?mode=wishlist" class="VertMenuItems">{$lng.lbl_wish_list} {if $wishlist_qty eq ""}(empty){/if}{if $wishlist_qty eq "1"}(1 item){/if}{if $wishlist_qty ne "" && $wishlist_qty ne "1"}({$wishlist_qty} items){/if}</a><br /><br />
{/if}
after this (standard x-cart):
HTML Code:
{if $usertype eq "C"}
<tr>
<td class="VertMenuItems" colspan="2" align="right">
<br />
Done!
![Smile](images/smilies/icon_smile.gif)