PrestaShop Forums: UTF-8 koduotė PDF sąskaitoje (v. 1.2.5) - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


UTF-8 koduotė PDF sąskaitoje (v. 1.2.5)


UTF-8 koduotė PDF sąskaitoje (v. 1.2.5)

#1 mantoza

    PrestaShop Apprentice

  • 26 Jan 2009
  • Members
  • PipPip
  • 41 posts

Posted 02 December 2009 - 02:27 PM

Sveiki,

Matau čia daugumai problemų yra kaip PDF padaryti lietuviškai simoboliai ant 1.2.5 versijos.
Bent mums šis sprendimas tai tikrai padėjo :)

1. Parsisiųskite TCPDF, iš čia: http://www.sourcefor.../projects/tcpdf

2. Nukopijuotike visą turinį į /tools/tcpdf/

3. /config/config.inc.php byloje padarykite šiuos pakeitimus

define('_PS_FPDF_PATH_',            _PS_TOOL_DIR_.'fpdf/');

pakeiskite į
define('_PS_TCPDF_PATH_',            _PS_TOOL_DIR_.'tcpdf/');


4. /clases/PDF.php faile padarykite šiuos pakeitimus

4.1
include_once(_PS_FPDF_PATH_.'fpdf.php');

class PDF extends FPDF


pakeiskite į
require_once(_PS_TCPDF_PATH_.'config/lang/eng.php');
include_once(_PS_TCPDF_PATH_.'tcpdf.php');

class PDF_PageGroup extends TCPDF


4.2
FPDF::FPDF($orientation, $unit, $format);


pakeiskite į
TCPDF::__construct($orientation, $unit, $format, true);


4.3
static private function convertSign($s)
{
return str_replace('¥', chr(165), str_replace('£', chr(163), str_replace('€', chr(128), $s)));
}


pakeiskite į
static private function convertSign($s)
{
return html_entity_decode($s,ENT_NOQUOTES,'UTF-8');
}


4.4
return $font ? $font : 'Arial';


pakeiskite į
return $font ? $font : 'freesans';


5. /classes/Tools.php faile padarykite šiuos pakeitimus
static public function iconv($from, $to, $string)
{
//Uncoment lines below to return to previous condition
//$converted = htmlentities($string, ENT_NOQUOTES, $from);
//$converted = html_entity_decode($converted, ENT_NOQUOTES, $to);
//return $converted;
//Delete line below to return on previous condition.
return $string;
}


Bandykit :)
Jei kas neveiktų, rašykit.

#2

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 02 December 2009 - 05:32 PM

Gal galetum įmesti jau perdarytus failus nes man kažkaip neišeina :roll:

#3

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 02 December 2009 - 07:54 PM

pas mane po pakeitimo ten kur preferences>> pdf koduotes ir fonto pasirinkimas dabar yra tuscia. O kai paprasai parodyti pdf saskaita nieko visai neivyksta.

#4

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 December 2009 - 08:33 AM

Sveiki visi

PDF viskas pasitaiso, kai auksciau papostintoj instrukcijoj (Mantozo) kode istaisote viena klaida. Ateiciau, prasyciau postint kodus be klaidu, nes paskui uzsiknisimas buna totalus kai bandai galus suvest.

Klaida yra Punkte 4.1 (Reikia prirasyti raidele r pirmame zodyje, kad butu require)

require_once(_PS_TCPDF_PATH_.'config/lang/eng.php');
include_once(_PS_TCPDF_PATH_.'tcpdf.php');

class PDF extends TCPDF

#5

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 December 2009 - 08:34 AM

Bet kuriuo atveju padeka Mantozui, kad papostino kodus.

#6

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 December 2009 - 08:42 AM

Tiesa, tam paciam 4.1 punkte vietoj class PDF extends TCPDF bent jau as suvedziau:

class PDF_PageGroup extends TCPDF

Gal tai dar padejo.

#7

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 December 2009 - 09:00 AM

Kodas pataisytas.

#8

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 December 2009 - 09:46 AM

O taip, :-) dideliausias aciu chebryte

#9

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 06 December 2009 - 09:42 AM

any chance to have an english or french translation of this topic ?thx

#10

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 07 December 2009 - 12:26 PM

Welcome,

I see many problems here are in PDF format by Lithuanian letters on the 1.2.5 version.
At least for us, this decision really helped

1. TCPDF Download from here: http://www.sourcefor.../projects/tcpdf

2nd Copy the entire contents of / tools / tcpdf /

3rd / config / config.inc.php file, make the following amendments

http://www.prestasho..._1_dot_2_dot_5/

pakeiskite į = change to
padarykite šiuos pakeitimus = Make these changes

#11

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 07 December 2009 - 01:24 PM

THX A LOT i think that help a lot of people.

#12

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 08 December 2009 - 08:18 AM

Thanks a lot works fine :)
Just to add last part for me looks like this
    static public function iconv($from, $to, $string)
{
/*if (function_exists('iconv'))
return iconv($from, $to.'//TRANSLIT', str_replace('¥', '¥', str_replace('£', '£', str_replace('€', '€', $string))));
return html_entity_decode(htmlentities($string, ENT_NOQUOTES, $from), ENT_NOQUOTES, $to);*/
return $string ;
}


#13

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 10 December 2009 - 04:37 PM

Sveiki,
nezinau kas ne taip bet as pastoviai gaunu sia klaida :

TCPDF ERROR: Some data has already been output, can't send PDF file

tad gal galetumet atmesti pataisytus failus kad galeciau palyginti kas cia ne taip?

email: seniz eta inbox.lt

#14

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 14 December 2009 - 06:55 PM

o neveikia tas budas kur tik srifta nauja reikia pridet? nes cia matau daug darbelio ir neaisku ar gausis viskas.....

#15

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 14 December 2009 - 06:57 PM

Viskas čia veikia, tiesiog darykit kaip parašyta. Nes kitiem viskas čia gaunasi.

#16

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 21 December 2009 - 04:24 PM

:0
Gautis tai gaunas, tik dabar va kas išlenda.
Kai patvirtini uzsakyma, ish kar susigeneruoja saskaita pdf tarsi jau butum apmokejes ir nueina zinute emailu kad apmokejimas gautas. Zodziu kazkur cia dar makornas liko.

#17

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 21 December 2009 - 04:35 PM

From 1261409078:

:0
Gautis tai gaunas, tik dabar va kas išlenda.
Kai patvirtini uzsakyma, ish kar susigeneruoja saskaita pdf tarsi jau butum apmokejes ir nueina zinute emailu kad apmokejimas gautas. Zodziu kazkur cia dar makornas liko.

Kad čia nelabai susiję su PDF keitimu.

#18

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 21 December 2009 - 04:45 PM

na gal ir nelabai susiję, bet kai lietuviškų simbolių nebūdavo. Sąskaita susigeneruodavo tik tada kai per tvs patvirtindavai, kad mokėjimas gautas. dabar išsiunčia Order confirmation ir jau pdf sąskaita sugeneruojama. Na ji aišku negali būti sąskaitą, nes negautas apmokėjimas :(.
Kai rankomis per tvs padarai Payment accepted, gaujni dar katrą emailą Payment accepted.
na ten pirmu atveju gal užsakymo patvirtinimas tada ir išankstinė sąskaitą.

#19

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 21 December 2009 - 04:53 PM

paprasciausia iseitis nesiusti niekam jokiu saskaitu. as taip darau ir galvos neskauda.

#20

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 21 December 2009 - 05:10 PM

Koks pardos adresas?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users