Jump to content

janoo

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

4,218,610 profile views

janoo's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Collaborator Rare
  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

4

Reputation

  1. I hope PS authors already fixed this long time ago. But for those who experiencing similar error message.. SOLUTION 1: on: https://github.com/PrestaShop/PrestaShop/pull/9358/files is solution how to adapt old code for new PHP on many pages, just you have to understand principle (do not copy/paste automatically!): OLD CODE: if (isset($this->_list['addons']) && count($this->_list['addons'])) { NEW CODE: if ($this->isCountableAndNotEmpty($this->_list, 'addons')) { Plus add new function into same file, or implement generally through override something: /** * Check if key is present in array, is countable and has data. * * @param array $array Array * @param string $key Key * * @return boolean */ protected function isCountableAndNotEmpty(array $array, $key) { return isset($array[$key]) && ( $array[$key] instanceof Countable || is_array($array[$key]) ) && count($array[$key]); } SOLUTION 2: I´ve found couple handy shorter solutions like: if (is_array($children) && sizeof($children) <= 0) { or: if ( (is_array($children) || $children instanceof \Countable) && sizeof($children) > 0) { but still pay atention - you have to understand principle (do not copy/paste automatically!)
  2. CLARIFICATION There are two errors not one: 1. "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience" This error message in browser DevTools can be fixed with: 2. "TECHNICAL ERROR: unable to save adresses.." Fancybox modal message comes from .\themes\your_used_theme\js\order-opc.js rows 477-496 Seems like forgotten not finished something.. because it appears only when visitor confirms new "Personal data" and "Delivery address" on form "New Customer" for first time. When custommer already has saved data and address in PS, he can come as many times he wants and no error will be displayed again. Maybe this error warning could be changed to "Address is missing in eshop." or "New customer is added to eshop".. FIX: But for my usage I´d FIXED it with custom dirty tunning: - for me is enough to block displaying this chaotic message for custommers - and make it appearing in DevTools console only like this (bold underlined is my addings): error: function(XMLHttpRequest, textStatus, errorThrown) { if (textStatus !== 'abort') { var devError = "ERROR order-opc.js on r.477: \"unable to save adresses?\" \nDetails:\nXMLHttpRequest: " + XMLHttpRequest + "\n" + 'textStatus: ' + textStatus + "\n" + 'errorThrown: ' + errorThrown; console.log('TECHNICAL ERROR: ', devError); /* error = "TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus; if (!!$.prototype.fancybox) $.fancybox.open([ { type: 'inline', autoScale: true, minHeight: 30, content: '<p class="fancybox-error">' + error + '</p>' } ], { padding: 0 }); else alert(error); */ } $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); } I think that error is about something missing in certain ajax reques (with new address when it is not in database yet), because no response is obtained. And that´s why error message appears.
  3. Still not working properly.. only after reload page, it is not good enough. Stay tunned..
  4. In PS 1.6.1.24 on One page Checkout this error comes as modal window message: or in browser devtools as: This is caused by jquery library 1.11.x.x - 3.4.1 - yes, newest too. I´ve tried replace old jquery ".\js\jquery\jquery-1.11.0.min.js" with latest possible "jquery-3.4.1.min.js" with same error displayed. It is about using ajax in PS js files with "async: false": https://xhr.spec.whatwg.org/#the-open()-method (explained yellow box) FIX: find in .\themes\your_used_theme\js\order-opc.js rows 185-187 with url: callingFile + '?rand=' + new Date().getTime() + advApiParam, async: false, cache: false, and change row 186 to: "async: true" url: callingFile + '?rand=' + new Date().getTime() + advApiParam, async: true, cache: false, Then clear smarty caches, and take care of browser cache too.
  5. Same results you can accomplish by change settings in: Administration > Advanced parameters > Performance > Ciphering > Algorithm > "Use the custom BlowFish class" (switch from "Rijndael with mcrypt lib")
  6. Try this: https://github.com/PrestaShop/PrestaShop/pull/3854/files from: http://forge.prestashop.com/browse/PSCSX-6601 where you can find lot of "tips"
  7. Root of the problem is not one. It can be module Blocklayered, or in older versions product.js or product.tpl as many described. And it depends also on appearance of problem: if price 0,00 is on all products or just some, or if it is on homepage (featured, bestsellers,..), or categorie pages, or both, or on detail product page only. For my problem works idea of Phil_F: https://www.prestashop.com/forums/topic/207373-price-show-in-product-list-is-0/?p=1565101 Problem: after upgrade PS 1.6.0.13 to PS 1.6.1.1 some (not all) products has price 0,00 on homepage (featured, bestsellers,..) and categorie pages. When sorting by price are products sorted correctly as with real price, not with shown 0,00 value - this value was just bug for viewing. Problem lies in absence of default attribute combination assigned to product with attributes. In older PS it maybe was not problem. But new PS want to be more precise and strictly needs it. My investigation brought results: - problem lies in database (DB), but it was (maybe) bug in older flawed php script or in DB structure which is not perfectly abstract (values are repeated on more positions) - but it can be helpfull as it is, somehow, somewhere.. - older DB in PS 1.6.0.x has table 'ps_product_attribute_shop' without column 'id_product' - maybe values were operated and compared in some PHP - upgrade to PS 1.6.1.x comes with adding of this column and some new definitions of keys (and with other things too but this problem is not depending on it - in tables 'ps_product' and 'ps_product_shop' is column 'cache_default_attribute' but some products has value '0' (zero) in it. If product has some attributes and in this column '0' it produces this 0,00 problem. Even if attribute has no impact on price - if I remember correctly - so there are holes in system, and it produces our problem for some eshop. I think - this is not problem for new eshop started on PS 1.6.1.x, just for upgraded one from older version. Solutions for this definition of problem are two: 1. in Administration set default combination of attributes for product with bad price 0,00 in product lists, or change to other combination and then back, as described Phil_F 2. in DB toilsomely compare tables 'ps_product' and 'ps_product_shop' where 'cache_default_attribute' is '0' and try find in tables 'ps_product_attribute' and 'ps_product_attribute_shop' rows with same 'id_product' and change '0' to corresponding 'id_product_attribute' back in tables 'ps_product' and 'ps_product_shop'. Or write some script in PHP to make it for you Here is one I´ve made: psfix_set_default_attr.php
  8. .. after looong investigation and testing: in my case is problem in database table 'ps_configuration_lang' where localization from sql file with wrong 'id_configuration' values for second language was imported. So it was not about version or bug in files. It was 'typo infection' if sql is used for localization of many sities So for my case is this problem solved. But maybe not for all other written above... For compare wrong and repaired good data table check this image:
  9. Problem still remains. In PS 1.6.0.13 and 1.6.0.14 too. After changing number in Product name weight and saving form is there again empty field, or even worse - number is changed, but after refresh page or view page again through admin menu, (BO > Preferences > Search) is this field empty again. In database this field is not rewriten to new changed value but there is still old default 6 and also "date_upd" is zeroes. Other values, like PS_SEARCH_WEIGHT_REF and so on are changed correctly. PS_SEARCH_WEIGHT_PNAME is ignored and not on the form only. Searching on FO gives not exact results for searching product names. So in product indexing is this problem too. I´ve started issue: http://forge.prestashop.com/browse/PSCSX-5739
  10. Pattyo aké máš skúsenosti s CSS a HTML? Tieto veci treba zmeniť v CSS: 1. Zmeniť obrázok košíku (na moj vlastny v rovnakych rozmeroch) 2. Vycentrovať horizontal menu na stred ->nech obchodné podmienky začínajú viac na stred 3. Zmeniť slider nech je na celú šírku vid www.stussy.com/ 4. Dať na hlavnú stránku 3 produkty do radu (kedže v celom shope bude asi 16 produktov) zároveň zmenšiť priestor medzi produktami ako je zvýraznene modrou farbou a keby sa dalo tak aj odstranit ramceky co je zvyraznene cervenou farbou http://s15.postimg.o...r/V_st_i_ek.jpg A tieto stačí nastaveniami v Administrácii: 5. Presunúť dolný panel sledujete nás do horného pravého rohu http://s13.postimg.o...i/V_st_i_ek.jpg - možno ten modul nie je na to ale prispôsobený a bude odmietať byť umiestnený kde chceš - skús v Administrácia > Moduly > Pozície modulov (preklady v SK sa môžu líšiť, tak hľadaj podobné) a tam potom nájdi asi "Social networking block" ten treba premiestniť hore (ako sa to robí ale hľadaj v návode k PS, ten je fakt premakaný ale v angličtine) 7. Pri produkte www.ruksaky.cmeliak.sk/home/1-faded-short-sleeve-tshirts.html je to celé poprehadzovane takze dat text vedla obrazku a kosik niekdze medzi to - toto ti spôsobuje veľkosť obrázkov, ktorá ostala pôvodná z default šablóny - treba pregenerovať obrázky so zmenšením ako by ti vyhovovalo - to nastavíš a vygeneruješ v Administrácia > Predvoľby > Obrázky (zase - preklady v SK sa môžu líšiť, tak hľadaj podobné) - treba upraviť large_default (ten na stránke detailu produktu) z 458px na niečo menšie, daj pokusne aj o 100px menej - a podobne keď už si tam, zmenši aj home_default na 212px x 212px, toto ti pomôže na stránke so zoznamom produktov aspoň nech je obrázok celý v bloku, teraz pretŕča. - nakoniec na spodku týchto nastavení je "Nové náhľady obrázkov" a tam treba vygenerovať nanovo podľa nastavených veľkostí tie skupiny obrázkov. Zvoľ v "Zvoľte typ obrázkov" najprv tie prvé čo si menil nastavenie - "large_default", "Vymazať predchádzajúce obrázky" - nechaj na Áno, neboj, originály ostanú, mažú sa len nepotrebné staršie v tejto skupine. A daj ich vygenerovať kliknutím na "Nové náhľady obrázkov". Po chvíli ti to prebehne a oznámi že už sú. Potom daj vygenerovať podobne aj tie "home_default" A toto je tiež CSS ale nie je to tak, že obrázky sú po bokoch 6. Pridať po bokoch obrázky ako tuto garandbrand.cz/ To je pozadie natvrdo priradené cez CSS na <html> a vidieť len ľavý a pravý okraj lebo v strede je stránka kuk http://garandbrand.cz/themes/garandbrand/img/background.jpg Na to CSS netreba veľa času, ale ak v tom nie si doma, tak ti to možno niekto pomôže spraviť, no mne sa nedá, mám toho dosť cez deň )
  11. If you have in Backoffice > Advanced parameters > Performance activaded Cache and CCC (Combine, Compress and Cache) to Yes you should try to clear all cache files except Index.php in /cache/purifier/CSS/ in /cache/purifier/HTML/ in /cache/purifier/URI/ in /cache/smarty/cache/ in /cache/smarty/compile/ even in /themes/active-theme/cache/ and reload page with CTRL+F5
  12. But if you copy complete PS from Localhost to destination on real server, and your images are already imported, url of images are copied i database with localhost url. Not true? I´ve put relative url to img in source: <img src="../img/cms/0902.jpg" /> and to htaccess. I´ve added: RewriteRule ^(.*)/img/cms/(.*).(jpe?g|png|gif)$ %{ENV:REWRITEBASE}img/cms/$2.$3 [NC,L] before this: # Images But still be carefull to prestashop can change htaccess. This rule works on thet place, not before # ~~start~~ and not after # ~~end~~ Maybe it is not general solution. It worked for me, and not in multilanguage version (maybe..)
  13. You can make it work on 1.6 too. I´d started from post #15 in this topic, where Devein modified Chris2407 's first hack hack: http://www.prestashop.com/forums/topic/52019-change-currency-automatically-when-switching-from-one-language-to-another/?do=findComment&comment=910944 Full change to this modification maded for PS 1.5 is now applied to PS 1.6 ( I have 1.6.0.9 but it should work from 1.6.0.0 too ) 1. Make copy of ChangeCurrencyController.php to /override/controllers/front/ChangeCurrencyController.php find: $this->context->cookie->id_currency = (int)$currency->id; change to: $this->context->cookie->id_currency = (int)$currency->id; $this->context->cookie->id_currency_changed = 1; 2. Make copy of Tools.php to /override/classes/Tools.php in public static function switchLanguage find: $language = new Language($id_lang); change to: $language = new Language($id_lang); // added for hard currency linked switch switch($id_lang) { case 1: //if lang_id that's changed to currency id = 1 than... Tools::switchCurrencyLinked(1); break; case 2: Tools::switchCurrencyLinked(2); break; case 3: //and so on .... Tools::switchCurrencyLinked(3); break; } // Immediately after end of function public static function switchLanguage insert new function: /** * Change cookie currency with Language when hard currency linked switch - janoo * */ static public function switchCurrencyLinked($cookieLanguage) { global $cookie; if (! (int)$cookie->id_currency_changed) { $cookie->id_currency = $cookieLanguage; Tools::setCurrency($cookie); } else { $cookie->id_currency_changed = 0; } } Credits goes to Devein and Chris2407. I´d just modified idea to PS 1.6 But don´t forget: make second/third/... currency active! And parse id of language with id of currency precisely. I´d tested it correctly and it worked also in bankwire and similar payments. In bankwire is also currency changer built-in when more currencies are activated.
  14. This method is also working in PS 1.6 but with little modification: in choosen payment module php find: public function hookPayment($params) { if (!$this->active) return; ... ... and change to public function hookPayment($params) { if (!$this->active) return; // custom deactivation for CashOnPickup $id_carrier = (int)$this->context->cart->id_carrier; if (intval($id_carrier==3)) // use your choosen carrier id return; ... ... Id of carrier you can easy find in Administration (BO) > Shipping > Carriers
  15. for me it was not solution, but I´ve found .....themes\my-theme\js\modules\blocktopmenu\js\hoverIntent.js and I´ve modified // default configuration values var cfg = { interval: 100, sensitivity: 7, timeout: 0 }; to // default configuration values var cfg = { interval: 1, sensitivity: 1, timeout: 0 }; for quick response on hover
×
×
  • Create New...