X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Recent order history on a different page other than orders.php (https://forum.x-cart.com/showthread.php?t=43020)

Christopher728 10-15-2008 07:51 PM

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

JWait 10-19-2008 12:59 PM

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.


All times are GMT -8. The time now is 04:48 PM.

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