Zen Follower
- Join Date:
- Apr 2009
- Location:
- London
- Posts:
- 127
- Plugin Contributions:
- 0
Post #21 by gamenano
So, to sum up, the reason for the "kg(s))" to mislocate is due to the html code not clean properly?
Started by gamenano on 25 Aug 2009, 1:58 AM · Views: 3,912
Zen Follower
So, to sum up, the reason for the "kg(s))" to mislocate is due to the html code not clean properly?
Zen Follower
What can I do in the invoice.pho to clean it a bit mroe? :blush:
Oba-san
The shipping line is messed up because there isn't enough room for it ...
Might be able to widen the column and fixing the ® symbol would help ...
You would have to look at the zen_clean_html function and see how the other characters are cleaned up and you can clean up the ® ... either with an R or strip it with a blank ...
I have not played with the PDF for awhile so I don't know all the changes needed without actually going through doing all the work and testing orders etc.
Adding a line such as:
while (strstr($clean_it, '®')) $clean_it = str_replace('®', 'R ', $clean_it);
But check for where else this function is used ... and make sure you don't make messies of something else ...
Or make your own function that you can use to clean miscellaneous things and add to it as needed ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Zen Follower
You been great help!!! I am really thankful. Going to have a rest as its already 5:42 in the morning. Will post the progress tomorrow. Thanks again Ajeh! :hug:
Zen Follower
Thanks Ajeh,
Are you sure is only because not enough room? Below, a cut image of a PDF I generated, it seems enough room for the "kg(s))" to fit in but still fall one line below.

Oba-san
I cannot be positive but try making the line just read:
Royal
and see what it looks like ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Zen Follower
I have access phpmyadmin and looking at order, found out that shipping_method is a varchar and only has 128 Char in length. The html code in that field hasn't even closed properly.
Royal Mail <b>special</b><span style="font-weight:normal">delivery</span><b>®</b> <span style="font-weight:normal">next day<
But the html code previously shown on the PDF file generated was complete, so where is that html code draw from?
Oba-san
Look in the orders_total table ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Zen Follower
Many thanks again. Proof you're right! Ajeh, (I wasn't surprised.) Now it can display the whole of the line, but it's stange that there are spacing before the comma sign. I had previously use La Poste, the french shipping mod. Shipping display fine without the spacing. Where could be wrong?
http://www.gamenano.com/images/PDFOC-ShippingMethodLineFault4.jpg
Oba-san
Without actually sitting down and going through your site, I cannot say for sure what the cause is ...
You are just going to have to try experimenting a bit or trying trimming things if there might be some sort of special characters affecting this ...
I am glad you are getting this working better now ... :smile:
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Zen Follower
Yes, Thank you very much for your help.
The core of the problem now is the shipping method text being too long. Since the html clean able to clean out the <>, is there any function out there able to clean (). If it does, I will get rid of that bunch of text within that bracket and make the whole shipping method easy to read.
Zen Follower
answer my own question. From the order total table.
VarChar(255) for the shipping method
Zen Follower
http://www.zen-cart.com/forum/showthread.php?t=148721
The answer to this one shown in the above thread. Thanks to Ajeh:clap:
Obaa-san
Moderator's note 3 previous threads dealing with the same problem have all been merged into this one.
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
Tell staff why this post should be reviewed.