Jump to content

Avlad

Members
  • Posts

    17
  • Joined

  • Last visited

Avlad's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. The only real solution - use utf-8 for the .pdf generation. This bug was known by PrestaTeam at least since 02 June 2008, when Philippe Sang writes: > Yes we are aware about this problem and working on for RC4. The problem is that fpdf did not support utf-8 encoding. Simple solution - use ufpdf: http://acko.net/node/56 – UFPDF: Unicode/UTF-8 extension for FPDF. I have installed ufpdf, have generated utf-8 fonts, fix updf for this application and rewrite pdf.php to work with ufpdf and new fonts. Detailed description here: http://www.prestashop.com/forums/viewthread/3480/P15/_lang____pdf Now I have all invoices printed in utf-8. It is especially useful, when you need to use two languages with incompatible encodings, for example CP1251 and CP1257. This also several times reported to the Presta team in forum in the bug tracker: http://www.prestashop.com/bug_tracker/view/629/ http://www.prestashop.com/bug_tracker/view/628/ Probably, it will be fixed by Presta Team in the next few years, however right now you can use my solution.
  2. Presta did not support utf-8 in pdf generation. Presta team aware of this issue from RC3, but still can not resolve it. Several palliative methods already discussed in the forum many times. From my opininion. the only real solution - move from different encodings to utf-8. Detailed description, what need to be done, at the link: http://www.prestashop.com/forums/viewthread/3480/P15/_lang____pdf After this corrections presta support utf-8 in .pdf and can print invoices at any language.
  3. Presta does not support different delivery times, it was requested as feature several times: http://www.prestashop.com/bug_tracker/view/540/ http://www.prestashop.com/bug_tracker/view/526/ and also discussed in the forum several times: http://www.prestashop.com/forums/viewthread/4552/feature_requests/pre_orders http://www.prestashop.com/forums/viewthread/5400/general_discussion/products_ordered_and_in_stock You can try to contact amwdesign, he probably can offer this feature: 16 aug 2008 he wrote: >I could look at creating a php function to achieve what you require based on time-frame for reduction but instead of using >reduction use the products status, PM if you are interested in this modification. In the meantime simple solution is the following. You can modify message "product in stock" for each particular product. For example, for you MP3/MP4 players it can look like: "delivery in 10-14 days", for other items: "delivery in 2-3 days". The main drawbacks - you need to write this line for each your product and you can not allow product preordeing (with payment only when product arrives).
  4. Yes, sure. As PrestaTeam can not resolve this issue, the only remaining solution - do it yourself. I have installed ufpdf, have generated utf-8 fonts, fix updf for this application and rewrite pdf.php to work with ufpdf and new fonts. Detailed description here: http://www.prestashop.com/forums/viewthread/3480/P15/_lang____pdf Now I have all invoices printed in utf-8. It is especially useful, when you need to use two languages with incompatible encodings, for example CP1251 and CP1257.
  5. Please read my answer once more time. If you need to remove background from the current pictures, you can use techniques, described at http://graphicssoft.about.com/od/photoshop/l/blremovebackg.htm
  6. If you make your own photos, it's simple. Take the pictures with white back, use good light. Below is examples, how it can be done: http://www.youtube.com/watch?v=LjbRpn-FHA4&feature=related Than take your preferred picture editor (Photoshop, Xnview, ...) and slighty change instrument, called Curves. Example is here: Similar effect can also be achieved with instrument Levels. It would take 10-15 sec per image and for simple situation it is usually enough. If you need to remove background from some other pictures, here is several techniques: http://graphicssoft.about.com/od/photoshop/l/blremovebackg.htm
  7. В нашей ситуации этот клиент не поможет, потому как он не понимает базу в UTF-8, немцы при разработке специально заложили библиотеки, не работающие с UTF-8. Что реально может помочь для импорта и экспорта на данном этапе - Navicat (http://www.navicat.com), полная версия для MySQL. Импорт и Экспорт в ней проходят весьма удобно.
  8. Yes, menus is own for each language. For example, currently I have 3 languages in the shop and need to setup another 2 in near future and may be 3 more in the next 3 month. All frontend menus are individual for each language, for backend I use only one language. So, now for each new product I need to manually copy it's main description (in english) to each language. If products are similar, I can try to duplicate product and change it description on each language, however copy/paste usually is faster. As I did not have many products, it take only several days to copy/paste descriptions to all languages. However, if I need to import about 1000 products - probably I will make this copy/paste outside of Presta, when preparing input files. So, duplicate main description to all languages by default - if other languages was not filled, will be very good feature.
  9. If you need any language with special characters, not present in the default encoding, you need to change fonts and make appopriate changes in the pdf.php. Presta does not work with UTF-8 in .pdf. This was discussed several times before. http://www.prestashop.com/forums/viewthread/3480/__/_lang____pdf http://www.prestashop.com/forums/viewthread/3161/old_bug_report_forum/generating_pdf_invoices http://www.prestashop.com/forums/viewthread/830/P60/ Last time Presta team responded 02 June 2008 12:02 PM, Philippe Sang writes: However, as the problem is still present in the released version, the are not so many chances, that it can be fixed in near future. So, I fix it, using ufpdf module. More details: http://www.prestashop.com/forums/viewthread/3480/P15/__/_lang____pdf Now Presta can print documents in utf-8 without problem and we did not need hassle with encoding setup (especially, if you need more than one language in the shop with incompatible encodings – CP1251 and CP1257 for example).
  10. Presta does not work with UTF-8 in .pdf. This was discussed several times before. http://www.prestashop.com/forums/viewthread/3480/__/_lang____pdf http://www.prestashop.com/forums/viewthread/3161/old_bug_report_forum/generating_pdf_invoices http://www.prestashop.com/forums/viewthread/830/P60/ Last time Presta team responded 02 June 2008 12:02 PM, Philippe Sang writes: Yes we are aware about this problem and working on for RC4. However, as the problem is still present in the released version, the are not so many chances, that it can be fixed in near future. So, I fix it, using ufpdf module. More details: http://www.prestashop.com/forums/viewthread/3480/P15/__/_lang____pdf Now Presta can print documents in utf-8 without problem and we did not need hassle with encoding setup (especially, if you need more than one language in the shop with incompatible encodings - CP1251 and CP1257 for example).
  11. Не совсем так. ufpdf - это надстройка над fpdf, позволяющая работать в utf-8. Берется на http://acko.net/node/56 В оригинальном виде работать у меня не захотела, пропатчил в ней следующее в function AddFont: // if(defined('FPDF_FONTPATH')) // $file=FPDF_FONTPATH.$file; if(!defined('FPDF_FONTPATH')) $this->_getfontpath(); $file=FPDF_FONTPATH.$file; Кладем ufpdf.php рядом с fpdf.php - в tools/fpdf Далее занимаемся генерацией шрифтов для ufpdf в соответствии с readme к ней. Шрифты этой надстройке нужны другие - в UTF-8, и шрифты для fpdf не подойдут. Процесс генерации шрифтов проходит в 3 этапа. Сперва берем желаемые .ttf шрифты, содержащие весь нужный нам набор символов. 1) Генерируем метрику .ufm при помощи программки ttf2ufm $ ttf2ufm -a -F myfont.ttf 2) Запускаем makefontuni.php с аргументами .ttf и .ufm : $ php -q makefontuni.php myfont.ttf myfont.ufm 3) Результирующие .php, .z и .ctg.z копируем в tools/fpdf/font Теперь нужно переделать модуль pdf.php, чтобы он больше не конвертировал utf-8 в какую-либо другую кодировку, а отдавал непосредственно utf-8. Для начала вызываем ufpdf вместо fpdf: require(_PS_FPDF_PATH_.'ufpdf.php'); class PDF extends UFPDF Далее я выбрал фонт verdana и вписал так: private static $_pdfparams = array( 'CS' => array( 'encoding' => 'utf-8', 'font' => 'verdana') Затем описал используемые фонты в fpdf_core_fonts и еще в самом конце модуля заменил фонт: static private function fontname() { $font = self::embedfont(); return $font ? $font : 'verdana'; } Еще нужно описать используемые фонты в fpdf.php в функции CoreFonts по образу и подобию имеющегося описания. После всей этой процедуры presta начала нормально печатать в utf-8.
  12. Поскольку от французов толку ноль, новых версий и багфиксов пока не ожидается - пришлось разбираться самостоятельно. В моем случае задача усложняется тем, что мне нужны инвойсы не только на русском, а и в CP1257. А как известно, эти кодировки между собой не совместимы. В общем, я проинсталировал ufpdf, сделал фонты для него, пофиксил его самого и переписал pdf.php на работу с utf-8. В результате все заработало - теперь инвойсы нормально печатаются в utf-8 в любой кодировке.
  13. This topic already discussed several times in different variations: http://www.prestashop.com/forums/viewthread/4552/feature_requests/pre_orders http://www.prestashop.com/forums/viewthread/5400/general_discussion/products_ordered_and_in_stock I have also submitted it to the bug tracker as feature request: http://www.prestashop.com/bug_tracker/view/526/ However right now only amwdesign offered some paid solution here: http://www.prestashop.com/forums/viewthread/4552/feature_requests/pre_orders Yes, I am also very interested in coming soon/pre-order extension for the stock availability field.
  14. Hello! I am trying to make Prestashop 1.0.0.8 to create invoices in language with diacritic symbols. In my case I need CP1257 code table - Baltic languages. After several days of the forum research and trying several different solution I still can not find anything, that works for the 1.0.0.8. May be anyone is more lucky, that me ? Please help... What I am checking: First, I am generating correct font for my charset on http://fpdf.fruit-lab.de/ It need to be done for normal and bold font. I have created arial.php, arial.z, arialb.php, arialb.z files and copy it to the tools/fpdf/font Second, set in the back office - CP1257 and font - arial. Third - trying to figure out, what need to be changed in the pdf.php to make this fonts work. I have checked the following published solutions: http://www.prestashop.com/forums/viewthread/3480/__/_lang____pdf Seems, that this method work only for RC5. For me words in the .pdf truncated on the first diacritic symbol. http://www.prestashop.com/forums/viewthread/3161/old_bug_report_forum/generating_pdf_invoices Same result - does not work. http://www.prestashop.com/forums/viewthread/830/P60/ Same result - looks, that this solution work only in RC5 and does not work in 1.0.0.8 PrestaTeam is aware of this problem: 02 June 2008 12:02 PM Philippe Sang writes: However, as the problem is still present in the released version, the are not so many chances, that it can be fixed in near future. The only remaining suggestion, that I was not tested - change pdf library from fpdf to some another, that support utf-8 encoding. To my knowledge, at least the following libraries exist: http://acko.net/node/56 - UFPDF: Unicode/UTF-8 extension for FPDF http://tcpdf.sf.net/ - Open Source PHP class for generating PDF documents However, I did not have enough skills to change this library. May be someone can help ?
  15. Проделал те же действия, что и Stroller - с тем же результатом. Presta 1.0.0.8, все остальное врроде бы точно такое же как в описании в теме. Возможно для 1.0.0.8 надо как-то по-другому фиксить ? Кто-то может написать пошагово все, что было сделано для чистого инсталла 1.0.0.8, чтобы в .pdf заработал русский ? У меня просто не выводятся никакие русские символы - только латинские.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More