justrundesign Posted June 12, 2017 Share Posted June 12, 2017 Hej Chciałabym zaprogramowac moduł do wykorzystania na stronach CMS (jeśli to możliwe miec wybor na jedna specyficzna stronę CMS). Czy macie jakiś pomysł jak to zrobić? Presta 1.6. Link to comment Share on other sites More sharing options...
endriu107 Posted June 12, 2017 Share Posted June 12, 2017 W pliku cms.tpl dodać warunek sprawdzający id strony cms, i wewnątrz warunku hook wywołujący moduł jeśli id jest zgodne z id strony. Link to comment Share on other sites More sharing options...
justrundesign Posted June 12, 2017 Author Share Posted June 12, 2017 Ale wszystkie moje strony CMS maja to samo ID ? <body id="cms" .... Czy moge to inaczej skonfigurowac?? Link to comment Share on other sites More sharing options...
endriu107 Posted June 12, 2017 Share Posted June 12, 2017 Nie nie mają, wyłącz przyjazne linki w sklepie wejdź na strone cms i zobacz że w adresie url jest podane id z resztą to samo co w Preferencje > CMS tam też każda strona ma podane id. 1 Link to comment Share on other sites More sharing options...
justrundesign Posted June 13, 2017 Author Share Posted June 13, 2017 (edited) Dzieki Ambassadors! moj kod wyglada tak: {if $id_cms == '15'} {hook h='customCMS'} {/if} ale nie dziala , czy moja kondycja jest ok? Z gory dzieki za odp. Edited June 13, 2017 by justrundesign (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted June 13, 2017 Share Posted June 13, 2017 Zrób sobie dump $id_cms i zobacz co zwraca obstawiam że null, dlatego zrób też dla $cms i zobacz co ci zwraca id. P.S. Ambassadors to tylko plakietka oznaczająca funkcje/przynależność do grupy oficjalnych Ambasadorów PrestaShop, nick jest nieco wyżej Link to comment Share on other sites More sharing options...
justrundesign Posted June 13, 2017 Author Share Posted June 13, 2017 (edited) zrobilam dump dla $id_cms zwraca NULL zrobilam dump dla $cms zwraca array gdzie jest moje id 15 ["id"]=> int(15) potem znow zrobilam dump dla $id i tez zwraca NULL ! HELP Edited June 13, 2017 by justrundesign (see edit history) Link to comment Share on other sites More sharing options...
e_com Posted June 13, 2017 Share Posted June 13, 2017 Zmienna: {$cms->id} Przy multishop ID jest składanką ID strony + ID sklepu. 1 Link to comment Share on other sites More sharing options...
justrundesign Posted June 13, 2017 Author Share Posted June 13, 2017 (edited) Dzieki serdeczne E-Com!! i Ambassadors! Zwraca moje ID ==15 Edited June 13, 2017 by justrundesign (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now