Jump to content
  • 0

Problem z przyjaznymi linkami


mati010

Question

Witam, mam problem z przyjaznymi linkami. Produkty zostały duplikowane oraz zostały w nich wtedy zmieniane tytuły, zdjęcie itd.

Lecz teraz zauważyłem, że wszystkie linki są podobne do pierwotnego czyli:

28-nazwaproduktu1.html (pierwotny)

30-nazwaproduktu1.html (inny produkt)  i tak dalej...

Wiem, że mogę wchodzić do poszczególnych produktów w optymalizację seo i tam wygenerować prawidłowy nowy link, lecz jest tych produktów na prawdę dużo :( Czy istnieje jakiś sposób, aby automatycznie wygenerował sobie wszystkie linki na nowo? 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Witam, mam problem z przyjaznymi linkami. Produkty zostały duplikowane oraz zostały w nich wtedy zmieniane tytuły, zdjęcie itd.

Lecz teraz zauważyłem, że wszystkie linki są podobne do pierwotnego czyli:

28-nazwaproduktu1.html (pierwotny)

30-nazwaproduktu1.html (inny produkt)  i tak dalej...

Wiem, że mogę wchodzić do poszczególnych produktów w optymalizację seo i tam wygenerować prawidłowy nowy link, lecz jest tych produktów na prawdę dużo :( Czy istnieje jakiś sposób, aby automatycznie wygenerował sobie wszystkie linki na nowo? 

What kind of fields and clients we are talking about more exactly?

Link to comment
Share on other sites

  • 0

Jeśli masz dostęp bazy np przez phpmyadmin to powinno załatwić sprawę pod warunkiem, że masz tylko polskie znaki a nie np. umlauty:

update ps_product_lang set link_rewrite=replace(name,' ','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'(','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,')','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'.','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'/','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'%','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'+','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'!','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'@','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'$','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'^','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'&','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'*','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'_','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'=','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'[','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,']','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'{','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'}','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'|','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'~','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'`','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,':','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,';','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'"','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'<','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'>','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,',','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'?','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'\\','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'\'','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'--------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'-------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'-----','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'----','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'---','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'--','-');
update ps_product_lang set link_rewrite=lower(link_rewrite);
update ps_product_lang set link_rewrite=replace(link_rewrite,'ą','a');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ę','e');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ó','o');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ś','s');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ł','l');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ż','z');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ź','z');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ć','c');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ń','n');
  • Like 1
Link to comment
Share on other sites

  • 0

Rozumiem lecz w CSV muszę recznie ustawić nowe przyjazne linki. Sprawdzałem w bazie wszystkie są takie jak pisałem.

 

mozesz wyeksportować liste produktów, konkretnie pola:

id, nazwa

 

nastepnie w excelu zapodajesz makro na nowej kolumnie "link rewrite": https://www.extendoffice.com/documents/excel/939-excel-remove-non-alphanumeric-characters.html

i w ten oto sposob masz przyjazne linki, eskportujesz to do csv i importujesz w sklepie

Link to comment
Share on other sites

  • 0

 

Jeśli masz dostęp bazy np przez phpmyadmin to powinno załatwić sprawę pod warunkiem, że masz tylko polskie znaki a nie np. umlauty:

update ps_product_lang set link_rewrite=replace(name,' ','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'(','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,')','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'.','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'/','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'%','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'+','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'!','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'@','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'$','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'^','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'&','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'*','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'_','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'=','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'[','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,']','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'{','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'}','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'|','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'~','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'`','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,':','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,';','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'"','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'<','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'>','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,',','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'?','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'\\','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'\'','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'--------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'-------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'------','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'-----','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'----','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'---','-');
update ps_product_lang set link_rewrite=replace(link_rewrite,'--','-');
update ps_product_lang set link_rewrite=lower(link_rewrite);
update ps_product_lang set link_rewrite=replace(link_rewrite,'ą','a');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ę','e');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ó','o');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ś','s');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ł','l');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ż','z');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ź','z');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ć','c');
update ps_product_lang set link_rewrite=replace(link_rewrite,'ń','n');

 

Super zadziałało. Wielkie dzięki!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...