Zen Cart Logo
Forums / General Questions / fax number on order page?

fax number on order page?

Views: 1,171

Results 1 to 8 of 8
5 Aug 2014, 5:03 PM
#1
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

fax number on order page?

Can someone tell me how to add the fax number that is supplied by customer to the admin order info page please...

at moment i have to go back and forth between customer info and order info to find this out and its really time wasting thanks

7 Aug 2014, 10:13 AM
#2
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: fax number on order page?

Which page are you talking about, is this the invoice you mean ?

9 Aug 2014, 8:25 AM
#3
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: fax number on order page?

orders.php

line 491

              <tr>                <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>                <td class="main"><?php echo $order->customer['telephone']; ?></td>              </tr>

i tried adding a new line under this and replaced 'telephone' with 'customer_fax' (as used in the customer details code) but no joy.

9 Aug 2014, 11:57 AM
#4
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: fax number on order page?

If you modified admin/orders.php to read

              <tr>
                <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>
                <td class="main"><?php echo $order->customer['telephone']; ?></td>
              </tr>
              <tr>
                <td class="main"><strong><?php echo ENTRY_FAX_NUMBER; ?></strong></td>
                <td class="main"><?php echo $order->customer['customers_fax']; ?></td>
              </tr>

then you will just get something like this on the orders page:

Telephone Number: 09-8765 4321
Fax Number: <BLANK>
E-Mail Address: [email protected]

with a <BLANK> field for the actual fax number simply because the fax number is not stored in the orders table.

So me thinks you either need to pull the fax number from the customers table or modify the ZC code in a way that the fax number is stored in the orders table when an order is created.

12 Aug 2014, 7:13 AM
#5
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: fax number on order page?

kitcorsa:

orders.php

line 491

          <tr>                <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>                <td class="main"><?php echo $order->customer['telephone']; ?></td>              </tr>
> 
> i tried adding a new line under this and replaced 'telephone' with 'customer_fax' (as used in the customer details code) but no joy.

customers fax isnt saved in the orders table, you could edit some zencart files to let it add this to the orders table but this would require edit of the database.

You could add some simple code in the invoice.php file which grabs the fax number based on customer id or email or something, which is a quick and dirty workaround for your problem. I use this method to show custom fields on my invoices.

Im still not clear where you want this fax number to appear ? is this on the invoice ? the packingslip ? or just on the order information page ? 

If you can explain for me where you want to show the fax number i can take a look into writing this for you, im not a expert in writing zencart modules but i can add custom code....

Mayb you can explain with a screenshot where you want the fax number to appear, if i have some free time this week i will code it for you.
18 Aug 2014, 12:39 PM
#6
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: fax number on order page?

on the order info page on the admin side,

this is so when i get an order, customers leave me there home number and mobile number (which is the fax section of the prebuilt zencart just with lable changed on display) so i and my delivery drivers can contact the customer. we then email this if to suppliers and drivers etc. having both customer number on the order info screen would save so much time.

18 Aug 2014, 12:55 PM
#7
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: fax number on order page?

frank18:

If you modified admin/orders.php to read

          <tr>
            <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>
            <td class="main"><?php echo $order->customer['telephone']; ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo ENTRY_FAX_NUMBER; ?></strong></td>
            <td class="main"><?php echo $order->customer['customers_fax']; ?></td>
          </tr>
> 
> then you will just get something like this on the orders page:
> 
> **Telephone Number: 09-8765 4321
> Fax Number:         <BLANK>
> E-Mail Address:     [email protected]**
> 
> with a **<BLANK>** field for the actual fax number simply because the fax number is not stored in the orders table.
> 
> So me thinks you either need to pull the fax number from the customers table or modify the ZC code in a way that the fax number is stored in the orders table when an order is created.

exactally what happens. how do i pull from the customers table??
18 Aug 2014, 12:56 PM
#8
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: fax number on order page?

id also like to add this to the invoices as well invoice.php