Jump to content
chris23

[CONTRIBUTION] PDF Customer Invoice

Recommended Posts

Hi Chris!

one more problem when i put this in admin/languages/svenska.php and english.php

define('IMAGE_ORDERS_PDF_INVOICE','Generate PDF Invoice');

 

This happens when i look in admin

Parse error: syntax error, unexpected T_STRING in /usr/www-root/kunder/xxxxx/xxxxx/xxxxxx/www.xxxx.com/admin/includes/languages/svenska.php on line 345

 

this is line 345 in that file:

define('JS_PERSONNUMMER', ''personnr' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

 

this is the admin/languages/svenska.php

 

<?php
// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat6.0 I used 'en_US'
// on FreeBSD 4.0 I use 'en_US.ISO_8859-1'
// this may not work under win32 environments..
setlocale(LC_TIME, 'en_US.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// Return date in raw format
// $date should be in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
function tep_date_raw($date, $reverse = false) {
 if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
 } else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
 }
}

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="sv"');

// charset for web pages and emails
define('CHARSET', 'iso-8859-1');

// page title
define('TITLE', STORE_NAME);

// header text in includes/header.php
define('HEADER_TITLE_TOP', 'Administration');
define('HEADER_TITLE_SUPPORT_SITE', 'Support');
define('HEADER_TITLE_ONLINE_CATALOG', 'Onlinekatalog');
define('HEADER_TITLE_ADMINISTRATION', 'Administration');

// text for gender
define('MALE', 'Man');
define('FEMALE', 'Kvinna');

// text for date of birth example
define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

// configuration box text in includes/boxes/configuration.php
define('BOX_HEADING_CONFIGURATION', 'Konfiguration');
define('BOX_CONFIGURATION_MYSTORE', 'Min webshop');
define('BOX_CONFIGURATION_LOGGING', 'Loggning');
define('BOX_CONFIGURATION_CACHE', 'Cache');

// modules box text in includes/boxes/modules.php
define('BOX_HEADING_MODULES', 'Moduler');
define('BOX_MODULES_PAYMENT', 'Betalning');
define('BOX_MODULES_SHIPPING', 'Frakt');
define('BOX_MODULES_ORDER_TOTAL', 'Ordertotal');

// categories box text in includes/boxes/catalog.php
define('BOX_HEADING_CATALOG', 'Produktkatalog');
define('BOX_CATALOG_CATEGORIES_PRODUCTS', 'Kategorier/Produkter');
define('BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES', 'Produktattribut');
define('BOX_CATALOG_MANUFACTURERS', 'Tillverkare');
define('BOX_CATALOG_REVIEWS', 'Recensioner');
define('BOX_CATALOG_SPECIALS', 'Kampanjer');
define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Förväntas finnas i lager');

// customers box text in includes/boxes/customers.php
define('BOX_HEADING_CUSTOMERS', 'Kunder');
define('BOX_CUSTOMERS_CUSTOMERS', 'Kunder');
define('BOX_CUSTOMERS_ORDERS', 'Ordrar');

// taxes box text in includes/boxes/taxes.php
define('BOX_HEADING_LOCATION_AND_TAXES', 'Platser / Skatter');
define('BOX_TAXES_COUNTRIES', 'Länder');
define('BOX_TAXES_ZONES', 'Zoner');
define('BOX_TAXES_GEO_ZONES', 'Skattezoner');
define('BOX_TAXES_TAX_CLASSES', 'Skatteklasser');
define('BOX_TAXES_TAX_RATES', 'Skattekurser');

// reports box text in includes/boxes/reports.php
define('BOX_HEADING_REPORTS', 'Rapporter');
define('BOX_REPORTS_PRODUCTS_VIEWED', 'Visade produkter');
define('BOX_REPORTS_PRODUCTS_PURCHASED', 'Beställda produkter');
define('BOX_REPORTS_ORDERS_TOTAL', 'Kunders ordertotal');
define('BOX_REPORTS_CREDITS', 'Kundkredit');
define('BOX_REPORTS_CUSTOMERS_ORDERS', 'Kundstatistik');

define('BOX_HEADING_FAQ', 'FAQ System');
define('BOX_FAQ_MANAGER', 'FAQ Manager');
define('BOX_FAQ_VIEW', 'FAQ Visa');
define('BOX_FAQ_VIEW_ALL', 'FAQ Visa alla');

// tools text in includes/boxes/tools.php
define('BOX_HEADING_TOOLS', 'Verktyg');
define('BOX_TOOLS_BACKUP', 'Säkerhetskopiera databas');
define('BOX_TOOLS_BANNER_MANAGER', 'Bannerhanteraren');
define('BOX_TOOLS_CACHE', 'Cachekontroll');
define('BOX_TOOLS_DEFINE_LANGUAGE', 'Definera språk');
define('BOX_TOOLS_FILE_MANAGER', 'Filhanteraren');
define('BOX_TOOLS_MAIL', 'Skicka e-post');
define('BOX_TOOLS_NEWSLETTER_MANAGER', 'Nyhetsbrev');
define('BOX_TOOLS_SERVER_INFO', 'Serverinfo');
define('BOX_TOOLS_WHOS_ONLINE', 'Vem är online?');

