Zen Cart Logo
Forums / General Questions / Attributes not showing on all invoices

Attributes not showing on all invoices

Views: 1,343

Results 1 to 18 of 18
1 Jun 2014, 4:44 PM
#1
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Attributes not showing on all invoices

This problem has been there from the beginning (03/01/2014).

The problem is not all attributes are showing up on all invoices.

If shipping is free, all attributes DO display on emails, invoices, and packing slips.

If shipping is not free, attributes DO show up on emails only, but all attributes DO NOT display on invoices and packing slips. Only some attributes display on the invoices and packing slips, but we need ALL attributes to display on all invoices!

I believe the only missing attributes are text files.

Any suggestions please?

OUR INFORMATION:
Database: MySQL 5.0.96
PHP Version: 5.2.17

We are using Version 1.5.1. Our site has not been upgraded from a previous version. One plugin installed for county taxes. Also we have integrated with FedEx, Authorize.net, Paypal, and USPS.

https://www.cookiegramsofga.com

Thank you.

3 Jun 2014, 2:12 PM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

The order I placed displayed in the cart and the order confirmation email correctly.

I assume it displays correctly in admin yes?

3 Jun 2014, 2:22 PM
#3
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

twitchtoo:

The order I placed displayed in the cart and the order confirmation email correctly.

I assume it displays correctly in admin yes?

My second order included shipping and displayed correctly on the client side, all the attributes, shipping and text boxes. Is this the case in admin?

3 Jun 2014, 4:07 PM
#4
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

Darn I thought I had isolated the problem to just orders with shipping. Your 2 orders appear correct.

However the one just before your order shows this:

1 x Dr. Bag Rx: Enjoy Crate Box

  • How Many Cookies?: 3 Dozen Cookies ($30.80)
  • Choose up to 4 kinds of Cookies:: Chocolate Chip
  • Choose up to 4 kinds of Cookies:: Peanut Butter
  • Choose up to 4 kinds of Cookies:: Sugar Cinnamon
  • Choose up to 4 kinds of Cookies:: White Chocolate Macadamia
  • Delivery Date or Pickup Date:
  • Recipient's (or Contact's: 404-XXX-XXXX
  • COOKIEGRAM®
    CARD MESSAGE<: Get Well Soon Mary! Praying for a Speedy Recovery!
    Love You, Johnna and Carl Simpson
    ####################################################################################################_

The delivery/pick up date is mandatory. The date that the customer fills in shows up on our emailed copy of the order ... but it does not show up on the invoice or packing slip (see above -- as blank) in admin.

########################################################################################################

This is what shows up on the order that is emailed:
Products

1 x Dr. Bag Rx: Enjoy Crate Box = $30.80
How Many Cookies? 3 Dozen Cookies
Choose up to 4 kinds of Cookies: Chocolate Chip
Choose up to 4 kinds of Cookies: Peanut Butter
Choose up to 4 kinds of Cookies: Sugar Cinnamon
Choose up to 4 kinds of Cookies: White Chocolate Macadamia
Delivery Date or Pickup Date:(Example: Monday 4/28/14) Wednesday 6/4/14
Recipient's (or Contact's) Phone #:(Example: xxx-xxx-xxxx) 404-XXX-XXXX
COOKIEGRAM®CARD MESSAGE& SIGNATURE: Get Well Soon Mary! Praying for a
Speedy Recovery!
Love You, Johnna and Carl Simpson

3 Jun 2014, 4:16 PM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

That would mean the field is not being loaded, then displayed on the admin-> invoice.php, same for the packing slip.

Who custom coded all the extra fields? They missed the output code on those two pages.

(The date can be converted to a dropdown calendar with some java... once you get this field data fixed.)

3 Jun 2014, 4:16 PM
#6
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

Sorry for those frownie faces- they were just parentheses in the script but turned into frownies in this post above. LOL

3 Jun 2014, 4:18 PM
#7
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

I added all those extra fields myself through attributes in admin. What is the output code and can I fix that myself in the php part?

3 Jun 2014, 4:18 PM
#8
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

puddlesofpaint:

Sorry for those frownie faces- they were just parentheses in the script but turned into frownies in this post above. LOL

Squirrel! ;)

3 Jun 2014, 4:34 PM
#9
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

