Jump to content

Centurio

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Location
    Poland
  • Activity
    Freelancer

Centurio's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks a lot for your reply! I've tried to add this rule in this place, but now it gives 404 error. RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^zamowienie/krok1/$ index.php?controller=order&step=1 [NC,L] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
  2. I'm trying to make new rewrite rules for Prestashop cart so I've added one rule below Prestashop generated content and now it's giving me 404 error. What is my mistake in this code? # Added rules RewriteRule ^zamowienie/krok1/$ index.php?controller=order&step=1 [NC,L] Whole .htaccess # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/ $1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/ $2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE} img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+ \.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0- 9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/ $1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/x-font-woff .woff <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/vnd.microsoft.icon "access plus 1 year" ExpiresByType application/font-woff "access plus 1 year" ExpiresByType application/x-font-woff "access plus 1 year" ExpiresByType application/vnd.ms-fontobject "access plus 1 year" ExpiresByType font/opentype "access plus 1 year" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/otf "access plus 1 year" ExpiresByType application/x-font-ttf "access plus 1 year" ExpiresByType application/x-font-otf "access plus 1 year" </IfModule> FileETag INode MTime Size <IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript </IfModule> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # Added rules RewriteRule ^zamowienie/krok1/$ index.php?controller=order&step=1 [NC,L]
  3. Mam mały problem, otóż próbuję dodać do .htaccess (domyślnie wygenerowanego przez Prestę) rewrite rules by pozmieniać trochę linki w koszyku na ładniejsze (tzn. standardowo przepisują się te linki, ale jest np. zamówienie&step=1, dlatego chciałbym ten link też jakoś upiększyć). Patrząc po różnych źródłach w necie dodałem coś takiego: # Added rules RewriteRule ^zamowienie/krok1/$ index.php?controller=order&step=1 [NC,L] Niestety nie działa... Być może blokuje to jakaś wcześniejsza reguła z .htaccess? http://wklej.org/id/1623809/ - tutaj jest dostępna treść całego pliku.
  4. Hello! I've added to table 'ps_customers' new field called 'how_did_you_know'. Also I've made this field to display when user register his account. Everything goes fine, this value adds to database. The problem is that I wan't to display it now in back office in place marked on screen or somewhere else but on this page. https://www.dropbox.com/s/pp757pqwaavyz1k/Zrzut%20ekranu%202014-12-10%2019.44.59.png?dl=0 I was trying to add this in place where now is clients name, surname and his ID. In view.tpl this fields are displayed thanks to this: {$customer->firstname} {$customer->lastname} So I've tried to do the same with my field: {$customer->how_did_you_know} But unfortunately it didn't worked. All other fields from this table can be displayed this way, but not mine. So I've thought that I should declare this field somewhere, but where I have to do it? Thank you in advance for your time!
  5. Dodałem do tabeli ps_customers nowe pole. Wszystko się ładnie wyświetla i gdy użytkownik klika zapisz dodaje się ono również do bazy danych. Chciałbym teraz je wyświetlić, w miejscu zaznaczonym na screenie lub w innym, ale na tej podstronie: https://www.dropbox.com/s/pp757pqwaavyz1k/Zrzut%20ekranu%202014-12-10%2019.44.59.png?dl=0 Próbowałem natomiast dodać to pole w miejscu gdzie jest imię i nazwisko klienta oraz jego ID. W kodzie strony view.tpl było to mniej więcej ujęte w taki sposób: {$customer->firstname} {$customer->lastname}, dlatego próbowałem dodać własne pole {$customer->how_did_you_know}, ale niestety nie złapało. Wszystkie inne zmienne z tej tabeli się wyświetlają normalnie, dlatego podejrzewam, że trzeba będzie gdzieś zadeklarować istnienie tego pola. Gdzie powinienem to zrobić?
  6. Niestety mam problem z niektórymi tłumaczeniami, mianowicie część z nich się po prostu nie wyświetla. Sprawdzałem tłumaczenia w panelu administracyjnym jak i w plikach na FTP - wszystko się zgadza i odpowiednie frazy są przypisane do konkretnych zmiennych. Wyczyściłem cache, wyłączyłem go, kompilacja szablonu jest wymuszona, otwieram stronę w trybie prywatnym przeglądarki. W kodzie też wszystko wydaje się w porządku. Zupełnie nie wiem gdzie może leżeć problem. 1. Panel administracyjny: https://www.dropbox.com/s/zg3xhescficpvqh/Zrzut%20ekranu%202014-12-06%2014.20.10.png?dl=0 2. Strona sklepu: https://www.dropbox.com/s/7tay1q1bik0soql/Zrzut%20ekranu%202014-12-06%2014.16.57.png?dl=0 3. Kod podstrony: https://www.dropbox.com/s/tinmveli0022d4y/Zrzut%20ekranu%202014-12-06%2014.23.35.png?dl=0 Pozdrawiam!
×
×
  • Create New...