Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Bru

  1. hi, I try to install Prestashop on my home computer with Zend Server 9 (i.e. Apache 2.4, PHP 7, etc,) but I got message "Upgrade your APC extension (3.1.13+)." But Zend server dont use APC, it use OPcache (and other cache posibilities) which is 1.8 faster. What I have to do? thanks Bru
  2. ahoj, skus doplnit "padding: 0 0 3px 0;" do .../themes/mybodymanager_new/css/globals.css riadok 3074 takze to bude vyzerat takto: #authentication input#SubmitCreate, #authentication input#SubmitLogin { margin: 0; padding: 0 0 3px 0; } malo by ti to pomoct! Bru
  3. In my shop I change <div id="cart_quantity_button" style="float:left;"> to <div class="cart_quantity_button" style="float:left;"> till this time it works Bru
  4. Velmi rad by som pomohol, ale skusat to na verzii, ktora je out na to mi bohuzial uz nezostava cas. Bru
  5. Urcite to ide. Ja som ale spustil obchod na ps1.4.6.2 a potom updatoval na ps1.4.8.2 Svoj b_csob modul som ale na ps1.3.7.0 neskusal. Treba si pozriet ci su nejake zasadne rozdiely medzi bankwire modulom pre ps1.3.7.0 a bankwire modulom pre ps1.4.6.2 Na celom PrestaShope je najdolezitejsia databaza a jej struktura. (pokial strukturu nemeni samotny program) (mne osobne chyba jej popis - filozofia) To potom urci co a ako sa moze programovat. (A je v podstate jedno v akom jazyku) Takze ak je databaza pre ps. rovnaka ako pre ps1.4.6.2 predpokladam len male alebo ziadne zmeny v b_csob module Bru
  6. Ahojte, Dajú sa v Administrácii vymazať "Zákaznícke správy" ? Administrácia > Objednávky > Zákaznícke správy (Back Office > Orders > Customer Messages) Alebo bude treba niečo programovať? Bru 2012.07.16, 23:58 Tak, zatial som sa docital na http://www.prestasho...tomer-messages/ ze sa to neda a asi to treba naprogramovat. Ak ste to uz niekto vyriesil, dajte vediet... Vďaka za každú radu ... Bru
  7. Nová verzia (ver.120706) CSOB platobny modul v subore b_csob120706.zip testovany a funguje na PS odskusane aj na PS Bru p.s. Podobne sa daju urobit platobne moduly pre dalsie banky. Staci mat navod z banky co potrebuje zasielat. Zatial som dalsiu banku nepotreboval. Ked budem nahodou programovat inu banku tak ten modul zase poskytnem kazdemu. b_csob120706.zip
  8. Hi, (ps In BackOffice -> Tools -> Translations -> Modify translations -> (dropdown menu) there is "Translations of installed modules" sentence. But when You change Admin language this menu item is not translated. solution: change \admin\tabs\AdminTranslations.php and \translations\en\admin.php files then in BackOffice update translation for Your language 1. in \admin\tabs\AdminTranslations.php find (line cca. 726) 'modules' => $this->l('Translations of installed modules'), in \translations\en\admin.php find (line cca. 2914) $_LANGADM['AdminTranslations1db04255ad87f7fe6d5bc91c74982612'] = 'Module translations'; 2. Make both sentences equal. e.g. \admin\tabs\AdminTranslations.php 'modules' => $this->l('Translations of installed modules'), \translations\en\admin.php $_LANGADM['AdminTranslations1db04255ad87f7fe6d5bc91c74982612'] = 'Translations of installed modules'; 3. in BackOffice -> Tools -> Translations -> Modify translations -> Back Office Translation in section AdminTranslations translate "Translations of installed modules" to Your language Bru
  9. hi, (ps to see translation on "Update carrier list" button modify \modules\carriercompare\template\carriercompare.tpl find: <input class="exclusive_large" id="update_carriers_list" type="button" value="{l s='Update carrier list' }" /> change: <input class="exclusive_large" id="update_carriers_list" type="button" name="update_carriers_list" value="{l s='Update carrier list' mod='carriercompare'}" /> Bru
  10. (PS Hi, here in an example for overriding from PHP manual cite from PHP manual about "extends" It is not possible to subtract from a class, that is, to undefine any existing functions or variables. If you have a class that extends an other and both classes have a function with the same name then visibility to both classes should be the same, else you will have a fatal error. create new php page with folowing code <?php class test { public function __construct() { echo '__construct() from class test was run<br />'; } public function name() { $this->showName('Hello Bru'); } public function showName($name) { echo 'my name in private "test" is ' . $name; } } class extendTest extends test { public function __construct() { parent::__construct(); echo '__construct() from clas extendTest was run<br /><br />'; } public function showName($name) { echo 'my name in "extendTest" is ' . $name; } } $test = new extendTest(); $test->name(); when you run code above in some internet browser you will see: __construct() from class test was run __construct() from clas extendTest was run my name in "extendTest" is Hello Bru but this analogy not work for class AuthController. Why? bru
  11. Hi, probably this will help you. (ps1.4.6.2) (I found this suggestion somewhere on this forum and it works for me fine) To be able to delete Orders and Carts from Backoffice modify AdminOrders.php add: $this->delete = true; i.e. in ...\admin\tabs\AdminOrders.php class AdminOrders extends AdminTab { public function __construct() { global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; /* add this line */ $this->delete = true; then when go to your orders, you will see the trashcan - now can be deleted when you delete order(s) you will see trashcan in matching cart(s) (Back Office > Customers > Shopping Carts) then you can delete carts Deleting order cleans all the data from database structure which were connected with deleted order. (tables: order, order_detail, order_history, order_discount, order_return_detail, order_return, order_slip_detail, order_slip, cart, cart_discount, cart_product) bru
  12. Thanks Snade for Your solution! This help me, and working fine (PS But I try to use overriding to modify code without actually modifying the original files. see: http://doc.prestasho...roller+Override I made copy of AuthController.php and saved it to /override/controllers/AuthController.php Then I modify new AuthController.php. It contain "class AuthController extends AuthControllerCore" with only one method "public function preProcess()" class AuthController extends AuthControllerCore { public function preProcess() { parent::preProcess(); /* ... orignal code ... */ $_POST['firstname'] = $_POST['customer_firstname']; /* dissabled by Your suggestion if (!Tools::getValue('phone') AND !Tools::getValue('phone_mobile')) { $this->errors[] = Tools::displayError('You must register at least one phone number'); } */ /* ... rest of original code */ } } But this not work! Probably I made some mistake. I used overriding for e.g. class Validate extends ValidateCore and it work. Where is problem? thanks Bru.
  13. Ahojte Tak som si pozrel bankwire modul a podla neho som urobil novy modul "b_csob" tak, aby splnal podmienky pre CSOB platobne tlacidlo. "b_csob" modul (pre PS je pre kazdeho zdarma. Je v prilohe, staci klasicky nainstalovat a v backoffice nastavit svoje parametre. Nainstaluje sa do "Platobne systemy a Platobne Brany" (Payments & Gateways) Bru modules front office Back Office b_csob.zip
  14. I made some, but by my opinion, non system solution to avoid transparency and background color problem. (PS My solution is: new imageResize(...) function and changes in *.tpl and *.css files To save original I rename imageResize(...) function in images.inc.php. Then I create following imageResize(...) function /** * Proportionaly shrink and optimize image * * @param array $sourceFile image object from $_FILE * @param string $destFile Destination filename * @param integer $mW maximum Destination image width (if $sW > $sH) * @param integer $mH maximum Destination image height (if $sW <= $sH) * @param string $fileType (gif, png, jpg) * * @return boolean Operation result */ function imageResize($sourceFile, $destFile, $mW = NULL, $mH = NULL, $fileType = 'jpg') { if (!file_exists($sourceFile)) { return false; } /* read information from $sourceFile to variables for source file */ list($sW, $sH, $type, $attr) = getimagesize($sourceFile); if (!$sW) { return false; } // $sW = 0 if ($type < 1 or $type > 3) { return false; } // no one of (1-gif, 2-png, 3-jpg) if ($mW == NULL) { $mW = $sW; } if ($mH == NULL) { $mH = $sH; } // If PS_IMAGE_QUALITY is activated, the generated image will be a PNG with .jpg as a file extension. // This allow for higher quality and for transparency. JPG source files will also benefit from a higher quality // because JPG reencoding by GD, even with max quality setting, degrades the image. if (Configuration::get('PS_IMAGE_QUALITY') == 'png_all' || (Configuration::get('PS_IMAGE_QUALITY') == 'png' && $type == IMAGETYPE_PNG)) { $fileType = 'png'; } // ------------ set destination image dimmensions $dW, $dH ------------------------ // $sW, $sH - source image dimmensions, sW-sourcewidth, sH-sourceHeight // $dW, $dH - destination image dimmensions, dW-destinationwidth, dH-destinationHeight // $mW, $mH - maximum destination image dimmensions, mW-maximumwidth, mH-maximumHeight switch (true): case ($sW <= $mW and $sH <= $mH): // if both Source dimmensions are smaller then Maximum dimmensions $dW = $sW; $dH = $sH; break; // Destination dimmensions = Source dimmensions // here some Source image dimmension is bigger then relevant Maximum image dimmension // i.e. ($sW > $mW or $sH > $mH) case ($sH > $sW): $dH = $mH; $dW = (int)(($mH * $sW) / $sH); break; // adjust destination width case ($sH <= $sW): $dW = $mW; $dH = (int)(($mW * $sH) / $sW); break; // adjust destination height default: return false; break; endswitch; // ------------ end of set destination image dimmensions $dW, $dH ------------------- $sourceImage = createSrcImage($type, $sourceFile); // gif, png or jpg $destImage = imagecreatetruecolor($dW, $dH); // define $destImage imagecopyresampled($destImage, $sourceImage, 0, 0, 0, 0, $dW, $dH, $sW, $sH); // create image file with quality set in BackOffice or default quality 7-png, 90-jpg return (returnDestImage($fileType, $destImage, $destFile)); } You can test this function - in BackOffice add some images for your products. PrestaShop *.tpl files will display all images like square (depend on BackOffice Image settings), therefore new added images will look mostly broader. Because now new added images are not squares, and I want to save previous pages look and behavior, I must change all *.tpl and *.css files which display these images. (I needed to change circa 7 tpl and css files) Here is example how to do it for e.g. Featured Product block: 1. copy modules/homefeatured directory to themes/yourtheme/modules/homefeatured dir. delete themes/yourtheme/modules/homefeatured/homefeatured.php now You can edit themes/yourtheme/modules/homefeatured/homefeatured.tpl 2. replace: <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" /> </a> with: <div class="b_d01" style="height:{$homeSize.height}px; width:{$homeSize.width}px;"> <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.name|escape:html:'UTF-8'}" /> </a> </div> 3. in proper *.css file, here "themes/yourtheme/css/global.css" add following style: /* need because of modified imageResize(...) function in images.inc.php. for images in Featured Products block (homefeatured.tpl) */ div#featured-products_block_center div.b_d01 a.product_image img { display: block; float: none; margin-left: auto; margin-right: auto; } The similar pattern you can use for all *.tpl files which display product images. Then in BackOffice for your products, delete previous images and add new images. Look of previously saved images will stay unchanged. Bru
  15. Just small warning, (ver. in shopping-cart-product-line.tpl there is a line <div id="cart_quantity_button" style="float:left;"> because this template can be called many times from shopping-cart.tpl there will many <div> with same id="cart_quantity_button" on html page. Html page should contain only unique id Bru
  16. Ked som objavil Ameriku tak sorry. Ak v module v php kode date funkciu $this->l() do komentara tak to nepomoze /* $this->l('To display some bla bla bla'); */ // $this->l(important bla bla bla'); stale sa to objavi v Back Office Tools Translations pri vasom module ale ak som dal za l nejake znaky (syntakticky som to znefunkcnil) tak uz to v Translations nebolo. /* $this->l ('This will not in tranlations'); */ Zrejme PrestaShop prekladaci engine ignoruje komentare a hlada len $this->l() mozno to niekomu pomoze Bru
  17. hi, Try to use Firefox with Firebug extension. Then You can locate css files of your theme. Bru
  18. I am programming some module. In this module I need test if input URL is valid. So, I find class ValidateCore in Validate.php. There is function isUrl * Check url valdity (disallowed empty string) * * @param string $url Url to validate * @return boolean Validity is ok or not */ public static function isUrl($url) { return preg_match('/^[~:#,%&_=\(\)\.\? \+\[email protected]\/a-zA-Z0-9]+$/', $url); } here regular expression will match every string which contain one or more characters ~|:|#|,|%|&|_|=|(|)|.|?| |+|-|@|/|a-z|A-Z|0-9| e.g. validate::isUrl("this is not url") return 1 validate::isUrl("http://www.prestashop.com/forums/") return 1 validate::isUrl("::/#?") return 1 validate::isUrl(":*:/#?") return 0 validate::isUrl(" ") return 1 So I am confused, if this function really check url valdity. Is there other function for url validation or I should write my own? Bru
  19. ahojte Chcel som editovat produkt a prestali sa mi v BO zobrazovat polia ako napr. Name: Displayed text when in-stock: Displayed text when allowed to be back-ordered: Default category: Short description: Description: vo FrontOffice sa vsetky potrebne polia zobrazuju. prikladam obr. z BO vdaka za kazdu radu ---------------------------------------------------------------- nasiel som riesenie: Zo zalohy som obnovil databazu! Vsetko zase chodi! Ale kde v databaze v ktorej tabulke bola chyba a aka, to bohuzial neviem! Este ze semtam zalohujem.
  20. Tiez som nad tym uvazoval, ze budem editovat images.inc.php ale tym by som posahal core modul a to som nechcel. (budu problemy pri updatovani systemu) 2012.02.06 Tak som nakoniec urobil nesystemove riesenie a to editaciu images.inc.php Original imageResize(...) funkcia robi vsetky obrazky stvorcove. Ak vas obrazok nie je stvorcovy tak ho doplni na stvorcovy. Doplnena plocha je bud farebna alebo priehladna. Podla toho ci vstupny obrazok je jpg , png, gif a podla nastavenia pre obrazky v backoffice. postup pre PS (treba vediet editovat tpl) som dal na: PrestaShop Forums -> English Forum -> Adapting PrestaShop -> Integration how to make image background transparent http://www.prestasho...page__p__722289 Po tychto upravach (zmenena funkcia imageResize a niektore tpl subory) uz nebudu ziadne dodatocne plochy okolo obrazkov a zobrazovanie je rychlejsie. bru
  21. jednoduche reseni je: 1. v Back Office Preferences Images si nastavis Image quality: Use PNG only if the base image is in PNG format 2. konvertujes svoje obrazky produktu z *.jpg do *.png (v budoucnu pak uzivej *.png format pro obrazky produktu) 3. v Back Office Catalog Current product 2. Images importujes *.png obrazek produktu a transparency funguje
  22. Hi, Simplest solution is: In Back Office Preferences Images set Image quality Use JPEG x Use PNG only if the base image is in PNG format Use PNG for all images With some program like Photoshop,Photopaint,ACDsee or other Convert Your product picture from *.jpg to *.png then in Back Office Catalog Current product 2. Images Browse and import this *.png file as usual Then transparency work well!
  23. Vdaka za vysvetlenie... pomohlo mi to! Bru
  24. Ahojte, Som zaciatocnik v PrestaShop. Prave som si nainstaloval verziu nakonfiguroval shop, pridal nejake produkty atd. vsetko funguje aj slovencina, aj ked niektore preklady sa mi nepacia a budem ich chciet zmenit. (ale to az ked si precitam manual ze ako sa to robi) Neviem vsak ako zmenit jazyk v back office na english, stale je tam slovencina. (ale nie vsetko, napr. zalozky/tabs su anglicky ...) V manuali som sa docital ze, citujem: In the "Language options" section, you can select which language will be displayed by default, both in the back office and the front office. Ale nech menim ako chcem stale je tam slovencina. Kde robim chybu, co si mam nastudovat? vdaka Bru 2011.09.25 1. Preinstaloval som PrestaShop s pociatocnymi nastaveniami english. Potom som stiahol a nainstaloval slovencinu. v Back Office Preferences Localization som nastavil Language locale: sk, Country locale:sk Teraz mozem vo FrontOffice prepinat medzi enablovanymi jazykmy (aj slovencina) ale v BackOffice je stale english a neviem to zmenit na iny jazyk. (to zatial nevadi, ale princip je princip) 2. Neviem kde prelozim text INFORMATION = Informacie badam dalej Bru 2011.10.06 Tak som nasiel ze slovo "Information " pre Module: blockcms sa nepreklada cez Back Office Tools Translations ako vsetky ostatne preklady ale cez CMS block configuration. Je to podla mna trochu nesystemove. Ked preklady tak na jednom mieste... Dakujem si za vyriesenie toho maleho problemu. Dufam ze to niektoremu zaciatocnikovi ako ja pomoze Bru 2011.09.26 Pridaval som Zamestnancov(Employees) vsetko o.k. Neskor som Zamestnancovi upravil "Back Office Color" a ked som stlacil Save uvidel som chybu: An error occurred while updating object. employee (Data truncated for column 'bo_uimode' at row 1) pravdepodobne je to nieco s databazou ... neviem. Zamestnanca som vymazal a znovu pridal s novymi hodnotamy. Ked viete poradit potesim sa Bru 2011.09.27 Uz netreba Internet mi poradil! ... je to v nastaveni MySQL server mode, ja som mal srict mode mysql> SELECT [spam-filter]SESSION.sql_mode; +-------------------------------+ | [spam-filter]SESSION.sql_mode | +-------------------------------+ | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +----------------------------------------------------------------+ 1 row in set Zmena na default mode sa robi v my.cnf/my.ini a dokumentacia je na: http://dev.mysql.com...r-sql-mode.html takze zmeny v Zamestnacoch uz teraz nehlasia chybu. (PostgreSQL sa mi viac paci ako MySQL pozri napr. http://www.databasej...-databases.html) vdaka ti Internet za odpoved Bru
  • Create New...

Important Information

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