Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

order status on account update page Rate Topic   - - - - -

 
  • ryan
  • Member
  • Members
  • Join Date: 05-Dec 05
  • 79 posts

Posted 09 December 2005 - 08:45 PM #1

I'd like to put the order status box on the account update page so customers can view their orders and account info on one page.

I've tried adding {include file="orders_pages/orders.tpl"} to profiles.tpl but when I view the actual page it show the order box, but reads "No Orders Found" however if you go to the actual target=orders page the orders show up.

Any help to get this to work?

Thanks,

Ryan

 
  • vladimir
  • CEO
  • Administrators
  • Join Date: 04-Jul 05
  • 9 posts

Posted 11 December 2005 - 07:47 AM #2

Hello Ryan,

You need to edit following PHP file:
[cscart_dir]/include/customer/profiles.php

find there:
require $common_dir.'profiles.php';

and paste following piece of code before it:
if (!empty($auth['user_id'])) {
	$smarty->assign('orders', fn_search_orders("$db_tables[orders].user_id='$auth[user_id]'", "$db_tables[orders].timestamp DESC"));
} elseif (!empty($auth['order_ids'])) {
	$smarty->assign('orders', fn_search_orders("$db_tables[orders].order_id IN (".implode(',', $auth['order_ids']).")", "$db_tables[orders].timestamp DESC"));
}


So, you should get the following as result:
if (!empty($auth['user_id'])) {
	$smarty->assign('orders', fn_search_orders("$db_tables[orders].user_id='$auth[user_id]'", "$db_tables[orders].timestamp DESC"));
} elseif (!empty($auth['order_ids'])) {
	$smarty->assign('orders', fn_search_orders("$db_tables[orders].order_id IN (".implode(',', $auth['order_ids']).")", "$db_tables[orders].timestamp DESC"));
}

require $common_dir.'profiles.php';

This will let you show all customer orders on the account update page.
--
Vladimir V. Kalynyak
CEO

 

Posted 29 March 2007 - 01:22 PM #3

When I installed 1.3.4 sp3 view orders problem was resolved.