Zen Cart Logo
Forums / General Questions / Add tracking link to My Account table

Add tracking link to My Account table

Views: 1,656

Results 1 to 12 of 12
6 Jul 2012, 11:54 PM
#1
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Add tracking link to My Account table

Hello,

I'm on zen-cart 1.5.0 and I want to give a tracking link to my customers so they can check the status from the carrier. I've added a field named 'tracking_code' to the "orders" table on the database and I update that field with the tracking code when I mark the order as sended. The problem is when I try to show that link with the code on "My account" page, I've modified the query() function on /includes/classes/order.php to retrieve the shipping code and I added that field to the "info" array, but it does not work. When I make an echo $orders['shipping_code'] on the tpl_account_default.php it does not show any information. I've tried several ways but nothing worked for me.

Any ideas, please? Hopeless I've think to make the sql query on the tpl file, but I do understant that is not the best way.

Greetings

7 Jul 2012, 12:03 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,771
Plugin Contributions:
9

Re: Add tracking link to My Account table

Try clicking on Plugins at the top of the page and searching for tracking. Couple of mods might do what you want.

7 Jul 2012, 10:55 AM
#3
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Re: Add tracking link to My Account table

Thank you for your help, but I don't want to install more plugins. My requeriment is very simple: I only need to show a tracking button on the order history table with my url pattern that is always the same changing the order reference. I actually make the record on the database across the admin/order.php page and the last thing I need to be ready is getting that record with across the function that shows the order history of the customer.

Any idea, please? Anybody knows what function retrieves the order history for the customer?

Thank you

7 Jul 2012, 11:02 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Add tracking link to My Account table

You are trying to build a space shuttle, when a bi-plane will do.

When you update the status of their order, just type the tracking code into the NOTES field of the order status updater and tell your client to visit the URL of the shipper's tracking code engine. Then make sure they are informed of status changes (via email). The data entered into NOTES is stored in their order history.

7 Jul 2012, 11:15 AM
#5
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Re: Add tracking link to My Account table

schoolboy:

You are trying to build a space shuttle, when a bi-plane will do.

When you update the status of their order, just type the tracking code into the NOTES field of the order status updater and tell your client to visit the URL of the shipper's tracking code engine. Then make sure they are informed of status changes (via email). The data entered into NOTES is stored in their order history.

Thank you, but the url tracking from my carrier needs to be called throw a post form, so I can't take that way. I could write the tracking code on the comments field and mount the url on the order history page, but that is not the better solution.

Really no one knows what function use the order history page to retrieve the orders?

7 Jul 2012, 11:21 AM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Add tracking link to My Account table

What is the URL to your shipper's tracking code page? (on THEIR website?)

7 Jul 2012, 11:28 AM
#7
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Re: Add tracking link to My Account table

schoolboy:

What is the URL to your shipper's tracking code page? (on THEIR website?)

http://www.nacex.es/seguimientoFormulario.do and I need to send via post the fields referencia (tracking reference number), agencia_cliente (the number of my agency) and codigo_cliente (my customer number)

7 Jul 2012, 11:55 AM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Add tracking link to My Account table

Go clip their FORM HTML, along with action url's and full pats to all their JS that the form requires.

Make the Agency and Client fields HIDDEN, and hardcode your agency/client code into the HTML

Put the HTML into an ezpage, and all the customer has to do is fill in their REFERENCE number - agency code and client code fields are already populated and hidden.

Tell customer his reference code in the order status update.

7 Jul 2012, 12:05 PM
#9
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Re: Add tracking link to My Account table

schoolboy:

Go clip their FORM HTML, along with action url's and full pats to all their JS that the form requires.

Make the Agency and Client fields HIDDEN, and hardcode your agency/client code into the HTML

Put the HTML into an ezpage, and all the customer has to do is fill in their REFERENCE number - agency code and client code fields are already populated and hidden.

Tell customer his reference code in the order status update.

Thanks schoolboy, I appreciate much your help but I still think that is much more easy and good looking to make a record into the database and show a tracking link for each order into the history order's table. I continue looking for the function that retrieves the customer order history

7 Jul 2012, 12:15 PM
#10
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Add tracking link to My Account table

Start by looking at:

\includes*modules*\pages\account_history\header_php.php

This module header sets the dbase calls for the subsequent page - rendered through the associated template files

I do not know what template files are involved, but ones with "account" (EG: tpl_account_history_info_default.php) may be relevant.

maybe also: \includes*modules*\pages\account_history_info\header_php.php

7 Jul 2012, 12:35 PM
#11
jofera avatar

jofera

New Zenner

Join Date:
Mar 2009
Posts:
25
Plugin Contributions:
0

Re: Add tracking link to My Account table

schoolboy:

Start by looking at:

\includes*modules*\pages\account_history\header_php.php

This module header sets the dbase calls for the subsequent page - rendered through the associated template files

I do not know what template files are involved, but ones with "account" (EG: tpl_account_history_info_default.php) may be relevant.

maybe also: \includes*modules*\pages\account_history_info\header_php.php

¡¡Thank you very much!! I got it editing the /includes/modules/pages/account/header_php.php $orders_query to also retrieve the tracking field. Thanks for the clue, I had been trying since yesterday :smile:

3 Mar 2017, 6:49 AM
#12
yakub16 avatar

yakub16

New Zenner

Join Date:
Feb 2017
Location:
Depok
Posts:
1
Plugin Contributions:
0

Re: Add tracking link to My Account table

This thread is the answer of my question so far. thanks for the information.
plese check this site https://goo.gl/plOr6p