// localizaion box text in includes/boxes/localization.php
define('BOX_HEADING_LOCALIZATION', 'Plats');
define('BOX_LOCALIZATION_CURRENCIES', 'Valutor');
define('BOX_LOCALIZATION_LANGUAGES', 'Språk');
define('BOX_LOCALIZATION_ORDERS_STATUS', 'Orderstatus');

define('BOX_HEADING_SCRIPTS', 'Script');

// javascript messages
define('JS_ERROR', 'Det har blivit fel när ditt formulär skulle uppdateras!nGör följande ändringar:nn');

define('JS_OPTIONS_VALUE_PRICE', '* Det nya produktattributet kräver ett prisvärden');
define('JS_OPTIONS_VALUE_PRICE_PREFIX', '* Det nya produktattributet behöver ett prisprefixn');

define('JS_PRODUCTS_NAME', '* Den nya produkten kräver ett namnn');
define('JS_PRODUCTS_DESCRIPTION', '* Den nya produkten kräver en beskrivningn');
define('JS_PRODUCTS_PRICE', '* Den nya produkten kräver ett prisvärden');
define('JS_PRODUCTS_WEIGHT', '* Den nya produkten kräver ett viktvärden');
define('JS_PRODUCTS_QUANTITY', '* Den nya produkten kräver ett antal-värden');
define('JS_PRODUCTS_MODEL', '* Den nya produkten kräver ett modellvärden');
define('JS_PRODUCTS_IMAGE', '* Den nya produkten kräver ett bildvärden');

define('JS_SPECIALS_PRODUCTS_PRICE', '* Ett nytt pris för denna produkt behöver sättasn');

