Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Recent order history on a different page other than orders.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-15-2008, 07:51 PM
  Christopher728's Avatar 
Christopher728 Christopher728 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: CA
Posts: 46
 

Question Recent order history on a different page other than orders.php

Hi,
I'm creating centralized "My Account" page with a variety of information available to the customer and links to different aspects of managing their account. Similar to what's in the my account side bar, but more expansive.

What I'd like to know is how to get a list of recent orders to show up automatically on this page, for example, any orders placed in the last 90 days. Does anyone know how to set something like this up?

For the time being I have created a new help page (help.php?section=my_account), but I may end up creating a whole new Account section instead of using "help."

Secondarily, it might be cool to have a list of which newsletters they are subscribed to, with an option to unsubscribe and other newsletters to which they could subscribe. But this is less important to me than the order history.

Thanks in advance


This cart is v4.1.11
__________________
X-cart versions 4.1.11, 4.1.9 & 4.1.8
Reply With Quote
  #2  
Old 10-19-2008, 12:59 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Recent order history on a different page other than orders.php

Since no one else has answered you I figured I would give it a go. The main problem with creating a central account page is that different php files are referenced. For example, I created a your_account.tpl that I cloned from menu_cart.tpl that "appears" in the menu column by enclosing it in an "if" statement when a customer is logged in...
Code:
{if $login ne "" } {include file="customer/your-account.tpl" } {/if}
in skin1/customer/home.tpl. It has "Modify Profile" "Delete Profile" and "Order History" as choices the customer can make. Each of these is nothing more than a link to the php file that does what the customer wants to do, but it works well for what we need. Modify and delete both use register.php, and order history uses orders.php. Adding newsletter subscriptions would be even more complex.

I'm not sure how you would go about calling each of these php files on the same page but I see no reason it could not be done. I am assuming that you want your "My account" page to be in the central area of the store, correct? As a start, you could put each in its own dialog box calling dialog.tpl instead of menu.tpl.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:34 AM.

   

 
X-Cart forums © 2001-2020