Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • First Name
  • Last Name

Recent Profile Visitors

229 profile views

limera1n's Achievements


Newbie (1/14)

  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare

Recent Badges



  1. Hi, my Prestashop started running out of memory when trying to edit products from the backoffice. Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) It happens to one, particular product. As for now - I haven't seen any other product with the same issue. The product does not have combinations, it is set up like "simple product". I tracked that problem is related with Symfony components: BaseType.php line 52, ChoiceType.php line 194 and FormType.php line 95. (based on error 500 message) I suspect it may be connected with product attributes, this query returns more than 500 results: SELECT p0_.id_attribute AS id_attribute_0, p0_.color AS color_1, p0_.position AS position_2, p1_.id_attribute_group AS id_attribute_group_3, p1_.position AS position_4, p2_.name AS name_5, p2_.public_name AS public_name_6, p0_.id_attribute AS id_attribute_7, p0_.color AS color_8, p0_.position AS position_9, p3_.name AS name_10 FROM ps_attribute p0_ INNER JOIN ps_attribute_group p1_ ON p0_.id_attribute_group = p1_.id_attribute_group INNER JOIN ps_attribute_shop p5_ ON p0_.id_attribute = p5_.id_attribute INNER JOIN ps_shop p4_ ON p4_.id_shop = p5_.id_shop INNER JOIN ps_attribute_lang p3_ ON p0_.id_attribute = p3_.id_attribute INNER JOIN ps_attribute_group_lang p2_ ON p1_.id_attribute_group = p2_.id_attribute_group WHERE p3_.id_lang = 1 AND p2_.id_lang = 1 AND p4_.id_shop = 1 ORDER BY position_9 ASC, position_4 ASC; Is it possible that 512MB of RAM for PHP (7.3) is not enough to display product edit page? Any idea what else can I check? Why it is happening to one product and the rest is just fine? (Already tried to empty /var/cache and disable all product related modules)
  2. Ok, nevermind, the problem was with some custom code that I had in my Presta before. I managed to prepare working module based on your solution and extend Manufacturer with 3 another fields, thank you @Daresh
  3. I have managed to add new field to Manufacturer edit screen by modifying hooks names ('Categories' keywords changed to 'Manufacturers' etc.), but still few more issues: [PrestaShop\PrestaShop\Core\Domain\Manufacturer\Exception\ManufacturerException kod 0]: Cannot update manufacturer with id "2" this is what I get after trying to update Manufacturer, Symfony debug shows nothing what is the best way to access these values from template level?
  4. Hi Daresh, thanks for this. I am just wondering if there are any replacement hooks (for example hookActionAdminCategoriesFormModifier) which I could use for Manufacturer. Presta 1.7 documentation is a joke 馃槙
  5. Hi all, I am using Presta, I would like to extend manufacturer object with few new text fields which I want to use in product page template later. Based on these docs: https://devdocs.prestashop.com/1.7/modules/concepts/templating/admin-views/ I created new file under this path: PRESTA_DIR/modules/extrafields/views/PrestaShop/Admin/Sell/Catalog/Manufacturer/Blocks/form.html.twig Inside of the file I put this code: {% extends 'PrestaShopBundle:Admin/Sell/Catalog/Manufacturer/Blocks:form.html.twig' %} {% block manufacturer_form_rest %} Hello world! {% endblock %} also, I created class override: PRESTA_DIR/override/classes/Manufacturer.php Inside of this file I put this code: <?php class Manufacturer extends ManufacturerCore { public $photo_url; public function __construct($id_manufacturer = null, $id_lang = null) { self::$definition['fields']['photo_url'] = array('type' => self::TYPE_STRING); parent::__construct($id_manufacturer, $id_lang); } } Basically - nothing works. I cannot see "Hello world!" on manufacturer editing screen. I understand that I should also take care of new column in database but first I would like to fix this issue. Do you have any experience with creating new fields for manufacturer on Presta 1.7? What else should I try?
  6. Problem namierzony, jak zwykle oczywiste przeoczenie. Okaza艂o si臋 偶e kopiowa艂em z艂y plik .tpl Kopiowa艂em plik z modu艂u kt贸ry jest "艂ysy" zamiast plik .tpl z szablonu kt贸ry ma podstawowe style i JS. Presta prawid艂owo wy艣wietla艂a szablon kt贸ry by艂 po prostu nieostylowany. Twoja pro艣ba o sprawdzenie kodu wynikowego mnie na to naprowadzi艂a, dzi臋ki, zamykam
  7. Opr贸cz wygl膮du nie "wykonuj膮" si臋 elementy silnika smarty, nie dzia艂aj膮 t艂umaczenia, nie wywo艂a艂 si臋 hook GDPR (brak checkboxa pod inputem) tak wygl膮da ca艂y kod szablonu blocknewsletter_home.tpl {* * 2007-2016 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2016 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <!-- Block Newsletter module--> <div id="newsletter_block_left" class="block"> <h4 class="title_block">{l s='Newsletter' mod='blocknewsletter'}</h4> <div class="block_content"> {if isset($msg) && $msg} <p class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</p> {/if} <form action="{$link->getPageLink('index', true)|escape:'html'}" method="post"> <p> <input class="inputNew" id="newsletter-input" type="text" name="email" size="18" value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}" /> <input type="submit" value="ok" class="button_mini" name="submitNewsletter" /> {hook h='displayGDPRConsent' id_module=$id_module} <input type="hidden" name="action" value="0" /> </p> </form> </div> </div> <!-- /Block Newsletter module--> <script type="text/javascript"> var placeholder = "{l s='your e-mail' mod='blocknewsletter' js=1}"; {literal} $(document).ready(function() { $('#newsletter-input').on({ focus: function() { if ($(this).val() == placeholder) { $(this).val(''); } }, blur: function() { if ($(this).val() == '') { $(this).val(placeholder); } } }); }); {/literal} </script> W pliku blocknewsletter.php: return $this->display(__FILE__, 'blocknewsletter_home.tpl'); u偶ycie nazwy blocknewsletter.tpl zamiast blocknewsletter_home.tpl naprawia problem i widok jest prawid艂owy (oba pliki - blocknewsletter.tpl oraz blocknewsletter_home.tpl s膮 takie same) Kompletnie nie mog臋 zrozumie膰 z czego wynika problem bior膮c pod uwag臋 偶e zmienia si臋 tylko nazwa pliku i nic poza tym error log jest pusty
  8. Wiesz w jaki spos贸b zmiana nazwy pliku .tpl mo偶e wp艂ywa膰 na zachowanie CSS na froncie?
  9. Hi all, in the old Presta store I need to take the newsletter module to the "displayHome" hook and rebuild it visually. In blocknewsletter.php I added: to the constructor: if (!$this->isRegisteredInHook('displayHome')){ $this->registerHook('displayHome'); } and: public function hookDisplayHome($params) { if (!isset($this->prepared) || !$this->prepared) $this->_prepareHook($params); $this->prepared = true; $this->smarty->assign(array('id_module' => $this->id)); return $this->display(__FILE__, 'blocknewsletter_home.tpl'); } For tests, I copied the default blocknewsletter.tpl template, saved it under the name blocknewsletter_home.tpl and kept in the same location as the default one, i.e. blocknewsletter\views\templates\hook The effect of adding _home to a .tpl file name ends with something like this: HTML is displayed, no PHP code is executed. using the old template name, without the _home ending - works fine: Renaming the .tpl file in the case of the default hook hookDisplayLeftColumn produces the same behavior. Can someone experienced suggest some solution? .Tpl filename changes require some extra action?
  10. Cze艣膰, na starym sklepie Presty potrzebuj臋 wynie艣膰 do hook'a "displayHome" modu艂 newsletter'a i przebudowa膰 go od strony wizualnej. W blocknewsletter.php doda艂em: do konstruktora: if (!$this->isRegisteredInHook('displayHome')){ $this->registerHook('displayHome'); } dalej: public function hookDisplayHome($params) { if (!isset($this->prepared) || !$this->prepared) $this->_prepareHook($params); $this->prepared = true; $this->smarty->assign(array('id_module' => $this->id)); return $this->display(__FILE__, 'blocknewsletter_home.tpl'); } Dla test贸w skopiowa艂em domy艣lny szablon blocknewsletter.tpl, zapisa艂em pod nazw膮 blocknewsletter_home.tpl i trzymam w tej samej lokacji co domy艣lny czyli blocknewsletter\views\templates\hook Efekt dodania do nazwy pliku .tpl ko艅c贸wki _home ko艅czy si臋 czym艣 takim: Wy艣wietla si臋 HTML, nie wykonuje si臋 kod PHP. u偶ycie starej nazwy, bez ko艅c贸wki _home dzia艂a prawid艂owo: Zmiana nazwy pliku .tpl w przypadku domy艣lnego hook'a czyli hookDisplayLeftColumn powoduje to samo zachowanie. Czy kto艣 do艣wiadczony mo偶e zasugerowa膰 jakie艣 rozwi膮zanie? Zmiany nazw plik贸w .tpl wymagaj膮 jakiego艣 dodatkowego dzia艂ania?
  11. W za艂膮czniku pliki jakie znalaz艂em na serwerze. te z ZIPa by艂y w fieldvmegamenu/uploads bridge.php by艂 w modules To ju偶 drugi atak tego typu, za pierwszym razem nawet wgrali sobie jak膮艣 fejkow膮 sitemape. Jest jeszcze screen jak widz膮 stron臋 boty, tu edytowali index.php g艂贸wny Desktop.zip bridge.php
  12. Hej, r贸wnie偶 zosta艂em zaatakowany t膮 metod膮 z tym 偶e nie mog臋 pobra膰 tej poprawionej wersji (pobiera si臋 dalej 1.0) a tw贸rca napisa艂 偶e maj膮 ferie i og贸lnie mam pisa膰 po 20 luego... Mo偶e kto艣 pom贸c? Potrzebuje za艂atanego modu艂u fieldvmegamenu i informacji gdzie jeszcze szuka膰 dorobionych backdor贸w
  13. Nie, nie, jeszcze raz: Jest podstrona z formularzem kontaktowym, po klikni臋ciu w "konakt z nami" Tam jest formularz i mapa, i na tej podstronie jest stopka, taka sama jak wsz臋dzie TYLKO 呕E Wsz臋dzie indziej a stornie uk艂ad html wygl膮da tak 偶e mamy diva z id PAGE i w nim 3 divy g艂贸wne czyli header, kolumny, stopka A na tej podstronie z kontaktem mam inaczej, jest div z id PAGE ale tylko 2 divy w nim - header i kolumny. Stopka zosta艂a "wci膮gni臋ta" do kolumn. I to tylko na tej podstronie. Rozwi膮za艂em ten problem JSem, ale i tak w sumie jestem ciekaw gdzie mo偶na zedytowa膰 to prawid艂owo
  14. Motyw domy艣lny - PS 1.6 Wie kto艣 jaki plik jest odpowiedzialny za generowanie strony z formularzem kontaktowym? (nie contact-form.tpl) Wsz臋dzie na sklepie jest dobrze tylko na formularzu kontaktowym stopka (header-container) wkleja mi si臋 do "collumns" przez co jest uci臋ta. Musz臋 przenie艣膰 diva ze stopk膮 jeden poziom wy偶ej do "page". Z uwagi na to 偶e tylko na tej jednej podstronie jest problem my艣l臋 偶e jest od tego jaki艣 osobny PHP. Wie kto艣 co艣 na ten temat? Je艣li nie w plikach to mo偶e gdzie艣 w bazie jest taki szablon?
  15. No w艂a艣nie, wcze艣niej te偶 zwr贸ci艂em na to uwag臋 ale patrzy艂em na z艂y wykres. Dzi臋ki, zwi臋kszy艂em limit i zobaczymy co sie b臋dzie dzia艂o! PS: przepraszam moderatora ale omy艂kowo klikn膮艂em REPORT
  • Create New...

Important Information

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