define('JS_GENDER', '* Välj kön.n');
define('JS_FIRST_NAME', '* Förnamnet måste ha minst ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' bokstäver.n');
define('JS_LAST_NAME', '* Efternamnet måste ha minst ' . ENTRY_LAST_NAME_MIN_LENGTH . ' bokstäver.n');
define('JS_DOB', '* Födelsedatum måste vara i formatet: xx/xx/xxxx (månad/datum/år).n');
define('JS_EMAIL_ADDRESS', '* E-postadressen måste ha minst ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' bokstäver.n');
define('JS_ADDRESS', '* Adressen måste ha minst ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' bokstäver.n');
define('JS_POST_CODE', '* Postnummer måste ha minst ' . ENTRY_POSTCODE_MIN_LENGTH . ' bokstäver.n');
define('JS_CITY', '* Staden måste ha minst ' . ENTRY_CITY_MIN_LENGTH . ' bokstäver.n');
define('JS_STATE', '* Stat-val måste väljas.n');
define('JS_STATE_SELECT', '-- Välj ovan --');
define('JS_ZONE', '* Stat måste väljas från listan för det här landet.');
define('JS_COUNTRY', '* Land måste väljas.n');
define('JS_TELEPHONE', '* Telefonnummer måste ha minst ' . ENTRY_TELEPHONE_MIN_LENGTH . ' bokstäver.n');
define('JS_PASSWORD', '* Lösenord och godkännande måste matcha och ha minst ' . ENTRY_PASSWORD_MIN_LENGTH . ' bokstäver.n');

define('JS_ORDER_DOES_NOT_EXIST', 'Ordernummer %s finns ej!');

define('CATEGORY_PERSONAL', 'Privat');
define('CATEGORY_ADDRESS', 'Adress');
define('CATEGORY_CONTACT', 'Kontakt');
define('CATEGORY_COMPANY', 'Företag');
define('CATEGORY_OPTIONS', 'Egenskaper');

define('ENTRY_GENDER', 'Kön:');
define('ENTRY_GENDER_ERROR', ' <span class="errorText">måste anges</span>');
define('ENTRY_FIRST_NAME', 'Förnamn:');
define('ENTRY_FIRST_NAME_ERROR', ' <span class="errorText">minst ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_LAST_NAME', 'Efternamn:');
define('ENTRY_LAST_NAME_ERROR', ' <span class="errorText">minst ' . ENTRY_LAST_NAME_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_DATE_OF_BIRTH', 'födelsedatum:');
define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(exempel. 05/21/1970)</span>');
define('ENTRY_EMAIL_ADDRESS', 'E-postadress:');
define('ENTRY_EMAIL_ADDRESS_ERROR', ' <span class="errorText">minst ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', ' <span class="errorText">E-postadressen verkar inte vara korrekt!</span>');
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', ' <span class="errorText">Den e-postadress du angivit finns redan!</span>');
define('ENTRY_COMPANY', 'Företagsnamn:');
define('ENTRY_COMPANY_ERROR', '');
define('ENTRY_STREET_ADDRESS', 'Adress:');
define('ENTRY_STREET_ADDRESS_ERROR', ' <span class="errorText">minst ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_SUBURB', 'Ort:');
define('ENTRY_SUBURB_ERROR', '');
define('ENTRY_POST_CODE', 'Postnummer:');
define('ENTRY_POST_CODE_ERROR', ' <span class="errorText">minst ' . ENTRY_POSTCODE_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_CITY', 'Stad:');
define('ENTRY_CITY_ERROR', ' <span class="errorText">minst ' . ENTRY_CITY_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_STATE', 'Stat:');
define('ENTRY_STATE_ERROR', ' <span class="errorText">krävs</span>');
define('ENTRY_COUNTRY', 'Land:');
define('ENTRY_COUNTRY_ERROR', '');
define('ENTRY_TELEPHONE_NUMBER', 'Telefonnummer:');
define('ENTRY_TELEPHONE_NUMBER_ERROR', ' <span class="errorText">minst ' . ENTRY_TELEPHONE_MIN_LENGTH . ' bokstäver</span>');
define('ENTRY_FAX_NUMBER', 'Faxnummer:');
define('ENTRY_FAX_NUMBER_ERROR', '');
define('ENTRY_NEWSLETTER', 'Nyhetsbrev:');
define('ENTRY_NEWSLETTER_YES', 'Prenumererar');
define('ENTRY_NEWSLETTER_NO', 'Avslutat prenumeration');
define('ENTRY_NEWSLETTER_ERROR', '');

// images
define('IMAGE_ANI_SEND_EMAIL', 'Skicka e-post');
define('IMAGE_BACK', 'Bakåt');
define('IMAGE_BACKUP', 'Säkerhetskopiera');
define('IMAGE_CANCEL', 'Avbryt');
define('IMAGE_CONFIRM', 'Gordkänn');
define('IMAGE_COPY', 'Kopiera');
define('IMAGE_COPY_TO', 'Kopiera till');
define('IMAGE_DETAILS', 'Detaljer');
define('IMAGE_DELETE', 'Ta bort');
define('IMAGE_EDIT', 'Ändra');
define('IMAGE_EMAIL', 'E-post');
define('IMAGE_FILE_MANAGER', 'Filhanteraren');
define('IMAGE_ICON_STATUS_GREEN', 'Aktiv');
define('IMAGE_ICON_STATUS_GREEN_LIGHT', 'Välj aktiv');
define('IMAGE_ICON_STATUS_RED', 'Inaktiv');
define('IMAGE_ICON_STATUS_RED_LIGHT', 'Välj inaktiv');
define('IMAGE_ICON_INFO', 'Info');
define('IMAGE_INSERT', 'Sätt in');
define('IMAGE_LOCK', 'Lås');
define('IMAGE_MODULE_INSTALL', 'Installera modul');
define('IMAGE_MODULE_REMOVE', 'Ta bort modul');
define('IMAGE_MOVE', 'Flytta');
define('IMAGE_NEW_BANNER', 'Ny banner');
define('IMAGE_NEW_CATEGORY', 'Ny kategori');
define('IMAGE_NEW_COUNTRY', 'Nytt land');
define('IMAGE_NEW_CURRENCY', 'Ny valuta');
define('IMAGE_NEW_FILE', 'Ny fil');
define('IMAGE_NEW_FOLDER', 'Ny mapp');
define('IMAGE_NEW_LANGUAGE', 'Nytt språk');
define('IMAGE_NEW_NEWSLETTER', 'Nytt nyhetsbrev');
define('IMAGE_NEW_PRODUCT', 'Ny produkt');
define('IMAGE_NEW_TAX_CLASS', 'Ny skatteklass');
define('IMAGE_NEW_TAX_RATE', 'Ny skattekurs');
define('IMAGE_NEW_TAX_ZONE', 'Ny skattezon');
define('IMAGE_NEW_ZONE', 'Ny zon');
define('IMAGE_ORDERS', 'Ordrar');
define('IMAGE_ORDERS_INVOICE', 'Faktura');
define('IMAGE_ORDERS_PACKINGSLIP', 'Följesedel');
define('IMAGE_ORDERS_PDF_INVOICE', 'Generate PDF Invoice');
define('IMAGE_PREVIEW', 'Förhandsgranska');
define('IMAGE_RESTORE', 'Återställ');
define('IMAGE_RESET', 'Återställ');
define('IMAGE_SAVE', 'Spara');
define('IMAGE_SEARCH', 'Sök');
define('IMAGE_SELECT', 'Välj');
define('IMAGE_SEND', 'Skicka');
define('IMAGE_SEND_EMAIL', 'Skicka e-post');
define('IMAGE_UNLOCK', 'Lås upp');
define('IMAGE_UPDATE', 'Uppdatera');
define('IMAGE_UPDATE_CURRENCIES', 'Uppdatera valutakurs');
define('IMAGE_UPLOAD', 'Ladda upp');

define('ICON_CROSS', 'False');
define('ICON_CURRENT_FOLDER', 'Aktuell mapp');
define('ICON_DELETE', 'Ta bort');
define('ICON_ERROR', 'Fel');
define('ICON_FILE', 'Fil');
define('ICON_FILE_DOWNLOAD', 'Ladda hem');
define('ICON_FOLDER', 'Mapp');
define('ICON_LOCKED', 'Låst');
define('ICON_PREVIOUS_LEVEL', 'Föregående nivå');
define('ICON_PREVIEW', 'Förhandsgranska');
define('ICON_STATISTICS', 'Statistik');
define('ICON_SUCCESS', 'Ok');
define('ICON_TICK', 'True');
define('ICON_UNLOCKED', 'Upplåst');
define('ICON_WARNING', 'Varning');

// constants for use in tep_prev_next_display function
define('TEXT_RESULT_PAGE', 'Sida %s av %d');
define('TEXT_DISPLAY_NUMBER_OF_BANNERS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> banners)');
define('TEXT_DISPLAY_NUMBER_OF_COUNTRIES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> länder)');
define('TEXT_DISPLAY_NUMBER_OF_CUSTOMERS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> kunder)');
define('TEXT_DISPLAY_NUMBER_OF_CURRENCIES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> valutor)');
define('TEXT_DISPLAY_NUMBER_OF_LANGUAGES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> språk)');
define('TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> tillverkare)');
define('TEXT_DISPLAY_NUMBER_OF_NEWSLETTERS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> nyhetsbrev)');
define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> ordrar)');
define('TEXT_DISPLAY_NUMBER_OF_ORDERS_STATUS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> orderstatus)');
define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> produkter)');
define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_EXPECTED', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> inkommande produkter)');
define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> produktrecensioner)');
define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> produkter i special)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_CLASSES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> skatteklasser)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_ZONES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> skattezoner)');
define('TEXT_DISPLAY_NUMBER_OF_TAX_RATES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> skattekurser)');
define('TEXT_DISPLAY_NUMBER_OF_ZONES', 'Visar <b>%d</b> till <b>%d</b> (av <b>%d</b> zoner)');

