
05-25-2008, 10:22 AM
|
|
|
|
 Advanced Member
|
|
Join Date: Mar 2007
Location: UK
Posts: 47
|
|
|
Re: Wishlist Quantity & No. of Orders on every page
Display No. of orders in order history
4.1.9 - not tested in other versions
1. Create a php file and call it orders_qty.php
Place it in (XCART DIR)/include/
PHP Code:
<?php if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }
$hebs_res = db_query("SELECT $sql_tbl[orders].orderid FROM $sql_tbl[orders] WHERE $sql_tbl[orders].login='$login'"); $order_qty = db_num_rows($hebs_res); db_free_result($hebs_res);
$smarty->assign("order_qty", $order_qty);
?>
2. Add the following code to (XCART DIR)/include/check_useraccount.php
PHP Code:
include $xcart_dir."/include/orders_qty.php";
After this (standard x-cart):
PHP Code:
} else { $is_merchant_password = 'Y'; } }
if (!empty($login) && $current_area == 'C' && func_is_anonymous($login)) { $smarty->assign("anonymous_login", ($anonymous_login = 1)); }
3. Add the following code to (XCART DIR)/skin1/authbox.tpl
HTML Code:
{if $order_qty gt 0}
<a href="orders.php?mode=search" class="VertMenuItems">{$lng.lbl_orders_history} ({$order_qty} orders)</a><br />
{/if}
after this (standard x-cart):
HTML Code:
{if $usertype eq "C"}
<tr>
<td class="VertMenuItems" colspan="2" align="right">
<br />
Done! 
__________________
Hebs
xcart GOLD v4.1.9 [unix]
Loads of Mods!
www.sub-laser.co.uk
3D Photography
|
|