♥raiwa Posted May 29, 2018 Share Posted May 29, 2018 Hello Lee @LeeFoster, I just searched in all pdf invoice files and couldn't find the constant STORE_NAME_ADDRESS. It is neither a standard OsCommerce constant. Please post the lines where it is used in your file. Did you add it? Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
LeeFoster Posted May 29, 2018 Share Posted May 29, 2018 It's added as part of this contribution. Line 236 is this $pos_y += ((substr_count(STORE_NAME_ADDRESS, "\n")+1) * 4.4); Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted May 29, 2018 Share Posted May 29, 2018 I believe you have to use the apostrophes for the constant in a function: $pos_y += ((substr_count('STORE_NAME_ADDRESS', "\n")+1) * 4.4); and of course, check also if it is defined somewhere Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
LeeFoster Posted May 29, 2018 Share Posted May 29, 2018 10 minutes ago, raiwa said: I believe you have to use the apostrophes for the constant in a function: $pos_y += ((substr_count('STORE_NAME_ADDRESS', "\n")+1) * 4.4); and of course, check also if it is defined somewhere Apparently it is supposed to use the information from the store configuration but I can't see it defined anywhere to use it. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted May 29, 2018 Share Posted May 29, 2018 (edited) STORE_NAME_ADDRESS isn't defined in the standard configuration table. It is STORE_NAME and STORE_ADDRESS Edited May 29, 2018 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
LeeFoster Posted May 29, 2018 Share Posted May 29, 2018 Yeah I just realised the same. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted May 29, 2018 Share Posted May 29, 2018 Next step is to make it work via the admin console. Quote Link to comment Share on other sites More sharing options...
♥John W Posted May 30, 2018 Share Posted May 30, 2018 STORE_NAME_ADDRESS used to be used and was changed. I still have it in my configuration DB for my old PDF that I still use. raiwa 1 Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
♥John W Posted May 30, 2018 Share Posted May 30, 2018 You could just insert it into your DB if you want. INSERT INTO `configuration`( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function` ) VALUES( 'Store Address and Phone', 'STORE_NAME_ADDRESS', 'Put your store name and address here', 'This is the Store Name, Address and Phone used on printable documents and displayed online', 1, 18, '2005-06-29 15:52:28', '2003-07-17 10:29:22', NULL, 'tep_cfg_textarea(' ); Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
LeeFoster Posted May 31, 2018 Share Posted May 31, 2018 I managed to get around that and am now trying to make it work from the admin section via another add on however I am getting the below error now. Quote Fatal error: Uncaught Error: Call to a member function format() on string in C:\xampp\htdocs\oscomm\admin\pdfinvoice.php:56 Stack trace: #0 {main} thrown in C:\xampp\htdocs\oscomm\admin\pdfinvoice.php on line 56 Though I suspect this is more to do with me moving it to the admin section than either of the addons Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted May 31, 2018 Share Posted May 31, 2018 Never mind, I was right, it was some of the changes I'd made along with others I'd not taken into consideration and this is now working admin side. Quote Link to comment Share on other sites More sharing options...
♥SCH_001 Posted June 25, 2019 Share Posted June 25, 2019 @PaulMC Hi all I am similar problems to others with a blank screen after I moved the shop to it's home. Installed PDF Customer Invoice v1.6 2016/10/29 on frozen So it worked / works on test site when it is in the public_html dir but being move to public_html/store gives me a blank page even when full error writing is on in application top does not produce an error on the page still just blank.. debugger gives me the below but I have no idea what file is producing it.. My only guess is it's not happy with an entry in configure but everything else is working. Error is from https://www.supercheaphobbies.com.au/store/pdfinvoice.php?order_id=6828 Error loading this URI: Could not load the source for blob:https://www.supercheaphobbies.com.au/b3768795-5ed4-4fd6-a22b-afa7a9e4538c. [Exception... "Failed to open input source 'blob:https://www.supercheaphobbies.com.au/b3768795-5ed4-4fd6-a22b-afa7a9e4538c'" nsresult: "0x805303f4 (<unknown>)" location: "JS frame :: resource://devtools/shared/DevToolsUtils.js :: mainThreadFetch/< :: line 631" data: yes] Stack: mainThreadFetch/<@resource://devtools/shared/DevToolsUtils.js:631:15 mainThreadFetch@resource://devtools/shared/DevToolsUtils.js:512:10 _getSourceText@resource://devtools/server/actors/source.js:247:27 Line: 631, column: 0 Line 631 if pdfinvoice.php is $pos_y += $cref_shift_y+6; Quote Link to comment Share on other sites More sharing options...
♥SCH_001 Posted June 25, 2019 Share Posted June 25, 2019 Ok found the issue. It seems when using file zilla to transfer files it seems to like to screw up files big time In this case all the files in modules/fpdf folder Quote Link to comment Share on other sites More sharing options...
♥John W Posted June 25, 2019 Share Posted June 25, 2019 Some editors and such can add a BOM to the begining of files, which can screw things up. There's another thread where that happened to a certificate file. Quote I'm not really a dog. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 25, 2019 Share Posted June 25, 2019 I use FileZilla all the time and that shouldn't be a problem. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥SCH_001 Posted June 26, 2019 Share Posted June 26, 2019 Ok a new question in frozen line 251 in admin/order.php how do I change invoice.php to pdfinvoice.php as the pdfinvoice is in the roor dir not the admin dir I have not been able to work out how to make it work div style="text-align: right; padding-bottom: 15px;"><?php echo tep_draw_button(IMAGE_ORDERS_INVOICE, 'document', tep_href_link('invoice.php', 'oID=' . $_GET['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_ORDERS_PACKINGSLIP, 'document', tep_href_link('packingslip.php', 'oID=' . $_GET['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link('orders.php', tep_get_all_get_params(array('action')))); ?></div> As guessed I am trying to replace the invoice in admin with the pdf one Quote Link to comment Share on other sites More sharing options...
♥SCH_001 Posted June 29, 2019 Share Posted June 29, 2019 Hi all, am I the only one that wants PDF invoice in the admin customer area? Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted June 29, 2019 Share Posted June 29, 2019 Unforuntally PDF will not be much use on mobile devices as you would need to download it to view it. As far as I know your still not able to view pdf in mobile device browsers. Hence most people opt for html or plain text. Quote Link to comment Share on other sites More sharing options...
♥SCH_001 Posted June 29, 2019 Share Posted June 29, 2019 Hi @JcMagpie I have no idea why you have mentioned this as it has no bearing on my question I am seeking assistance in getting pdf invoice to work in the admin area in frozen line 251 in admin/order.php how do I change invoice.php to pdfinvoice.php as the pdfinvoice is in the root dir not the admin dir I have not been able to work out how to make it work. Even if I copy pdfinvoice.php to admin it still relies on other files div style="text-align: right; padding-bottom: 15px;"><?php echo tep_draw_button(IMAGE_ORDERS_INVOICE, 'document', tep_href_link('invoi Can anyone assist with how to code this correctly Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 29, 2019 Share Posted June 29, 2019 I don't use this but based on the line you quoted above, try changing.... tep_href_link('invoice.php', to tep_href_link('pdfinvoice.php', You could also try moving your pdfinvoice.php to the admin directory. I'm assuming there are no instructions with the add-on? Let us know what happens and maybe we can give a little more guidance. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted June 29, 2019 Share Posted June 29, 2019 3 hours ago, supercheaphobb said: Hi all, am I the only one that wants PDF invoice in the admin customer area? 😂 Sorry only saw that line did not read anything before. Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted June 29, 2019 Share Posted June 29, 2019 The answer to your question I think is in the original post for the add-on. "This contribution is based on PDF Invoice (http://www.oscommerce.com/community/contributions,3027) Apart from recoding PDF Invoice to work client side, " So the OP has recoded it to work client side! for admin side use the original add-on that this is based on which is codded for admin. You could if your feeling adventurous try combining the two? But either way I'm sure if you look at the original you will see what is needed to make it work admin side. Quote Link to comment Share on other sites More sharing options...
♥SCH_001 Posted July 6, 2019 Share Posted July 6, 2019 The original add-on looks horrid with layout etc so would like to get this this one working Ok I have had some time to look at this again and copied all the pdf_invoice related files up in to the correct areas in admin and are now getting this error Fatal error: Uncaught Error: Call to a member function format() on null in /home/xxxx/public_html/store/admin/pdfinvoice.php:53 Stack trace: #0 {main} thrown in /home/xxxxx/public_html/store/admin/pdfinvoice.php on line 53 Line 52 is the first line under the comment line // Find Currency Symbol $currency_sym = $currencies->format($order->info['currency']); $currency_sym = preg_replace( '([0-9Â.]*)', '', $currency_sym); $prod_line_sym = ''; if (DISPLAY_PROD_LINE_CURRENCY == 'true'){$prod_line_sym = $currency_sym . ' ';} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.