define('PREVNEXT_BUTTON_PREV', '<<');
define('PREVNEXT_BUTTON_NEXT', '>>');

define('TEXT_DEFAULT', 'default');
define('TEXT_SET_DEFAULT', 'Välj som default');
define('TEXT_FIELD_REQUIRED', ' <span class="fieldRequired">* Krävs</span>');

define('ERROR_NO_DEFAULT_CURRENCY_DEFINED', 'Fel: Det finns för närvarande inge valuta som default. Välj någon i: Administration Verktyg->Plats->Valutor');

define('TEXT_CACHE_CATEGORIES', 'Kategoriernas box');
define('TEXT_CACHE_MANUFACTURERS', 'Tillverkarnas box');
define('TEXT_CACHE_ALSO_PURCHASED', 'Också-beställt-modul');

define('TEXT_NONE', '--ingen--');
define('TEXT_TOP', 'Topp');

define('ERROR_DESTINATION_DOES_NOT_EXIST', 'Fel: Destination finns ej.');
define('ERROR_DESTINATION_NOT_WRITEABLE', 'Fel: Destination är ej skrivbar.');
define('ERROR_FILE_NOT_SAVED', 'Fel: Filuppladning ej sparad.');
define('ERROR_FILETYPE_NOT_ALLOWED', 'Fel: Filuppladningstypen är inte tillåten.');
define('SUCCESS_FILE_SAVED_SUCCESSFULLY', 'Ok: Filen sparades.');
define('WARNING_NO_FILE_UPLOADED', 'Varning: Ingen fil uppladddad.');
define('WARNING_FILE_UPLOADS_DISABLED', 'Varning: Filuppladningar är avstängt i php.ini konfigurationsfil. Kontakta din levererantör');

define('BOX_MODULES_STS', 'STS');
define('BOX_CATALOG_FEATURED_PRODUCTS', 'Utvalda produkter');

define('BOX_CATALOG_CATEGORIES_PRODUCTS_MULTI', 'Multiple Products Manager');
define('BOX_TOOLS_SITEMAP', 'Sitemap');
define('IMAGE_EXCLUDE', 'Exkludera');

// ################# Contribution Newsletter v050 ##############
// newsletters box text in includes/boxes/newsletters.php
//define('HEADING_INFOS_TITLE','Newsletter Management');
//define('HEADING_TITLE','Newsletter');
define('BOX_HEADING_NEWSLETTER', 'Nyhetsbrev');
define('BOX_NEWSLETTER_ADMIN', 'Nyhetsbrev Admin');
define('BOX_NEWSLETTER_EXTRA_INFOS', 'Header/Footer Info');
define('BOX_NEWSLETTER_UPDATE', 'Uppdatera table');
define('BOX_NEWSLETTER_SUBSCRIBERS_UTILITIES', 'Utilities');
define('BOX_NEWSLETTER_SUBSCRIBERS_VIEW', 'Prenumeranter Admin');
define('BOX_NEWSLETTER_EXTRA_DEFAULT', 'Nyhetsbrev Standard');
define('BOX_CUSTOMERS_NEWSLETTER_MANAGER', 'Nyhetsbrev Admin');
define('TABLE_HEADING_EMAIL','E-post');
define('TEXT_UNSUBSCRIBE','Avregistrera: ');
// ################# END - Contribution Newsletter v050 ##############

 // BEGIN latest news
 define('BOX_CATALOG_LATEST_NEWS', 'Nyheter');
 // END latest news

