Jump to content

Bru

Members
  • Posts

    24
  • Joined

  • Last visited

Profile Information

  • Interests
    mountain biking, cross country skiing, inline skating, chess, etc.
  • Activity
    Other

Recent Profile Visitors

3,858,971 profile views

Bru's Achievements

Newbie

Newbie (1/14)

6

Reputation

  1. hi, I try to install Prestashop 1.7.0.2 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.1.3.7.0 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 1.4.8.2 odskusane aj na PS 1.4.6.2 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 1.4.8.2) 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 1.4.8.2) 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 1.4.7.3) 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 1.4.6.2). 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 1.4.6.2) 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 1.4.6.2) 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. 1.4.6.2) 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
×
×
  • Create New...