That's classified php code... but I think if you had some coffee, time on a sunny afternoon and a charitable donation to some guy named Twitch he would ask you to:

  • make sure the new fields are being recorded to the database in the order table or table of your choice (it's likely considering I received an email with the data in it)

  • open admin/invoice.php look to see that the field data is being loaded with a sql query then output to html like this:

<?php // bof Twitch Delivery Information ?>
<table id="deliveryInformation">
<?php     $orders_history = $db->Execute("select orders_status_id, date_added, twi_delivery_date, twi_delivery_time, twi_delivery_phone, twi_delivery_card_message
                                    from " . TABLE_ORDERS_STATUS_HISTORY . "
                                    where orders_id = '" . zen_db_input($oID) . "'
                                    order by date_added");
                                    ?>
        <tr>
           <td class="main"><strong><?php echo 'Delivery Information: '; ?></strong></td>
        </tr>
        <tr>
           <td class="main"><?php echo 'Order to be delivered on: '; ?></td>
           <td class="deliveryText"><?php echo $orders_history->fields['twi_delivery_date']; ?></td>
        </tr>
        <tr>
           <td class="main"><?php echo 'Preferred delivery time: '; ?></td>
           <td class="deliveryText"><?php echo $orders_history->fields['twi_delivery_time']; ?></td>
        </tr>
        <tr>
           <td class="main"><?php echo 'Recipient\'s phone number: '; ?></td>
           <td class="deliveryText"><?php echo $orders_history->fields['twi_delivery_phone']; ?></td>
        </tr>
        <tr>
           <td class="main"><?php echo 'Flower card message: '; ?></td>
           <td class="deliveryText"><?php echo $orders_history->fields['twi_delivery_card_message']; ?></td>
        </tr>
</table>
<?php // eof Twitch Delivery Information ?>

In this example the delivery date, time phone and card message are pulled from the db table TABLE_ORDERS_STATUS_HISTORY and spit out on the admin invoice page.

Do the same for the packing slip once you get the invoice working.

Ask more questions cause occasionally Twitch will answer them in code.

3 Jun 2014, 5:06 PM
#10
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

twitchtoo:

That's classified php code... but I think if you had some coffee, time on a sunny afternoon and a charitable donation to some guy named Twitch............

............Ask more questions cause occasionally Twitch will answer them in code.

Thanks for your prompt replies! I thought you were already talking in code... you mean it gets worse if I ask more questions? Man, I'm going to need 3 cups of coffee!!!!!!!!!

By the way I have to scoot out to an appointment at 2ish but will return at supper time (EST) to give this a whirl. Will you please check back with me later to see what I've messed up by then?

Okay so... I don't see the whole table thing in my invoice.php that you show above, so I suppose I need to add that whole thing? Here is what I have in that same area:

<?php $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . zen_db_input($oID) . "' and customer_notified >= 0 order by date_added"); if ($orders_history->RecordCount() > 0) { $count_comments=0; while (!$orders_history->EOF) { $count_comments++; echo ' <tr>' . "\n" . ' <td class="smallText" align="center" valign="top">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n"; echo ' <td class="smallText" valign="top">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n"; echo ' <td class="smallText" valign="top">' . ($orders_history->fields['comments'] == '' ? TEXT_NONE : nl2br(zen_db_output($orders_history->fields['comments']))) . ' </td>' . "\n" . ' </tr>' . "\n"; $orders_history->MoveNext(); if (ORDER_COMMENTS_INVOICE == 1 && $count_comments >= 1) { break; } } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?>
    </table></td>
  </tr>
<?php
3 Jun 2014, 5:12 PM
#11
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

What's the name of the **table **and **field **in the DB that's storing the text field that's not showing?

From my example you would see twi_delivery_date in the db table orders_status_history with a date actually in the field.

Without data there's no way to see it working regardless of the code.

4 Jun 2014, 2:23 AM
#12
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

twitchtoo:

What's the name of the **table **and **field **in the DB that's storing the text field that's not showing?

From my example you would see twi_delivery_date in the db table orders_status_history with a date actually in the field.

Without data there's no way to see it working regardless of the code.

I am pretty lost. I only added the attributes from the admin area and have not edited the invoice.php file - at least not that I remember ever doing. So, I am a little confused as to the 'why' behind needing to edit that file to make it show what should already show by default. I don't really understand the php files so I don't mess with them unless specifically told what to do and where to put what.

Would it help you see the problem if I display the entire invoice.php file from our shop? I don't see a table name in that file.

I appreciate your patience!!

4 Jun 2014, 3:53 AM
#13
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

Likely better to see the site to trace the reason everyday attributes are hiding. The attributes loop is pretty simple but I have found it doesn't always publish details it should.

If you'd like to email me admin and ftp access I can look around and get back to you :)

4 Jun 2014, 4:11 AM
#14
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

Sent you a PM. Thanks!

4 Jun 2014, 2:29 PM
#15
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

Thanks! I'm on it, give me some time to research it and get back to you :)

9 Jun 2014, 3:17 AM
#16
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

So, there's a few problems.

  • the config file reads charset - latin 1, the db is running utf8_general_ci

- there's html in your attribute options names/values - including page formatting and text formatting - creating havoc anywhere the data is being reloaded/displayed

  • some but not all of the related fields have had their character limits increased - this causes two problems - the character limits exceed the allowed number for the type and any field that doesn't match the field size truncates the data or returns false.

... and today it seems the site is down due to a changed database password that was not updated in both of your configure files.

9 Jun 2014, 2:48 PM
#17
puddlesofpaint avatar

puddlesofpaint

New Zenner

Join Date:
Feb 2014
Location:
Georgia
Posts:
11
Plugin Contributions:
0

Re: Attributes not showing on all invoices

twitchtoo:

... and today it seems the site is down due to a changed database password that was not updated in both of your configure files.

Okay thanks! So first things first... I did change the password on the db because I had it auto saved and did not know it -- so when you needed it, I changed it to something new so you could have access. I didn't realize I had to change it elsewhere. Can you point me in the right direction please?

9 Jun 2014, 3:09 PM
#18
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Attributes not showing on all invoices

puddlesofpaint:

Okay thanks! So first things first... I did change the password on the db because I had it auto saved and did not know it -- so when you needed it, I changed it to something new so you could have access. I didn't realize I had to change it elsewhere. Can you point me in the right direction please?

Check your PM, your site is up and running :)