define('BOX_CATALOG_XSELL_PRODUCTS', 'Cross Sell Products');
//AJAX Orders Editor
define('DIV_ADD_PRODUCT_HEADING', 'Lägg till en produkt');
define('ADD_PRODUCT_SELECT_PRODUCT', 'Namn eller Art.Nr på en produkt:');
define('PRODUCTS_SEARCH_RESULTS', 'Sökresultat: ');
define('PRODUCTS_SEARCH_NO_RESULTS', 'Inga resultat.');
define('TEXT_PRODUCT_OPTIONS', 'Alternativ');

define('BOX_TOOLS_PAGE_MANAGER', 'Extra info Pages Manager');
define('TEXT_DISPLAY_NUMBER_OF_PAGES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Pages)');

define('BOX_HEADING_FAQ', 'FAQ system');	//FAQ SYSTEM
define('BOX_FAQ_MANAGER', 'FAQ manager');   //FAQ SYSTEM
define('BOX_FAQ_VIEW', 'FAQ view');		 //FAQ SYSTEM
define('BOX_FAQ_VIEW_ALL', 'FAQ ALL view'); //FAQ SYSTEM

define('ENTRY_PERSONNUMMER', 'Personnr:'); 
define('JS_PERSONNUMMER', ''personnr' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

// summary info v1.1 plugin by conceptlaboratory.com
define('TEXT_SUMMARY_INFO_WHOS_ONLINE', 'Besökare Online: %s');
define('TEXT_SUMMARY_INFO_CUSTOMERS', 'Besökare totalt: %s, Idag: %s');
define('TEXT_SUMMARY_INFO_ORDERS', 'Ordrar Status %s, Idag: %s');
define('TEXT_SUMMARY_INFO_REVIEWS', 'Recensioner totalt: %s, Idag: %s');
define('TEXT_SUMMARY_INFO_TICKETS', 'Ticket Status %s');
define('TEXT_SUMMARY_INFO_ORDERS_TOTAL', 'Order Total %s, Idag: %s');
// summary info v1.1 plugin by conceptlaboratory.com eof

define('BOX_REPORTS_SALES_REPORT2', 'Sales Report 2');
?>

 

 

I dont understand what kind of problem this is so i need help :blush:

 

Regards Tony

Share this post


Link to post
Share on other sites
Hi Chris!

one more problem when i put this in admin/languages/svenska.php and english.php

define('IMAGE_ORDERS_PDF_INVOICE','Generate PDF Invoice');

 

This happens when i look in admin

Parse error: syntax error, unexpected T_STRING in /usr/www-root/kunder/xxxxx/xxxxx/xxxxxx/www.xxxx.com/admin/includes/languages/svenska.php on line 345

 

Tony,

 

Both your errors are being caused by incorrect use of quotes. The first error in order.php is doesn't appear directly related to the pdf code added. Have you been adding another contribution at the same time? You'll need to check where you added the pdf code carefully, rolling back first if necessary and then reapplying.

 

Your language file code:

 

define('JS_PERSONNUMMER', ''personnr' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

 

is invalid.

 

In this PHP code the single quote ' is used to denote the start and end of the string. If you want a literal single quote ' you MUST escape it - i.e. \'

 

I suspect what you want is:

 

define('JS_PERSONNUMMER', '\'personnr\' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

 

Hope this helps

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites
I'm sorry to post my problem again but the poster above me posted such a large php file so that my message has almost dissappeared ;):

 

I really like this mod (for as far as I can see), but I've got a problem.

 

The PDF Invoice option doesn't show up in the admin menu... I've already tried the fix when only 1 option shows (but with mine it shows none though)..., but I had no luck.

I only have the Ultimate SEO mod installed besides the standard install.

What did I forget? SQL is added and all files are uploaded as far as I can tell!

 

Johan,

 

If you browse the configuration_group table using phpMyAdmin, do you see an entry for PDF Invoice?

If so, note its configuration_group_id.

 

Now look at `configuration` and browse to the latest entries. Do you have the PDF related entries and if so, do the configuration_group_id's match the value in `configuration_group`?

 

Regards,

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites
Hi,

sorry for my english.

 

i have a big problem with the customer_id.

 

on the customer area is the invoice with customer_id and in the admin area is customer_id = 0

 

I have all to read in this forum becose no find solution.

 

Hi Peter,

 

Can you expand a bit further on what your problem is?

 

In account_history_info.php the $customer_id is set by osc when the customer successfully logs in.

 

$customer_id shouldn't be set within admin at all. Also, I believe customer ids start at 1, not 0. The admin add on bypasses the customer_id checks using the secret hash (which you should now change if you haven't already as you've posted it here on the forum)

 

If you can let me know the exact problem you're having generating the PDF, I'll try to help fix it.

 

Regards,

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites
Hi Peter,

 

Can you expand a bit further on what your problem is?

 

In account_history_info.php the $customer_id is set by osc when the customer successfully logs in.

 

$customer_id shouldn't be set within admin at all. Also, I believe customer ids start at 1, not 0. The admin add on bypasses the customer_id checks using the secret hash (which you should now change if you haven't already as you've posted it here on the forum)

 

If you can let me know the exact problem you're having generating the PDF, I'll try to help fix it.

 

Regards,

 

Chris

 

 

Hi Chris,

thanks for you time to help me :rolleyes:

 

Screen Shoot invoice in customer area:

capture5.jpg

 

 

Screen Shoot invoice in admin area:

capture2.jpg

 

You can see the customer_id is not correctly in admin :'(

 

 

my account_history_info.php

 

<?php

/*

$Id: account_history_info.php,v 1.100 2003/06/09 23:03:52 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) {

tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

}

 

$customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");

$customer_info = tep_db_fetch_array($customer_info_query);

if ($customer_info['customers_id'] != $customer_id) {

tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO);

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

$breadcrumb->add(sprintf(NAVBAR_TITLE_3, $HTTP_GET_VARS['order_id']), tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'));

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order($HTTP_GET_VARS['order_id']);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr><!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" colspan="2"><b><?php echo sprintf(HEADING_ORDER_NUMBER, $HTTP_GET_VARS['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></b></td>

</tr>

<tr>

<td class="smallText"><?php echo HEADING_ORDER_DATE . ' ' . tep_date_long($order->info['date_purchased']); ?></td>

<td class="smallText" align="right"><?php echo HEADING_ORDER_TOTAL . ' ' . $order->info['total']; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<?php

if ($order->delivery != false) {

?>

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo HEADING_DELIVERY_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>

</tr>

<?php

if (tep_not_null($order->info['shipping_method'])) {

?>

<tr>

<td class="main"><b><?php echo HEADING_SHIPPING_METHOD; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['shipping_method']; ?></td>

</tr>

<?php

}

?>

</table></td>

<?php

}

?>

<td width="<?php echo (($order->delivery != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

if (sizeof($order->info['tax_groups']) > 1) {

?>

<tr>

<td class="main" colspan="2"><b><?php echo HEADING_PRODUCTS; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>

</tr>

<?php

} else {

?>

<tr>

<td class="main" colspan="3"><b><?php echo HEADING_PRODUCTS; ?></b></td>

</tr>

<?php

}

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

echo ' <tr>' . "\n" .

' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .

' <td class="main" valign="top">' . $order->products[$i]['name'];

 

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';

}

}

 

echo '</td>' . "\n";

 

if (sizeof($order->info['tax_groups']) > 1) {

echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";

}

 

echo ' <td class="main" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo HEADING_BILLING_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_PAYMENT_METHOD; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['payment_method']; ?></td>

</tr>

</table></td>

<td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {

echo ' <tr>' . "\n" .

' <td class="main" align="right" width="100%">' . $order->totals[$i]['title'] . '</td>' . "\n" .

' <td class="main" align="right">' . $order->totals[$i]['text'] . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_ORDER_HISTORY; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

$statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");

while ($statuses = tep_db_fetch_array($statuses_query)) {

echo ' <tr>' . "\n" .

' <td class="main" valign="top" width="70">' . tep_date_short($statuses['date_added']) . '</td>' . "\n" .

' <td class="main" valign="top" width="70">' . $statuses['orders_status_name'] . '</td>' . "\n" .

' <td class="main" valign="top">' . (empty($statuses['comments']) ? ' ' : nl2br(tep_output_string_protected($statuses['comments']))) . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

 

<!-- start pdf //-->

<?php

 

// only display pdf invoice link if * latest * order status is 3 (delivered)

$delivered_query = tep_db_query("select max(osh.date_added) as los, osh.orders_status_id from " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' group by osh.orders_status_id order by los desc limit 1");

 

$delivered_status = tep_db_fetch_array($delivered_query);

if ($delivered_status['orders_status_id'] == 3 || DISPLAY_PDF_DELIVERED_ONLY == 'false' ){

?>

<tr>

<td class="main"><b><?php echo PDF_INVOICE; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pdf.gif', 'PDF invoice','','','style="vertical-align:middle"') . sprintf(PDF_DOWNLOAD_LINK,

tep_href_link(FILENAME_CUSTOMER_PDF, 'order_id=' . $HTTP_GET_VARS['order_id'] , 'SSL')); ?></td>

</tr>

</table>

</td>

</tr>

<?php

}

?>

<!-- end pdf //-->

 

<?php

if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php');

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //--></tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites
Hi Chris,

thanks for you time to help me :rolleyes:

 

Bitte schön!

 

Thank you for spotting this! No-one else has reported this but you're quite right. It's a bug.

 

When the invoice is accessed from admin, the customer id is not set so cannot be displayed. Fortunately this is easilt fixed.

 

EDIT pdfinvoice.php

 

FIND:

 

 if($HTTP_GET_VARS['passthruID'] === $pass_phrase_hash){

 

IMMEDIATELY AFTER add:

 

// get customer_id for this order number
	$customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
	$customer_info = tep_db_fetch_array($customer_info_query);
	$customer_id = $customer_info['customers_id'];

 

I'll make sure this gets uploaded as a bug fix.

 

Vielen Dank

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites

Hi Chris,

vielen dank :rolleyes:

pdfinvoice ist working now in admin area with the customer_id.

 

I´m so happy :thumbsup:

 

thank you.

Edited by Yepi

Share this post


Link to post
Share on other sites
Johan,

 

If you browse the configuration_group table using phpMyAdmin, do you see an entry for PDF Invoice?

If so, note its configuration_group_id.

 

Now look at `configuration` and browse to the latest entries. Do you have the PDF related entries and if so, do the configuration_group_id's match the value in `configuration_group`?

 

Regards,

 

Chris

 

 

Yes, they match. They are both number 16. What could the problem be?

Share this post


Link to post
Share on other sites
Tony,

 

Both your errors are being caused by incorrect use of quotes. The first error in order.php is doesn't appear directly related to the pdf code added. Have you been adding another contribution at the same time? You'll need to check where you added the pdf code carefully, rolling back first if necessary and then reapplying.

 

Your language file code:

 

define('JS_PERSONNUMMER', ''personnr' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

 

is invalid.

 

In this PHP code the single quote ' is used to denote the start and end of the string. If you want a literal single quote ' you MUST escape it - i.e. \'

 

I suspect what you want is:

 

define('JS_PERSONNUMMER', '\'personnr\' skall ha minst ' . ENTRY_PERSONNUMMER_MIN_LENGTH . ' siffror.');

 

Hi Chris!

i tried that code but it still say

Parse error: syntax error, unexpected T_STRING

 

when i take out

define('IMAGE_ORDERS_PDF_INVOICE', 'Generate PDF Invoice');

 

osc works so i dont know what the problem is

 

can the problem be in orders.php can that effect this file on osc?

 

beacuse everything works but if i put your codes for admin part in orders and svenska.php it dont work

 

Regards Tony

 

Hope this helps

 

Chris

Share this post


Link to post
Share on other sites

Hi Chris!

I think i found what the problem is for my admin part.

 

Can it be that i have AJAX Orders Editor installed?

AJAX

 

please help me i´m banging my head in the wall :angry:

 

everything works in the shop but when i install the admin part everything fails

Regards Tony

Share this post


Link to post
Share on other sites

Hi Chris!

This is the contribs i have installed

PDF datasheet

SEO

PDF Invoices customer

STS

sales report

Extra info pages manager

AJAX orders Editor

FAQ System

XSell

Pricerunner

 

Now i want to install your PDF Invoice Admin

But idont get it to work do you think that my contribs destroy the chance of making it work?

 

/Tony

Share this post


Link to post
Share on other sites
How can I remove the inserted SQL from my database?

true phpadmin adn pick the things you put in and delete direct from database or make a new sql query there you delete the items

 

/Tony

Edited by El_Heso

Share this post


Link to post
Share on other sites

Hi Chris, **** can you speak german? ****

my english is not so good :rolleyes:

 

 

a question for text to customer in pdfinvoice.

 

Here is the code, text for all customers in the pdfinvoice:

*************************************************

 

SQL:

 

DROP TABLE IF EXISTS `edit_invoice`;

 

CREATE TABLE `edit_invoice` (

`edit_invoice_id` tinyint(3) unsigned NOT NULL default '0',

`language_id` tinyint(3) unsigned NOT NULL default '1',

`edit_invoice_text` text,

PRIMARY KEY (`edit_invoice_id`,`language_id`),

KEY `status_id` (`edit_invoice_id`)

) TYPE=MyISAM;

 

 

INSERT INTO `edit_invoice` (`edit_invoice_id`, `language_id`, `edit_invoice_text`) VALUES (1, 1, 'here is text in invoice');

 

 

**************************************************

 

Area for text:

 

 

<?php

require('includes/application_top.php');

?>

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html '<?php echo HTML_PARAMS; ?>'>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

 

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top">

<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table>

</td>

<!-- body_text //-->

<td class="pageHeading" valign="top"><?php echo HEADING_TITLE_EDIT_INVOICE; ?>

<?php

if ($REQUEST_METHOD=="POST")

{

mysql_query('REPLACE INTO edit_invoice VALUES (1, "' . $languages_id . '", "' . $text_1 .'")')

or die(mysql_error());

}

$sql=mysql_query("SELECT * FROM edit_invoice where edit_invoice_id = '1' and language_id = '" . $languages_id . "'")

or die(mysql_error());

$row=mysql_fetch_array($sql);

?>

<table width="98%" align="center" border="0" cellpadding="0" cellspacing="0">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '25'); ?></td>

</tr>

<form name="text_1_form" method="Post" action="">

<tr>

<td width="75%" valign="top"><?php echo EORDER_TEXT_1; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td width="75%" valign="top"><textarea name="text_1" cols="75" rows="5"><?php echo $row['edit_invoice_text'] ?></textarea></td>

</tr>

<tr>

<td align="left"></td>

</tr>

</form>

</table>

</td>

<!-- body_text_eof //-->

</tr>

</table>

<!-- body_eof //-->

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

*******************************************************

 

pdfinvoice show text:

 

query:

 

$text_query = tep_db_query("SELECT * FROM edit_invoice where edit_invoice_id = '1' and language_id = '" . $languages_id . "'");

$text = tep_db_fetch_array($text_query);

 

 

show text:

 

$text['edit_invoice_text'] = str_replace("<br>",'',$text['edit_invoice_text']);

$pdf->MultiCell(10, 220,$text['edit_invoice_text'],0,'L');

 

********************************************************

 

How can i make this on orders.php

I need text for single customer on the pdfinvoice.

 

This code must in orders.php

when i make status update must the text inside.

 

Thanks.

Share this post


Link to post
Share on other sites
everything works in the shop but when i install the admin part everything fails

 

Tony,

 

Are you saying that if you add:

 

define('IMAGE_ORDERS_PDF_INVOICE','Generate PDF Invoice');

 

to admin/includes/languages/svenska.php

 

then admin/orders.php breaks and if you remove it, it works?

 

If this is the case, and the code above is inserted in a valid location in admin/includes/languages/svenska.php, then there is no way the code should be causing this issue.

 

Regards,

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites
Hi Chris, **** can you speak german? ****

 

Yes - very badly! My German is probably much worse than your English.

 

How can i make this on orders.php

I need text for single customer on the pdfinvoice.

 

This code must in orders.php

when i make status update must the text inside.

 

Thanks.

 

Is this a contribution, or have you done this code yourself?

 

When you say you want this text for a single customer, how are you linking the edit invoice id to the customer id?

 

Cheers

 

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites
Tony,

 

Are you saying that if you add:

 

define('IMAGE_ORDERS_PDF_INVOICE','Generate PDF Invoice');

 

to admin/includes/languages/svenska.php

 

then admin/orders.php breaks and if you remove it, it works?

 

If this is the case, and the code above is inserted in a valid location in admin/includes/languages/svenska.php, then there is no way the code should be causing this issue.

 

Regards,

 

Chris

Hi Chris!

No my mistake that´s working now but it´s the orders.php thats the problem is when i put your code in nothing works and i found what it was when i delete the AJAX module from it the code works so my question is how to implement your code so it works with the ajax module

 

Regards Tony

Edited by El_Heso

Share this post


Link to post
Share on other sites

Hi Tony,

I'll have to download the ajax contrib and have a quick look at how it works.

I'll get back asap.

Regards,

Chris


Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Share this post


Link to post
Share on other sites

This mod is finally working here :). I really love it!

 

One thing: When I generate a pdf, it shows a 'R' below all amounts... What does this mean? Can it be turned off?

Share this post


Link to post
Share on other sites

Hi, so i have installed your mod, love the idea, but though it works on the admin side no luck with the customer side... iat this point I just have STS that would be the problem i think... but i just don't know... any ideas?

Share this post


Link to post
Share on other sites

I thought this mod worked on my website but I get the following error after clicking on Packageslip and Invoice in adminside:

 

Warning: require(fpdf/fpdf.php) [function.require]: failed to open stream: No such file or directory in /usr/home/****/public_html/os/admin/invoice.php on line 26

 

Warning: require(fpdf/fpdf.php) [function.require]: failed to open stream: No such file or directory in /usr/home/****/public_html/os/admin/invoice.php on line 26

 

Fatal error: require() [function.require]: Failed opening required 'fpdf/fpdf.php' (include_path='.:/usr/local/lib/php') in /usr/home/****/public_html/os/admin/invoice.php on line 26

 

Update: I have edited on line 26: fpdf/fpdf.php to ../fpdf/fpdf.php

 

Now I get this error:

FPDF error: Missing or incorrect image file: images/invoice_logo.jpg

 

How can I fix this?

Edited by nlholland

Share this post


Link to post
Share on other sites
Yes - very badly! My German is probably much worse than your English.

Is this a contribution, or have you done this code yourself?

 

When you say you want this text for a single customer, how are you linking the edit invoice id to the customer id?

 

Cheers

 

Chris

 

Hi Chris,

code is from here:

KLICK HERE ...

 

Problem wit this code you can insert text into DB and the invoice show text becose for all customers.

 

I like text for single customer.

 

I know in this SQL must customer_id and text_id for the query and the query look for text on invioce with customer_id and text_id and show this.

 

DROP TABLE IF EXISTS `edit_invoice`;

 

CREATE TABLE `edit_invoice` (

`edit_invoice_id` tinyint(3) unsigned NOT NULL default '0',

`language_id` tinyint(3) unsigned NOT NULL default '1',

`edit_invoice_text` text,

PRIMARY KEY (`edit_invoice_id`,`language_id`),

KEY `status_id` (`edit_invoice_id`)

) TYPE=MyISAM;

 

 

I think ist very good for you Contribution.

 

Sorry for my english ;-o).

Share this post


Link to post
Share on other sites

where does it gets his info for the website adres

because it uses my default website adres and i want this to be different

 

btw

great plugin :)

and it would be realy cool if it can mail the pdf files to

Edited by Morphling

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×