<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2720399798829058627</id><updated>2026-05-26T02:00:45.874+02:00</updated><category term="magento"/><category term="joomla"/><category term="Virtuemart 2.0"/><category term="programmazione joomla"/><category term="Facebook"/><category term="database EAV magento"/><category term="mysql"/><category term="Joomla 1.6"/><category term="magento SEO"/><category term="script magento"/><category term="seo"/><category term="JUpgrade"/><category term="Joomla 1.7"/><category term="apache"/><category term="cms"/><category term="database EAV"/><category term="esperto joomla"/><category term="integrazione joomla con script esterni"/><category term="invalid token"/><category term="joomla 3.5"/><category term="joomla 3.6"/><category term="joomla login"/><category term="joomla qr code"/><category term="joomladay"/><category term="magento design"/><category term="robots.txt"/><category term="url shortener"/><category term="wordpress"/><title type='text'>® Davide Taddei - programmatore esperto CMS / PHP / Wordpress</title><subtitle type='html'>realizzo moduli, componenti e plug-in di joomla li personalizzo e li sviluppo</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-3867340468828038122</id><published>2025-10-10T17:47:00.040+02:00</published><updated>2025-10-10T17:47:00.116+02:00</updated><title type='text'>Come tradurre le stringhe dei plugin? Ecco una soluzione definitiva</title><content type='html'>&lt;p&gt;Vi è mai capitato di non riuscire a tradurre una stringa di un plugin Wordpress perchè la funzione _e() si trova all&#39;interno di una funzione php non accessibile tramite un hook?&lt;/p&gt;&lt;p&gt;Sto sperimentando una soluzione molto efficace!&lt;/p&gt;&lt;p&gt;Ecco una classe per gestire le traduzioni dei plugin redirezionandole sul file .po del Vostro tema.&lt;/p&gt;&lt;p&gt;


&lt;/p&gt;&lt;div style=&quot;background: rgb(13, 17, 23); border-radius: 12px; border: 1px solid rgb(48, 54, 61); color: #e6edf3; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; overflow: auto; padding: 16px;&quot;&gt;
  &lt;div style=&quot;font-size: 12px; letter-spacing: 0.06em; margin-bottom: 8px; opacity: 0.7; text-transform: uppercase;&quot;&gt;PHP&lt;/div&gt;&lt;pre style=&quot;font-size: 14px; line-height: 1.55; margin: 0px; white-space: pre;&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #7ee787; font-style: italic;&quot;&gt;/**
 * Classe per reindirizzare le traduzioni WooCommerce al dominio del tema (myTheme).
 */&lt;/span&gt;
&lt;span style=&quot;color: #79c0ff;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #a5d6ff;&quot;&gt;MyTheme_Translations&lt;/span&gt; {

    &lt;span style=&quot;color: #7ee787; font-style: italic;&quot;&gt;/**
     * Dominio del tema da cui prendere le traduzioni.
     */&lt;/span&gt;
    &lt;span style=&quot;color: #79c0ff;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #ffa657;&quot;&gt;THEME_DOMAIN&lt;/span&gt; = &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;myTheme&#39;&lt;/span&gt;;

    &lt;span style=&quot;color: #7ee787; font-style: italic;&quot;&gt;/**
     * Domini di WooCommerce da intercettare.
     */&lt;/span&gt;
    &lt;span style=&quot;color: #79c0ff;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #ffa657;&quot;&gt;WC_DOMAINS&lt;/span&gt; = [
        &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;woocommerce&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;woocommerce-admin&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;woocommerce-payments&#39;&lt;/span&gt;,
    ];

    &lt;span style=&quot;color: #7ee787; font-style: italic;&quot;&gt;/**
     * Inizializza i filtri.
     */&lt;/span&gt;
    &lt;span style=&quot;color: #79c0ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #d29922;&quot;&gt;init&lt;/span&gt;(): &lt;span style=&quot;color: #79c0ff;&quot;&gt;void&lt;/span&gt; {
        &lt;span style=&quot;color: #d29922;&quot;&gt;add_filter&lt;/span&gt;(&lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;gettext&#39;&lt;/span&gt;, [&lt;span style=&quot;color: #ffa657;&quot;&gt;__CLASS__&lt;/span&gt;, &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;gettext&#39;&lt;/span&gt;], &lt;span style=&quot;color: #ffa657;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #ffa657;&quot;&gt;3&lt;/span&gt;);
        &lt;span style=&quot;color: #d29922;&quot;&gt;add_filter&lt;/span&gt;(&lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;gettext_with_context&#39;&lt;/span&gt;, [&lt;span style=&quot;color: #ffa657;&quot;&gt;__CLASS__&lt;/span&gt;, &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;gettext_with_context&#39;&lt;/span&gt;], &lt;span style=&quot;color: #ffa657;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #ffa657;&quot;&gt;4&lt;/span&gt;);
        &lt;span style=&quot;color: #d29922;&quot;&gt;add_filter&lt;/span&gt;(&lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;ngettext&#39;&lt;/span&gt;, [&lt;span style=&quot;color: #ffa657;&quot;&gt;__CLASS__&lt;/span&gt;, &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;ngettext&#39;&lt;/span&gt;], &lt;span style=&quot;color: #ffa657;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #ffa657;&quot;&gt;5&lt;/span&gt;);
        &lt;span style=&quot;color: #d29922;&quot;&gt;add_filter&lt;/span&gt;(&lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;ngettext_with_context&#39;&lt;/span&gt;, [&lt;span style=&quot;color: #ffa657;&quot;&gt;__CLASS__&lt;/span&gt;, &lt;span style=&quot;color: #e9d26c;&quot;&gt;&#39;ngettext_with_context&#39;&lt;/span&gt;], &lt;span style=&quot;color: #ffa657;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #ffa657;&quot;&gt;6&lt;/span&gt;);
    }

    &lt;span style=&quot;color: #79c0ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #d29922;&quot;&gt;gettext&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;) {
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #d29922;&quot;&gt;in_array&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;WC_DOMAINS&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;true&lt;/span&gt;)) {
            &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
        }

        &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; = &lt;span style=&quot;color: #d29922;&quot;&gt;translate&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;THEME_DOMAIN&lt;/span&gt;);
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; (&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;) ? &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; : &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
    }

    &lt;span style=&quot;color: #79c0ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #d29922;&quot;&gt;gettext_with_context&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$context&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;) {
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #d29922;&quot;&gt;in_array&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;WC_DOMAINS&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;true&lt;/span&gt;)) {
            &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
        }

        &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; = &lt;span style=&quot;color: #d29922;&quot;&gt;translate_with_gettext_context&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$context&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;THEME_DOMAIN&lt;/span&gt;);
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; (&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$text&lt;/span&gt;) ? &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; : &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
    }

    &lt;span style=&quot;color: #79c0ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #d29922;&quot;&gt;ngettext&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$number&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;) {
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #d29922;&quot;&gt;in_array&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;WC_DOMAINS&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;true&lt;/span&gt;)) {
            &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
        }

        &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; = &lt;span style=&quot;color: #d29922;&quot;&gt;translate_nooped_plural&lt;/span&gt;([&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;], &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$number&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;THEME_DOMAIN&lt;/span&gt;);
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; (&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;) ? &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; : &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
    }

    &lt;span style=&quot;color: #79c0ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #79c0ff;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #d29922;&quot;&gt;ngettext_with_context&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$number&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$context&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;) {
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #d29922;&quot;&gt;in_array&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$domain&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;WC_DOMAINS&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;true&lt;/span&gt;)) {
            &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
        }

        &lt;span style=&quot;color: #7ee787;&quot;&gt;// _nx() gestisce plural + context.&lt;/span&gt;
        &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; = &lt;span style=&quot;color: #d29922;&quot;&gt;_nx&lt;/span&gt;(&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$number&lt;/span&gt;, &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$context&lt;/span&gt;, &lt;span style=&quot;color: #79c0ff;&quot;&gt;self&lt;/span&gt;::&lt;span style=&quot;color: #ffa657;&quot;&gt;THEME_DOMAIN&lt;/span&gt;);
        &lt;span style=&quot;color: #79c0ff;&quot;&gt;return&lt;/span&gt; (&lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$single&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; !== &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$plural&lt;/span&gt;) ? &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$alt&lt;/span&gt; : &lt;span style=&quot;color: #d2a8ff;&quot;&gt;$translated&lt;/span&gt;;
    }
}

&lt;span style=&quot;color: #7ee787;&quot;&gt;// Avvia la classe&lt;/span&gt;
&lt;span style=&quot;color: #a5d6ff;&quot;&gt;MyTheme_Translations&lt;/span&gt;::&lt;span style=&quot;color: #d29922;&quot;&gt;init&lt;/span&gt;();&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Cos&#39;è e a cosa serve&lt;/h4&gt;&lt;p&gt;La classe MyTheme_Translations reindirizza le traduzioni di WooCommerce al text domain del tema (myTheme). In pratica, se nel tuo tema hai file di traduzione (.po/.mo) con stringhe alternative, la classe fa in modo che WooCommerce usi quelle al posto delle sue predefinite—senza toccare i file di WooCommerce.&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Come funziona&lt;/h4&gt;&lt;p&gt;Aggancia i filtri di WordPress per la localizzazione: gettext, gettext_with_context, ngettext, ngettext_with_context.&lt;/p&gt;&lt;p&gt;Intercetta solo i domini: woocommerce, woocommerce-admin, woocommerce-payments (puoi configurarli in WC_DOMAINS).&lt;/p&gt;&lt;p&gt;Per ogni stringa intercettata:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;prova a ritradurla usando il dominio del tema (myTheme);&lt;/li&gt;&lt;li&gt;se trova un’alternativa diversa, la restituisce;&lt;/li&gt;&lt;li&gt;altrimenti lascia la traduzione originale di WooCommerce (fallback sicuro).&lt;/li&gt;&lt;li&gt;Gestisce correttamente contesto e plurali (es. _nx()).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Perché è utile&lt;/h4&gt;&lt;p&gt;In questo modo centralizzi gli override delle stringhe di WooCommerce (o di qualsiasi altro plugin) nel tuo tema (o child-theme), eviti di modificare o “forkare” i file di traduzione di WooCommerce e mantieni la compatibilità con aggiornamenti e supporti plurali/contesti perchè non sei costretto modificare il codice del plugin.&lt;/p&gt;&lt;p&gt;La costante&amp;nbsp;&lt;span style=&quot;color: #ffa657; font-size: 14px;&quot;&gt;WC_DOMAINS&amp;nbsp;&lt;/span&gt;Non tocca stringhe di altri plugin/temi fuori dai domini elencati, naturalmente potete rinominarla come preferite e aggiungere i valori che volete.&lt;/p&gt;&lt;p&gt;Non cambia nulla se nel tema manca la traduzione alternativa.&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Requisito fondamentale!&lt;/h4&gt;&lt;p&gt;Il tema deve caricare il proprio text domain (es. load_theme_textdomain(&#39;myTheme&#39;, get_template_directory() . &#39;/languages&#39;);).&lt;/p&gt;&lt;p&gt;Le stringhe da sovrascrivere devono essere presenti nei file /languages/myTheme-XX_YY.mo del tema.&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Come usarla&lt;/h4&gt;&lt;p&gt;Includi la classe (ad es. nel functions.php o in un piccolo plugin) e chiama MyTheme_Translations::init();.&lt;/p&gt;&lt;p&gt;Se usi un text domain reale diverso da myTheme, aggiorna la costante THEME_DOMAIN.&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Un piccolo consiglio&lt;/h4&gt;&lt;p&gt;Se hai problemi di performance con il tuo sito e cerchi un servizio di hosting che supporta sistemi di cache lato infrastruttura come Redis, Memcached o Varnish, ti consiglio questo servizio di hosting:&lt;/p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://www.cloudways.com/en/wordpress-hosting.php?id=301353&amp;amp;a_bid=19515e01&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;Load WordPress Sites in as fast as 37ms!&quot; height=&quot;280&quot; src=&quot;https://www.cloudways.com/affiliate/accounts/default1/banners/19515e01.jpg&quot; title=&quot;Load WordPress Sites in as fast as 37ms!&quot; width=&quot;336&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/3867340468828038122/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2025/10/come-tradurre-le-stringhe-dei-plugin.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3867340468828038122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3867340468828038122'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2025/10/come-tradurre-le-stringhe-dei-plugin.html' title='Come tradurre le stringhe dei plugin? Ecco una soluzione definitiva'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-3196171672001564079</id><published>2025-09-27T17:41:00.005+02:00</published><updated>2025-09-27T17:46:06.849+02:00</updated><title type='text'>Siti multilingua in Wordpress e performance</title><content type='html'>&lt;p&gt;Wordpress non gestisce nativamente la funzionalità multilingua ma è possibile realizzare il sito vs sito in più lingue utilizzando vari approcci differenti:&lt;/p&gt;&lt;h2 data-end=&quot;65&quot; data-start=&quot;44&quot;&gt;Approcci possibili&lt;/h2&gt;&lt;ol data-end=&quot;1601&quot; data-start=&quot;67&quot;&gt;&lt;li data-end=&quot;485&quot; data-start=&quot;67&quot;&gt;&lt;p data-end=&quot;485&quot; data-start=&quot;70&quot;&gt;&lt;strong data-end=&quot;114&quot; data-start=&quot;70&quot;&gt;Multisite (una installazione per lingua)&lt;/strong&gt;&lt;br data-end=&quot;117&quot; data-start=&quot;114&quot; /&gt;Crei un network WordPress e un “sito” per ogni lingua (es.&amp;nbsp;&lt;code data-end=&quot;195&quot; data-start=&quot;179&quot;&gt;example.com/it&lt;/code&gt;,&amp;nbsp;&lt;code data-end=&quot;213&quot; data-start=&quot;197&quot;&gt;example.com/en&lt;/code&gt;).&lt;br data-end=&quot;218&quot; data-start=&quot;215&quot; /&gt;&lt;strong data-end=&quot;229&quot; data-start=&quot;221&quot;&gt;Pro:&lt;/strong&gt;&amp;nbsp;isolamento pulito dei contenuti, performance prevedibili, permessi separati, plugin/tema configurabili per lingua.&lt;br data-end=&quot;347&quot; data-start=&quot;344&quot; /&gt;&lt;strong data-end=&quot;361&quot; data-start=&quot;350&quot;&gt;Contro:&lt;/strong&gt;&amp;nbsp;manutenzione più articolata (backup, utenti, plugin), relazioni tra contenuti manuali se non supportate da plugin dedicati.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1066&quot; data-start=&quot;487&quot;&gt;&lt;p data-end=&quot;608&quot; data-start=&quot;490&quot;&gt;&lt;strong data-end=&quot;528&quot; data-start=&quot;490&quot;&gt;Plugin multilingua su singolo sito&lt;/strong&gt;&lt;br data-end=&quot;531&quot; data-start=&quot;528&quot; /&gt;Tutte le lingue convivono nella stessa installazione. Opzioni più diffuse:&lt;/p&gt;&lt;ul data-end=&quot;1066&quot; data-start=&quot;612&quot;&gt;&lt;li data-end=&quot;710&quot; data-start=&quot;612&quot;&gt;&lt;p data-end=&quot;710&quot; data-start=&quot;614&quot;&gt;&lt;strong data-end=&quot;627&quot; data-start=&quot;614&quot;&gt;Polylang:&lt;/strong&gt;&amp;nbsp;leggero, ottimo per blog/siti corporate; estensione a pagamento per WooCommerce.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;798&quot; data-start=&quot;714&quot;&gt;&lt;p data-end=&quot;798&quot; data-start=&quot;716&quot;&gt;&lt;strong data-end=&quot;725&quot; data-start=&quot;716&quot;&gt;WPML:&lt;/strong&gt;&amp;nbsp;completo, include traduzione stringhe, media, workflow; più “pesante”.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1066&quot; data-start=&quot;802&quot;&gt;&lt;p data-end=&quot;1066&quot; data-start=&quot;804&quot;&gt;&lt;strong data-end=&quot;823&quot; data-start=&quot;804&quot;&gt;TranslatePress:&lt;/strong&gt;&amp;nbsp;traduzione visuale dal front-end, supporto MT (da rivedere/redigere).&lt;br data-end=&quot;896&quot; data-start=&quot;893&quot; /&gt;&lt;strong data-end=&quot;907&quot; data-start=&quot;899&quot;&gt;Pro:&lt;/strong&gt;&amp;nbsp;una sola installazione da gestire, linking tra traduzioni semplice.&lt;br data-end=&quot;978&quot; data-start=&quot;975&quot; /&gt;&lt;strong data-end=&quot;992&quot; data-start=&quot;981&quot;&gt;Contro:&lt;/strong&gt;&amp;nbsp;lock-in da plugin, possibili impatti su performance in siti molto grandi.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1346&quot; data-start=&quot;1068&quot;&gt;&lt;p data-end=&quot;1346&quot; data-start=&quot;1071&quot;&gt;&lt;strong data-end=&quot;1133&quot; data-start=&quot;1071&quot;&gt;Multisite + plugin di collegamento (es. MultilingualPress)&lt;/strong&gt;&lt;br data-end=&quot;1136&quot; data-start=&quot;1133&quot; /&gt;Ibrido: benefici di Multisite con collegamento “nativo” tra versioni tradotte.&lt;br data-end=&quot;1220&quot; data-start=&quot;1217&quot; /&gt;&lt;strong data-end=&quot;1231&quot; data-start=&quot;1223&quot;&gt;Pro:&lt;/strong&gt;&amp;nbsp;scalabilità, nessun contenuto duplicato nel DB di un solo sito.&lt;br data-end=&quot;1298&quot; data-start=&quot;1295&quot; /&gt;&lt;strong data-end=&quot;1312&quot; data-start=&quot;1301&quot;&gt;Contro:&lt;/strong&gt;&amp;nbsp;costo/licenza, setup più tecnico.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1601&quot; data-start=&quot;1348&quot;&gt;&lt;p data-end=&quot;1601&quot; data-start=&quot;1351&quot;&gt;&lt;strong data-end=&quot;1372&quot; data-start=&quot;1351&quot;&gt;Headless/Jamstack&lt;/strong&gt;&lt;br data-end=&quot;1375&quot; data-start=&quot;1372&quot; /&gt;WordPress solo come CMS; front-end (Next.js/Nuxt) gestisce i18n.&lt;br data-end=&quot;1445&quot; data-start=&quot;1442&quot; /&gt;&lt;strong data-end=&quot;1456&quot; data-start=&quot;1448&quot;&gt;Pro:&lt;/strong&gt;&amp;nbsp;massima libertà su UX/performance, routing i18n su misura.&lt;br data-end=&quot;1518&quot; data-start=&quot;1515&quot; /&gt;&lt;strong data-end=&quot;1532&quot; data-start=&quot;1521&quot;&gt;Contro:&lt;/strong&gt;&amp;nbsp;richiede team con competenze da sviluppo front-end moderno e DevOps.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr data-end=&quot;1606&quot; data-start=&quot;1603&quot; /&gt;&lt;h2 data-end=&quot;1648&quot; data-start=&quot;1608&quot;&gt;Come scegliere (decision quick-guide)&lt;/h2&gt;&lt;ul data-end=&quot;1974&quot; data-start=&quot;1650&quot;&gt;&lt;li data-end=&quot;1721&quot; data-start=&quot;1650&quot;&gt;&lt;p data-end=&quot;1721&quot; data-start=&quot;1652&quot;&gt;&lt;strong data-end=&quot;1692&quot; data-start=&quot;1652&quot;&gt;Sito piccolo/medio senza e-commerce:&lt;/strong&gt;&amp;nbsp;Polylang o TranslatePress.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1807&quot; data-start=&quot;1722&quot;&gt;&lt;p data-end=&quot;1807&quot; data-start=&quot;1724&quot;&gt;&lt;strong data-end=&quot;1774&quot; data-start=&quot;1724&quot;&gt;Sito complesso o con molto flusso redazionale:&lt;/strong&gt;&amp;nbsp;WPML (workflow, TM, stringhe).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1903&quot; data-start=&quot;1808&quot;&gt;&lt;p data-end=&quot;1903&quot; data-start=&quot;1810&quot;&gt;&lt;strong data-end=&quot;1858&quot; data-start=&quot;1810&quot;&gt;Portale enterprise o network di brand/paesi:&lt;/strong&gt;&amp;nbsp;Multisite (con o senza MultilingualPress).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1974&quot; data-start=&quot;1904&quot;&gt;&lt;p data-end=&quot;1974&quot; data-start=&quot;1906&quot;&gt;&lt;strong data-end=&quot;1964&quot; data-start=&quot;1906&quot;&gt;Team con skill React e focus performance/SEO avanzata:&lt;/strong&gt;&amp;nbsp;Headless.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;1979&quot; data-start=&quot;1976&quot; /&gt;&lt;h2 data-end=&quot;2018&quot; data-start=&quot;1981&quot;&gt;Struttura URL e SEO internazionale&lt;/h2&gt;&lt;ul data-end=&quot;2826&quot; data-start=&quot;2020&quot;&gt;&lt;li data-end=&quot;2199&quot; data-start=&quot;2020&quot;&gt;&lt;p data-end=&quot;2199&quot; data-start=&quot;2022&quot;&gt;&lt;strong data-end=&quot;2048&quot; data-start=&quot;2022&quot;&gt;Struttura consigliata:&lt;/strong&gt;&amp;nbsp;sottocartelle per lingua (&lt;code data-end=&quot;2081&quot; data-start=&quot;2075&quot;&gt;/it/&lt;/code&gt;,&amp;nbsp;&lt;code data-end=&quot;2089&quot; data-start=&quot;2083&quot;&gt;/en/&lt;/code&gt;, …). In alternativa sottodomini (&lt;code data-end=&quot;2139&quot; data-start=&quot;2123&quot;&gt;it.example.com&lt;/code&gt;) o domini ccTLD. Mantieni&amp;nbsp;&lt;strong data-end=&quot;2188&quot; data-start=&quot;2166&quot;&gt;una sola strategia&lt;/strong&gt;&amp;nbsp;ovunque.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2390&quot; data-start=&quot;2200&quot;&gt;&lt;p data-end=&quot;2390&quot; data-start=&quot;2202&quot;&gt;&lt;strong data-end=&quot;2217&quot; data-start=&quot;2202&quot;&gt;&lt;code data-end=&quot;2214&quot; data-start=&quot;2204&quot;&gt;hreflang&lt;/code&gt;:&lt;/strong&gt;&amp;nbsp;obbligatorio per evitare contenuti duplicati tra lingue e far capire a Google la variante corretta. I plugin citati lo gestiscono; verifica anche la versione “x-default”.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2464&quot; data-start=&quot;2391&quot;&gt;&lt;p data-end=&quot;2464&quot; data-start=&quot;2393&quot;&gt;&lt;strong data-end=&quot;2416&quot; data-start=&quot;2393&quot;&gt;Sitemap per lingua:&lt;/strong&gt;&amp;nbsp;meglio separare ed elencarle in&amp;nbsp;&lt;code data-end=&quot;2461&quot; data-start=&quot;2449&quot;&gt;robots.txt&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2560&quot; data-start=&quot;2465&quot;&gt;&lt;p data-end=&quot;2560&quot; data-start=&quot;2467&quot;&gt;&lt;strong data-end=&quot;2499&quot; data-start=&quot;2467&quot;&gt;Slug, title e meta tradotti:&lt;/strong&gt;&amp;nbsp;non lasciare slugs inglesi su pagine italiane e viceversa.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2722&quot; data-start=&quot;2561&quot;&gt;&lt;p data-end=&quot;2722&quot; data-start=&quot;2563&quot;&gt;&lt;strong data-end=&quot;2608&quot; data-start=&quot;2563&quot;&gt;Redirect iniziale per lingua del browser:&lt;/strong&gt;&amp;nbsp;se lo usi, fallo&amp;nbsp;&lt;strong data-end=&quot;2652&quot; data-start=&quot;2626&quot;&gt;solo alla prima visita&lt;/strong&gt;, salva preferenza (cookie) e non indicizzare la pagina di redirect.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2826&quot; data-start=&quot;2723&quot;&gt;&lt;p data-end=&quot;2826&quot; data-start=&quot;2725&quot;&gt;&lt;strong data-end=&quot;2759&quot; data-start=&quot;2725&quot;&gt;Contenuti davvero localizzati:&lt;/strong&gt;&amp;nbsp;evita traduzioni “letterali”; adatta esempi, misure, valute, date.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;2831&quot; data-start=&quot;2828&quot; /&gt;&lt;h2 data-end=&quot;2856&quot; data-start=&quot;2833&quot;&gt;Note per WooCommerce&lt;/h2&gt;&lt;ul data-end=&quot;3469&quot; data-start=&quot;2858&quot;&gt;&lt;li data-end=&quot;3044&quot; data-start=&quot;2858&quot;&gt;&lt;p data-end=&quot;3044&quot; data-start=&quot;2860&quot;&gt;&lt;strong data-end=&quot;2880&quot; data-start=&quot;2860&quot;&gt;Lingua ≠ valuta:&lt;/strong&gt;&amp;nbsp;valuta, tasse e spedizioni possono variare per paese, non solo per lingua. Valuta e tasse vanno gestite con plugin specifici (multi-currency, geolocalizzazione).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3159&quot; data-start=&quot;3045&quot;&gt;&lt;p data-end=&quot;3159&quot; data-start=&quot;3047&quot;&gt;&lt;strong data-end=&quot;3072&quot; data-start=&quot;3047&quot;&gt;Prodotti e attributi:&lt;/strong&gt;&amp;nbsp;traduci titoli, descrizioni,&amp;nbsp;&lt;strong data-end=&quot;3125&quot; data-start=&quot;3102&quot;&gt;attributi e termini&lt;/strong&gt;&amp;nbsp;(paio/pack, taglie, materiali).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3246&quot; data-start=&quot;3160&quot;&gt;&lt;p data-end=&quot;3246&quot; data-start=&quot;3162&quot;&gt;&lt;strong data-end=&quot;3191&quot; data-start=&quot;3162&quot;&gt;URL prodotto e categorie:&lt;/strong&gt;&amp;nbsp;traduci slug e ricontrolla i 301 se cambi struttura.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3334&quot; data-start=&quot;3247&quot;&gt;&lt;p data-end=&quot;3334&quot; data-start=&quot;3249&quot;&gt;&lt;strong data-end=&quot;3273&quot; data-start=&quot;3249&quot;&gt;Email transazionali:&lt;/strong&gt;&amp;nbsp;predisponi template per lingua (ordine, spedizione, resi).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3469&quot; data-start=&quot;3335&quot;&gt;&lt;p data-end=&quot;3469&quot; data-start=&quot;3337&quot;&gt;&lt;strong data-end=&quot;3358&quot; data-start=&quot;3337&quot;&gt;Ricerca e filtri:&lt;/strong&gt;&amp;nbsp;assicurati che l’indice (es. Elastic/Algolia) sia separato per lingua o includa il campo lingua nei documenti.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;3474&quot; data-start=&quot;3471&quot; /&gt;&lt;h2 data-end=&quot;3501&quot; data-start=&quot;3476&quot;&gt;Workflow di traduzione&lt;/h2&gt;&lt;ul data-end=&quot;3904&quot; data-start=&quot;3503&quot;&gt;&lt;li data-end=&quot;3565&quot; data-start=&quot;3503&quot;&gt;&lt;p data-end=&quot;3565&quot; data-start=&quot;3505&quot;&gt;&lt;strong data-end=&quot;3535&quot; data-start=&quot;3505&quot;&gt;Glossario e guida di stile&lt;/strong&gt;&amp;nbsp;per coerenza terminologica.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3663&quot; data-start=&quot;3566&quot;&gt;&lt;p data-end=&quot;3663&quot; data-start=&quot;3568&quot;&gt;&lt;strong data-end=&quot;3588&quot; data-start=&quot;3568&quot;&gt;Processo a step:&lt;/strong&gt;&amp;nbsp;bozza → traduzione → revisione → QA (link, moduli, formati numeri/date).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3781&quot; data-start=&quot;3664&quot;&gt;&lt;p data-end=&quot;3781&quot; data-start=&quot;3666&quot;&gt;&lt;strong data-end=&quot;3694&quot; data-start=&quot;3666&quot;&gt;Stringhe di tema/plugin:&lt;/strong&gt;&amp;nbsp;usa&amp;nbsp;&lt;code data-end=&quot;3708&quot; data-start=&quot;3699&quot;&gt;.po/.mo&lt;/code&gt;&amp;nbsp;(Loco Translate) o il modulo “String Translation” del tuo plugin i18n.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3904&quot; data-start=&quot;3782&quot;&gt;&lt;p data-end=&quot;3904&quot; data-start=&quot;3784&quot;&gt;&lt;strong data-end=&quot;3794&quot; data-start=&quot;3784&quot;&gt;Media:&lt;/strong&gt;&amp;nbsp;valuta se duplicare o riutilizzare; in molti casi le stesse immagini bastano, ma cura i testi ALT per lingua.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;3909&quot; data-start=&quot;3906&quot; /&gt;&lt;h2 data-end=&quot;3935&quot; data-start=&quot;3911&quot;&gt;Performance e caching&lt;/h2&gt;&lt;ul data-end=&quot;4240&quot; data-start=&quot;3937&quot;&gt;&lt;li data-end=&quot;4051&quot; data-start=&quot;3937&quot;&gt;&lt;p data-end=&quot;4051&quot; data-start=&quot;3939&quot;&gt;&lt;strong data-end=&quot;3960&quot; data-start=&quot;3939&quot;&gt;Cache per lingua:&lt;/strong&gt;&amp;nbsp;varia la cache per path (&lt;code data-end=&quot;3992&quot; data-start=&quot;3986&quot;&gt;/it/&lt;/code&gt;,&amp;nbsp;&lt;code data-end=&quot;4000&quot; data-start=&quot;3994&quot;&gt;/en/&lt;/code&gt;) e per cookie se usi redirect alla prima visita.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4121&quot; data-start=&quot;4052&quot;&gt;&lt;p data-end=&quot;4121&quot; data-start=&quot;4054&quot;&gt;&lt;strong data-end=&quot;4062&quot; data-start=&quot;4054&quot;&gt;CDN:&lt;/strong&gt;&amp;nbsp;regole di purge e invalidation consapevoli della lingua.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4240&quot; data-start=&quot;4122&quot;&gt;&lt;p data-end=&quot;4240&quot; data-start=&quot;4124&quot;&gt;&lt;strong data-end=&quot;4144&quot; data-start=&quot;4124&quot;&gt;Ricorda il Vary:&lt;/strong&gt;&amp;nbsp;evita di variare su&amp;nbsp;&lt;code data-end=&quot;4182&quot; data-start=&quot;4165&quot;&gt;Accept-Language&lt;/code&gt;&amp;nbsp;lato server quando non serve, per non esplodere la cache.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;4245&quot; data-start=&quot;4242&quot; /&gt;&lt;h2 data-end=&quot;4275&quot; data-start=&quot;4247&quot;&gt;Checklist di avvio rapido&lt;/h2&gt;&lt;ol data-end=&quot;4653&quot; data-start=&quot;4277&quot;&gt;&lt;li data-end=&quot;4325&quot; data-start=&quot;4277&quot;&gt;&lt;p data-end=&quot;4325&quot; data-start=&quot;4280&quot;&gt;Scegli struttura URL e plugin/architettura.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4367&quot; data-start=&quot;4326&quot;&gt;&lt;p data-end=&quot;4367&quot; data-start=&quot;4329&quot;&gt;Definisci lingue, glossario e stile.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4419&quot; data-start=&quot;4368&quot;&gt;&lt;p data-end=&quot;4419&quot; data-start=&quot;4371&quot;&gt;Imposta&amp;nbsp;&lt;code data-end=&quot;4389&quot; data-start=&quot;4379&quot;&gt;hreflang&lt;/code&gt;, sitemap per lingua e meta.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4467&quot; data-start=&quot;4420&quot;&gt;&lt;p data-end=&quot;4467&quot; data-start=&quot;4423&quot;&gt;Traduci menu, widget, footer, form, email.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4505&quot; data-start=&quot;4468&quot;&gt;&lt;p data-end=&quot;4505&quot; data-start=&quot;4471&quot;&gt;Traduci slugs e controlla i 301.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4542&quot; data-start=&quot;4506&quot;&gt;&lt;p data-end=&quot;4542&quot; data-start=&quot;4509&quot;&gt;Configura cache/CDN per lingua.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4600&quot; data-start=&quot;4543&quot;&gt;&lt;p data-end=&quot;4600&quot; data-start=&quot;4546&quot;&gt;QA completo (contenuti, moduli, pagamenti, ricerca).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4653&quot; data-start=&quot;4601&quot;&gt;&lt;p data-end=&quot;4653&quot; data-start=&quot;4604&quot;&gt;Monitora Search Console per ogni lingua/property.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr data-end=&quot;4658&quot; data-start=&quot;4655&quot; /&gt;&lt;h2 data-end=&quot;4687&quot; data-start=&quot;4660&quot;&gt;Errori comuni da evitare&lt;/h2&gt;&lt;ul data-end=&quot;4954&quot; data-start=&quot;4689&quot;&gt;&lt;li data-end=&quot;4744&quot; data-start=&quot;4689&quot;&gt;&lt;p data-end=&quot;4744&quot; data-start=&quot;4691&quot;&gt;Mescolare sottocartelle e sottodomini senza motivo.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4781&quot; data-start=&quot;4745&quot;&gt;&lt;p data-end=&quot;4781&quot; data-start=&quot;4747&quot;&gt;Lasciare meta/slug non tradotti.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4868&quot; data-start=&quot;4782&quot;&gt;&lt;p data-end=&quot;4868&quot; data-start=&quot;4784&quot;&gt;Redirect forzato ad ogni visita (esperienza pessima + problemi di indicizzazione).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4906&quot; data-start=&quot;4869&quot;&gt;&lt;p data-end=&quot;4906&quot; data-start=&quot;4871&quot;&gt;Non separare la cache per lingua.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4954&quot; data-start=&quot;4907&quot;&gt;&lt;p data-end=&quot;4954&quot; data-start=&quot;4909&quot;&gt;Affidarsi solo alla MT senza revisione umana.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;4959&quot; data-start=&quot;4956&quot; /&gt;&lt;p&gt;&lt;/p&gt;&lt;h1&gt;Performance&lt;/h1&gt;&lt;p data-end=&quot;5178&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4961&quot;&gt;Un unico sito multilingua rispetto ad un&#39;installazione network può creare problemi di performance, soprattutto se sono installati altri plugin (Woocommerce, Advanced Custom Fields, etc..) per questo consiglio di valutare bene prima di effettuare una scelta o si dovrà ritornare sui propri passi.&lt;/p&gt;&lt;p data-end=&quot;5178&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4961&quot;&gt;Nel caso il sito diventi molto lento sarà opportuno, se non è possibile ottimizzare il codice, ricorrere a dei sistemi di cache (Memcached, Redis, Varnish su tutti).&lt;/p&gt;&lt;p data-end=&quot;5178&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4961&quot;&gt;Un servizio di hosting che supporta tutti questi servizi elencati sopra è Cloudways, vivamente consigliato!&lt;/p&gt;&lt;p data-end=&quot;5178&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4961&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://www.cloudways.com/affiliate/scripts/imp.php?id=301353&amp;amp;a_bid=4869f424&quot; style=&quot;border: 0px;&quot; width=&quot;1&quot; /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://www.cloudways.com/en/wordpress-hosting.php?id=301353&amp;amp;a_bid=19515e01&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;Load WordPress Sites in as fast as 37ms!&quot; height=&quot;280&quot; src=&quot;//www.cloudways.com/affiliate/accounts/default1/banners/19515e01.jpg&quot; title=&quot;Load WordPress Sites in as fast as 37ms!&quot; width=&quot;336&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://www.cloudways.com/affiliate/scripts/imp.php?id=301353&amp;amp;a_bid=19515e01&quot; style=&quot;border: 0px;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/3196171672001564079/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2025/09/siti-multilingua-in-wordpress-e.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3196171672001564079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3196171672001564079'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2025/09/siti-multilingua-in-wordpress-e.html' title='Siti multilingua in Wordpress e performance'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-1761354801423046287</id><published>2025-09-27T17:28:00.005+02:00</published><updated>2025-09-27T18:08:25.625+02:00</updated><title type='text'>Usare i file pot/po per tradurre le stringhe del sito</title><content type='html'>&lt;p&gt;La traduzione delle stringhe del vostro sito web Worpress è basata su un formato noto come gettext, il codice dichiara una stringa e un text domain; a runtime WordPress cerca la versione tradotta nei file .mo per la locale attiva (es. it_IT).&lt;/p&gt;&lt;h2&gt;Ciclo di vita di una stringa&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;Marcatura nel codice → usi le funzioni gettext.&lt;/li&gt;&lt;li&gt;Estrazione → generi un file .pot (template) con tutte le stringhe.&lt;/li&gt;&lt;li&gt;Traduzione → crei i .po per ogni lingua a partire dal .pot.&lt;/li&gt;&lt;li&gt;Compilazione → i .po diventano .mo (binari veloci).&lt;/li&gt;&lt;li&gt;Caricamento → WordPress carica i .mo del tuo text domain.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Queste stringhe vengono tradotte tramite delle funzioni php.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;h4 data-end=&quot;753&quot; data-start=&quot;722&quot;&gt;Marcatura nel codice (PHP)&lt;/h4&gt;&lt;p data-end=&quot;778&quot; data-start=&quot;755&quot;&gt;Le funzioni principali:&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;__( &#39;Testo&#39;, &#39;mio-dominio&#39; );&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // restituisce la stringa&lt;/div&gt;&lt;div&gt;_e( &#39;Testo&#39;, &#39;mio-dominio&#39; );&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // echo diretto&lt;/div&gt;&lt;div&gt;_x( &#39;Testo&#39;, &#39;contesto&#39;, &#39;mio-dominio&#39; );&amp;nbsp; // con contesto&lt;/div&gt;&lt;div&gt;_n( &#39;1 articolo&#39;, &#39;%s articoli&#39;, $n, &#39;mio-dominio&#39; );&amp;nbsp; &amp;nbsp; &amp;nbsp;// plurali&lt;/div&gt;&lt;div&gt;_nx( &#39;file&#39;, &#39;file&#39;, $n, &#39;contesto&#39;, &#39;mio-dominio&#39; );&amp;nbsp; &amp;nbsp; &amp;nbsp;// plurali + contesto&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;// Sempre con escaping adeguato:&lt;/div&gt;&lt;div&gt;esc_html__( &#39;Testo&#39;, &#39;mio-dominio&#39; );&lt;/div&gt;&lt;div&gt;esc_attr__( &#39;Testo&#39;, &#39;mio-dominio&#39; );&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;Come generare i file&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Poedit&lt;/h2&gt;&lt;div&gt;&lt;h4 data-end=&quot;753&quot; data-start=&quot;722&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Per generare/gestire questi file è necessario utilizzare dei software appositi, uno di questi è&amp;nbsp;&lt;a href=&quot;https://poedit.net/&quot; target=&quot;_blank&quot;&gt;Poedit&lt;/a&gt;, questo software ha una interfaccia visuale tramite cui gestire&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgk7tF3baqgbkNnCGDkvaCHO61IAEYYhISjGK0vwoKW2unvkOwndKWBarlt5m5sLCeNwrqADBWu0oxTohQ7RFVlptH0aAJjNvJhui6KW3DLktg6tNNjF2SxzCEOsagFH17xsyHXB3Bm5lZZJqtMfULp8KIXSabq_rY3zsM_disbLqjM_pXk7WcwczlHQhc&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;472&quot; data-original-width=&quot;1000&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgk7tF3baqgbkNnCGDkvaCHO61IAEYYhISjGK0vwoKW2unvkOwndKWBarlt5m5sLCeNwrqADBWu0oxTohQ7RFVlptH0aAJjNvJhui6KW3DLktg6tNNjF2SxzCEOsagFH17xsyHXB3Bm5lZZJqtMfULp8KIXSabq_rY3zsM_disbLqjM_pXk7WcwczlHQhc&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Loco Translate&amp;nbsp;&lt;/h2&gt;&lt;div&gt;Esiste anche un utile plugin, Loco Translate (per tradurre le stringhe, non i contenuti)&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Loco Translate non è un plugin multilingua: serve a tradurre le stringhe di tema e plugin (menu, etichette, messaggi, email) tramite file .po/.mo e .json per gli script. È ideale per coprire testi dell’interfaccia non gestiti dai plugin i18n o per rifinire la terminologia.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiMHjz98W6bC71h3waTh4xOFEL2ELr_BY_MZl5YdWEaftFDsYYF5pGcSPy5Wew4WPcCxKuvSwN9cycH-OnGdKmgoRxX1xn2A-Mj7woGs86HWdg6cyaRVi0OIF1GzAEfTA0rXGmckk1bWBmLvc0RvUNzaUv0s3sW9VG9KOpYdgCBRfOtpDIIGADlvt5478M&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;250&quot; data-original-width=&quot;772&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiMHjz98W6bC71h3waTh4xOFEL2ELr_BY_MZl5YdWEaftFDsYYF5pGcSPy5Wew4WPcCxKuvSwN9cycH-OnGdKmgoRxX1xn2A-Mj7woGs86HWdg6cyaRVi0OIF1GzAEfTA0rXGmckk1bWBmLvc0RvUNzaUv0s3sW9VG9KOpYdgCBRfOtpDIIGADlvt5478M&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;La mia scelta: WP-CLI e un po&#39; di BASH&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span&gt;Personalmente preferisco un approccio programmatico tramite WP-CLI e bash scripting.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ecco un esempio di uno script che sto usando in questi giorni per un tema personalizzato:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;#!/usr/bin/env bash&lt;/div&gt;&lt;div&gt;set -e&amp;nbsp; # interrompe lo script se un comando fallisce&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;source ~/.bashrc&lt;/div&gt;&lt;div&gt;LANG_PATH=&quot;$MYTHEME_THEME_PATH/languages&quot; #cartella con i file delle traduzioni&lt;/div&gt;&lt;div&gt;POT_FILE=&quot;$LANG_PATH/mytheme.pot&quot; # file del template generato&amp;nbsp;&lt;/div&gt;&lt;div&gt;PO_FILE=&quot;$LANG_PATH/it_IT.po&quot; #file con le traduzioni da inserire&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# 1. Genera il template .pot dal tema&lt;/div&gt;&lt;div&gt;wp i18n make-pot &quot;$MYTHEME_THEME_PATH&quot; &quot;$POT_FILE&quot; --exclude=node_modules,vendor,tests --domain=mytheme&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# 2. Se non esiste già il .po, inizializzalo&lt;/div&gt;&lt;div&gt;if [ ! -f &quot;$PO_FILE&quot; ]; then&lt;/div&gt;&lt;div&gt;&amp;nbsp; msginit --no-translator --locale=it_IT --input=&quot;$POT_FILE&quot; --output-file=&quot;$PO_FILE&quot;&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# 3. Aggiorna il .po con le nuove stringhe dal .pot&lt;/div&gt;&lt;div&gt;msgmerge --update &quot;$PO_FILE&quot; &quot;$POT_FILE&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# 4. Compila i .mo&lt;/div&gt;&lt;div&gt;wp i18n make-mo &quot;$LANG_PATH&quot;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lo script scansionerà quindi la vostra cartella verificando la presenza di stringhe relative al vostro tema e genererà i file dove potrete inserire le traduzioni.&lt;/div&gt;&lt;div&gt;Lanciandolo nuovamnete sarà anche generato il file mo. (quello che viene effettivamente letto da Wordpress per la traduzione) basato sulle traduzioni inserite nel .po.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Soluzioni Multilingua&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;https://davidetaddei.blogspot.com/2025/09/siti-multilingua-in-wordpress-e.html&quot;&gt;In questa pagina&lt;/a&gt; ho scritto un articolo sui possibili approcci di un sito multilingua e dei relativi problemi di performance. Se vi dovessero capitare vi consiglio di rivedere il codice del Vs. sito ed i plugin che state usando. Se proprio non potete cambiare nulla potete appoggiarvi ad un hosting che supporti efficaci servizi di hosting, io uso questo:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://www.cloudways.com/en/wordpress-hosting.php?id=301353&amp;amp;a_bid=19515e01&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;Load WordPress Sites in as fast as 37ms!&quot; height=&quot;280&quot; src=&quot;//www.cloudways.com/affiliate/accounts/default1/banners/19515e01.jpg&quot; title=&quot;Load WordPress Sites in as fast as 37ms!&quot; width=&quot;336&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://www.cloudways.com/affiliate/scripts/imp.php?id=301353&amp;amp;a_bid=19515e01&quot; style=&quot;border: 0px;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/1761354801423046287/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2025/09/usare-i-file-potpo-per-tradurre-le.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1761354801423046287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1761354801423046287'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2025/09/usare-i-file-potpo-per-tradurre-le.html' title='Usare i file pot/po per tradurre le stringhe del sito'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgk7tF3baqgbkNnCGDkvaCHO61IAEYYhISjGK0vwoKW2unvkOwndKWBarlt5m5sLCeNwrqADBWu0oxTohQ7RFVlptH0aAJjNvJhui6KW3DLktg6tNNjF2SxzCEOsagFH17xsyHXB3Bm5lZZJqtMfULp8KIXSabq_rY3zsM_disbLqjM_pXk7WcwczlHQhc=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-3329753068973894983</id><published>2016-05-04T07:58:00.002+02:00</published><updated>2016-05-04T08:09:08.020+02:00</updated><title type='text'>Come funziona Wordpress</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE1rW_KpYgeQsR4gqLXGykIm2_dy_4aapO5cdIDlSEnR9-uvVMURs_-rX2L66VG_rv4eqW6EJzsV4EpMn-0sCje_UpPS3HYYyaGOm3_RpRrXpkeTUaq0ZBGLB6Iz-N4WaPx96BYNW9uRg/s1600/OdZGS.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE1rW_KpYgeQsR4gqLXGykIm2_dy_4aapO5cdIDlSEnR9-uvVMURs_-rX2L66VG_rv4eqW6EJzsV4EpMn-0sCje_UpPS3HYYyaGOm3_RpRrXpkeTUaq0ZBGLB6Iz-N4WaPx96BYNW9uRg/s640/OdZGS.png&quot; width=&quot;475&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/3329753068973894983/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2016/05/come-funziona-wordpress.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3329753068973894983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3329753068973894983'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2016/05/come-funziona-wordpress.html' title='Come funziona Wordpress'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE1rW_KpYgeQsR4gqLXGykIm2_dy_4aapO5cdIDlSEnR9-uvVMURs_-rX2L66VG_rv4eqW6EJzsV4EpMn-0sCje_UpPS3HYYyaGOm3_RpRrXpkeTUaq0ZBGLB6Iz-N4WaPx96BYNW9uRg/s72-c/OdZGS.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-7002699278740306739</id><published>2015-10-14T12:12:00.000+02:00</published><updated>2015-10-18T01:26:29.631+02:00</updated><title type='text'>Attivare VirtueMart SEO senza utilizzare il suffisso nella pagina del dettaglio</title><content type='html'>&lt;p dir=&quot;ltr&quot;&gt;Dalla versione 1.0 di Joomla! &amp;#232; consuetudine considerare Virtuemart l&#39;estensione per fare e-commerce per eccellenza. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;Oggi ci sono moltissime alternative (pi&amp;#249; o meno valide) ma VM ha indubbiamente ancora la community pi&amp;#249; forte, in particolare qui in Italia. Rispetto al passato &amp;#232; anche meglio integrato in Joomla! e dalla versione 2 &amp;#232; anche MVC e gestisce i campi come plugin per Joomla, cosa non trascurabile. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;Al di l&amp;#224; di questo VM ha ancora alcuni limiti che gli fanno preferire altri componenti o altre piattaforme. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;Uno di questi limiti &amp;#232; la gestione delle url SEO. Infatti le impostazioni SEO impongono l&#39;utilizzo di un suffisso alla pagina di dettaglio del prodotto (con il valore predefinito detail).&lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;Ovviamente questo in taluni casi pu&amp;#242; non essere accettabile, soprattutto se si devono preservare delle vecchia e URL. &lt;/p&gt;
&lt;p dir=&quot;ltr&quot;&gt;Nel caso non venga impostato un suffisso le opzioni SEO non funzioneranno.&lt;br&gt;
L&#39;unico modo di risolvere sar&amp;#224; quindi l&#39;utilizzo di ulteriori componenti che permettano la riscrittura completa dell&#39;url.&lt;br&gt;
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/7002699278740306739/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/attivare-virtuemart-seo-senza.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7002699278740306739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7002699278740306739'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/attivare-virtuemart-seo-senza.html' title='Attivare VirtueMart SEO senza utilizzare il suffisso nella pagina del dettaglio'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-7386862319422637215</id><published>2015-10-09T23:48:00.001+02:00</published><updated>2015-10-09T23:48:36.984+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL non fa più accedere l&#39;utente ROOT</title><content type='html'>&lt;h3&gt;
Non riesco più a accedere a MySQL&lt;/h3&gt;
Può capitare che la password di root di MySQL non funzioni più o che semplicemente sia stata smarrita.&lt;br /&gt;
&lt;br /&gt;
Al di là della classica domanda iniziale &quot;Perchè!?&quot; quella di cui vi preoccuperà nei minuti successivi la scoperta sarà &quot;che fare????&quot;&lt;br /&gt;
&lt;br /&gt;
In questo post cercherò di fornire una risposta efficace alla seconda, lasciando a voi il piacere (!) di scoprire la risposta alla prima.&lt;br /&gt;
&lt;h3&gt;
Reimpostare la password di root di MySQL&lt;/h3&gt;
Per reimpostare la password di root di MySQL è sufficiente eseguire la stessa operazione che fate quando reimpostate quella del Vs. CMS preferito: tramite una query.&lt;br /&gt;
&lt;br /&gt;
Se nel caso di Wordpress, Drupal, Joomla, Magento o altro CMS che dir si voglia, basta accedere a phpMyAdmin o, per gli amanti del nero, alla riga di comando del terminale, per eseguire l&#39;UPDATE di un campo, qui la situazione è apparentemente drammatica, perchè non si riesce ad accedere proprio alle tabelle i MySQL.&lt;br /&gt;
&lt;br /&gt;
E&#39; però possibile avviare MySQL senza i permessi (GRANT) per cui il problema &quot;password&quot; viene bypassato e sarà possibile eseguire la query di update per il reset della password.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Inutile dire che l&#39;operazione NON VA ESEGUITA su di un server di produzione quando è accessibile da altri utenti.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Vediamo quindi i passaggi da eseguire da terminale:&lt;br /&gt;
&lt;br /&gt;
1) fermate il servizio MySQL, su Debian / Mint / Ubuntu:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo service mysql stop&lt;/blockquote&gt;
2) avviate MySQL disabilitando le GRANT sulle tabelle:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo mysqld --skip-grant-tables&lt;/blockquote&gt;
non apparirà nessun prompt dei comandi, non potrete quindi aggiungere altri comandi e la schermata sembrerà bloccata. E&#39; NORMALE&lt;br /&gt;
&lt;br /&gt;
3) aprite una nuova istanza del terminale.&lt;br /&gt;
&lt;br /&gt;
4) avviate mysql:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
mysql start&lt;/blockquote&gt;
5) selezionate il database di sistema di MySQL:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
use mysql&lt;/blockquote&gt;
6) eseguite una query di update:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
update user set password=password(&#39;lamiapasswordsupersicura&#39;) where user=&#39;root&#39;&lt;/blockquote&gt;
A questo punto potrete accedere nuovamente con l&#39;utente root utilizzando la password che avete impostato, &quot;lamiapasswordsupersicura&quot; nel caso abbiate fatto copia/incolla della riga qui sopra.&lt;br /&gt;
&lt;br /&gt;
Ora che potete di nuovo accedere ai vostri dati, avete tutto il tempo per tornare ad interrogarvi sull&#39;origine del problema.&lt;br /&gt;
&lt;br /&gt;
Per saperne di più leggete &lt;a href=&quot;http://ubuntuforums.org/archive/index.php/t-1836919.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;questo post&lt;/a&gt; nel forum di Ubuntu&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/7386862319422637215/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/mysql-non-fa-piu-accedere-lutente-root.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7386862319422637215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7386862319422637215'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/mysql-non-fa-piu-accedere-lutente-root.html' title='MySQL non fa più accedere l&#39;utente ROOT'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-6169324088448798123</id><published>2015-10-07T23:24:00.000+02:00</published><updated>2015-10-11T23:05:13.141+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="programmazione joomla"/><title type='text'>Alcuni semplici ma utili script per Joomla!</title><content type='html'>&lt;h3&gt;
Ottenere il nome del template corrente di Joomla!&lt;/h3&gt;
Questo script può tornare utile quando si sta scrivendo il percorso di un css su Joomla e lo si sta caricando tramite il metodo addStylesheet() di JDocument.&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/davidetaddei/e5e1231a3a5656b24ef1.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;h3&gt;
Ottenere il prefisso delle tabelle indicato nella configurazione in Joomla!&lt;/h3&gt;
Questo script (da usare solo in debug) è particolarmente comodo quando si fa scrive la query di un modello nell&#39;output della pagina e lo si vuole incollare in phpMyAdmin o Heidi per eseguire la query, in questo modo eliminerete gli antipatici cancelletti.&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/davidetaddei/793595872ef1a3b13f8c.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;h3&gt;Caricare un modulo di Joomla con il codice&lt;/h3&gt;
Con questo script potrete caricare all&#39;interno di qualsiasi file un modulo di Joomla! Vi consiglio di impostare la visibilità del modulo su Tutte le pagine e assegnare come posizione un non nome dedicato (in questo Gist &quot;statistics&quot;), in questo modo il modulo comparirà solo nelle pagine dove avrete inserito il codice.
&lt;script src=&quot;https://gist.github.com/davidetaddei/fadfbed9d1db41824424.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
&lt;h3&gt;
Effettuare il dump di un DB Joomla senza accedere a phpMyAdmin&lt;/h3&gt;
In questo caso al posto del Gist inserisco direttamente il &lt;a href=&quot;https://github.com/davidetaddei/jmysqldump.git&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; allo script su GitHub.&lt;br /&gt;
Basta copiarlo sulla root e lanciare lo script dalla barra dell&#39;indirizzo, creerà automaticamente il dump in una cartella dedicata sulla root.&lt;br /&gt;
&lt;br /&gt;
Provatelo e commentatelo su GitHub!</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/6169324088448798123/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/alcuni-semplici-ma-utili-script-per.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/6169324088448798123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/6169324088448798123'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/10/alcuni-semplici-ma-utili-script-per.html' title='Alcuni semplici ma utili script per Joomla!'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-5337151798889839480</id><published>2015-09-30T01:00:00.000+02:00</published><updated>2015-10-08T15:36:02.766+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="joomla 3.5"/><category scheme="http://www.blogger.com/atom/ns#" term="joomla 3.6"/><category scheme="http://www.blogger.com/atom/ns#" term="joomladay"/><title type='text'>Cosa aspettarsi di Joomla 3.5 e Joomla 3.6</title><content type='html'>&lt;h3&gt;
Le novità di Joomla 3.5&lt;/h3&gt;
La release 3.4 di Joomla risale ormai allo scorso febbraio ed è ormai iniziata la roadmap per la nuova versione 3.5&lt;br /&gt;
&lt;br /&gt;
Le idee sono tante vedremo quali saranno poi le nuove features effettivamente rilasciate :-)&lt;br /&gt;
&lt;br /&gt;
Secondo &lt;a href=&quot;https://www.ostraining.com/blog/joomla/joomla-2015/?utm_source=Alledia&amp;amp;utm_campaign=cb7eb12f8f-The_Alledia_Newsletter&amp;amp;utm_medium=email&amp;amp;utm_term=0_80803af9fd-cb7eb12f8f-270275481&amp;amp;goal=0_80803af9fd-cb7eb12f8f-270275481&amp;amp;mc_cid=cb7eb12f8f&amp;amp;mc_eid=40a504e1fe&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;l&#39;articolo di&amp;nbsp;Steve Burge di OSTraining.com&lt;/a&gt; questa è un&#39;anteprima attendibile basata su (&lt;a href=&quot;http://volunteers.joomla.org/reports/77-january-march-combined-report&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;questa roadmap&lt;/a&gt;):&lt;br /&gt;
&lt;h4&gt;
Override di tutto in Joomla 3.5&lt;/h4&gt;
Uno degli obiettivi chiave di Joomla 3.5 è che tutto possa essere sovrascritto.&lt;br /&gt;
&lt;br /&gt;
Lo strumento per raggiungere questo obiettivo sarà, nelle intenzioni del team di sviluppo, di JLayout, (per saperne di più vedi questo articolo&lt;br /&gt;
&lt;a href=&quot;https://www.ostraining.com/blog/joomla/custom-layouts/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://www.ostraining.com/blog/joomla/custom-layouts/&lt;/a&gt;), ma potrebbero essere utilizzti altri strumenti come i motori di rendering PHP Laravel Blade o Twig.&lt;br /&gt;
&lt;br /&gt;
Il solito problema sarà la retrocompatibilità, vogliamo scommettere?&lt;br /&gt;
&lt;h4&gt;
Eliminazione dal core del componente com_messages&lt;/h4&gt;
Il progetto di rimozione dei componenti dal core toccherà questa volta com_messages, che si potrà comunque scaricare dal proprio &lt;a href=&quot;https://github.com/joomla-extensions/messages&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;repository su Github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Nuovo media manager per Joomla 3.5&lt;/h4&gt;
Il nuovo media manager includerà queste funzionalità:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;nuova interfaccia grafica (anche l&#39;occhio vuole la sua parte)&lt;/li&gt;
&lt;li&gt;un upload manager&amp;nbsp;&lt;/li&gt;
&lt;li&gt;tagging delle immagini&lt;/li&gt;
&lt;li&gt;funzioni più potenti per l&#39;editing delle immagini&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Ecco alcuni screeshot:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlHs562bxxFoDhOZfYHtIyx4eyhFqHNVCszP4hKpFsJizgHYDBBzYESllKb248MwonZYUvadDBwxGg-ujBS_JWsuQWEVp1TRqATxBn1ayugM8cW7l4qqfk-oM1H-Nu6PQ5dVJKLenrzg/s1600/new-media-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;66&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlHs562bxxFoDhOZfYHtIyx4eyhFqHNVCszP4hKpFsJizgHYDBBzYESllKb248MwonZYUvadDBwxGg-ujBS_JWsuQWEVp1TRqATxBn1ayugM8cW7l4qqfk-oM1H-Nu6PQ5dVJKLenrzg/s400/new-media-1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgchY2BMKLj_-TyTGHTrmj8rbCYsX_K5dBMh91jc91EgWCcondKYUnH1wThangWBTG62irQea_ZmfeckfjRuxy_x-JI2XXvQeYcReVaW-9dNWxz0hLzo_URwGdIYn-k9RQT-Gd3TPKC-w/s1600/new-media-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgchY2BMKLj_-TyTGHTrmj8rbCYsX_K5dBMh91jc91EgWCcondKYUnH1wThangWBTG62irQea_ZmfeckfjRuxy_x-JI2XXvQeYcReVaW-9dNWxz0hLzo_URwGdIYn-k9RQT-Gd3TPKC-w/s400/new-media-2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;clear: both; text-align: left;&quot;&gt;
Nuovo sistema di Routing&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
E&#39; nella lista delle cose da fare da molto tempo ed è stato oggetto di una campagna di crowd funding lo scorso anno. Un po&#39; del codice realizzato è stato condiviso su GitHub (&lt;a href=&quot;http://joomlager.de/crowdfunding/11-happy-new-year-and-a-good-step-towards-our-goal&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;vedi qui le commit&lt;/a&gt;).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
C&#39;è ancora molto da fare, ma ci sono dei progressi.&lt;/div&gt;
&lt;h4 style=&quot;clear: both; text-align: left;&quot;&gt;
Novità di Joomla 3.6?&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Effettivamente il post è focalizzato soprattutto su Joomla 3.5. ma speriamo di vedere l&#39;implementazione di un&#39;API REST dalla release 3.6, &lt;a href=&quot;https://docs.google.com/document/d/1ZwmQeFWISPPv9o_a2GNeZUINmu95ja4R5KBxEr0zmCU/edit#heading=h.vmaf50k2yjvm&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ecco la roadmap&lt;/a&gt;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span id=&quot;goog_714134318&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_714134319&quot;&gt;&lt;/span&gt;Per le novità più prossime attendiamo il &lt;a href=&quot;http://www.joomladay.it/?showall=&amp;amp;start=1#fixpage&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;JoomlaDay di Firenze&lt;/a&gt;, di cui al momento non è ancora disponibile il programma</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/5337151798889839480/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/09/cosa-aspettarsi-di-joomla-35-e-joomla-36.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/5337151798889839480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/5337151798889839480'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/09/cosa-aspettarsi-di-joomla-35-e-joomla-36.html' title='Cosa aspettarsi di Joomla 3.5 e Joomla 3.6'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlHs562bxxFoDhOZfYHtIyx4eyhFqHNVCszP4hKpFsJizgHYDBBzYESllKb248MwonZYUvadDBwxGg-ujBS_JWsuQWEVp1TRqATxBn1ayugM8cW7l4qqfk-oM1H-Nu6PQ5dVJKLenrzg/s72-c/new-media-1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-1358768063291209679</id><published>2015-09-09T22:59:00.000+02:00</published><updated>2015-09-21T00:55:03.988+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="robots.txt"/><category scheme="http://www.blogger.com/atom/ns#" term="seo"/><title type='text'>Ottimizzare il file robots.txt per Magento</title><content type='html'>&lt;h3&gt;
robots.txt per la SEO di un e-commerce Magento&lt;/h3&gt;
Il file robots.txt è molto importante per l&#39;indicizzazione del tuo e-commerce Magento.&lt;br /&gt;
&lt;br /&gt;
Tramite questo file è possibile &quot;istruire&quot; corretamente i crawler dei motori di ricerca per una corretta indicizzazione dei file del tuo sito web.&lt;br /&gt;
&lt;br /&gt;
Puoi escludere cartelle, includerne altre e dare ulteriori informazioni per la lettura del sito.&lt;br /&gt;
&lt;br /&gt;
In pratica i benefici ottenibili sono 2:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Evitare l&#39;indicizzazione di contenuti duplicati;&lt;/li&gt;
&lt;li&gt;Nascondere i file e le cartelle relativi a contenuti &quot;tecnici&quot; (repository .git, cartella admin, etc..)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Ecco un esempio di un file robots.txt per Magento opportunamente commentato:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: #e5e6e8; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; font-size: 14px; height: auto !important; left: auto !important; line-height: 18px; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: initial;&quot;&gt;## IMPOSTAZIONI GENERALI&lt;/span&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## Abilita le regole del robots.txt per tutti gli spider dei motori di ricerca&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;User-agent: *&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## Parametro Crawl-delay: il numero di secondi di attesa tra una richiesta e l&#39;altra allo stesso server&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## Questo parametro è molto utile per ridurre la frequenza delle richieste dei crawler, che talvolta possono creare problemi di traffico al server.&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Crawl-delay: 30&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## Sitemap: inserisci l&#39;indirizzo della sitemap del tuo sito web&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Sitemap: http://www.miosito.com/sitemap/sitemap.xml&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## IMPOSTAZIONI PER SITI IN SVILUPPO&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## Non navigare le cartelle dei repository (CVS, snv, .git, etc..), gli ambienti di sviluppo (phpStorm, Netbeans, etc..) e i dump del db (.sql, tgz, etc..)&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /CVS&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*.svn$&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*.idea$&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*.sql$&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*.tgz$&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*.git$&lt;/code&gt;&lt;br /&gt;
## LE IMPOSTAZIONI PRECEDENTI SONO GENERALMENTE VALIDE ANCHE PER ALTRE PIATTAFORME COME JOOMLA, DRUPAL, ETC..&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## IMPOSTAZIONI DI MAGENTO&lt;br /&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE LA CARTELLA ADMIN&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /admin/&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE LE CARTELLE DI SISTEMA DI MAGENTO&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /app/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /downloader/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /errors/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /includes/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /lib/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /pkginfo/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /shell/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /var/&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE I FILE DI SISTEMA DI MAGENTO&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /api.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /cron.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /cron.sh&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /error_log&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /get.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /install.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /LICENSE.html&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /LICENSE.txt&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /LICENSE_AFL.txt&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /README.txt&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /RELEASE_NOTES.txt&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## MIGLIORAMENTI ALLA SEO DI MAGENTO&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE LE PAGINE DELLE SOTTOCATEGORIE CHE VENGONO FILTRATE O ORDINATE&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?dir*&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?dir=desc&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?dir=asc&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?limit=all&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?mode*&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE IL DUPLICATO DELLA HOME SU INDEX.PHP. QUESTA IMPOSTAZIONE VA INSERITA SOLO SE E&#39; STATA IMPOSTATA L&#39;OTTIMIZZAZIONE SEO DEGLI URL DI MAGENTO&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /index.php/&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE I LINK CHE CONTENGONO L&#39;ID DI SESSIONE&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /*?SID=&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE NELLE CARTELLE Do not crawl checkout and user account pages&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /checkout/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /onestepcheckout/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /customer/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /customer/account/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /customer/account/login/&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON NAVIGARE PAGINE DI RICERCA E PAGINE DEL CATALOGO NON OTTIMIZZATE PER LA SEO&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /catalogsearch/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /catalog/product_compare/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /catalog/category/view/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /catalog/product/view/&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## IMPOSTAZIONI DEL SERVER&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;## NON INDICIZZARE FILE E CARTELLE DI SISTEMA DEL SERVER&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /cgi-bin/&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /cleanup.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /apc.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /memcache.php&lt;/code&gt;&lt;code class=&quot;xml plain&quot; style=&quot;background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Roboto, Verdana; height: auto !important; left: auto !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;Disallow: /phpinfo.php&lt;/code&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
## NON INDICIZZARE LA PAGINA 404&lt;br /&gt;
Disallow: /404/&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Per attivare queste opzioni puoi copiare e incollare le istruzioni che trovi qui sopra in un file, nominarlo come robots.txt e inserirlo nella root del tuo sito Magento&lt;br /&gt;
&lt;br /&gt;
Per saperne di più:&lt;br /&gt;
http://www.robotstxt.org/&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/1358768063291209679/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/09/ottimizzare-il-file-robotstxt-per.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1358768063291209679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1358768063291209679'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/09/ottimizzare-il-file-robotstxt-per.html' title='Ottimizzare il file robots.txt per Magento'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-5809181834856097791</id><published>2015-01-10T12:24:00.000+01:00</published><updated>2015-01-16T12:08:09.825+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><title type='text'>Comandi utili da terminale su Debian / Ubuntu / Mint</title><content type='html'>&lt;h3 style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 17.25px; white-space: pre-wrap;&quot;&gt;&lt;b&gt;Lista di comandi utili per ottenere informazioni da termina su un web server LAMP (Linux Apache MySQL PHP)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;b id=&quot;docs-internal-guid-ba5c17ea-b9d5-75f1-a7ac-4b5df887fdd2&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Nell’ordinaria amministrazione di un server web vengono utilizzati vari comandi ed istruzioni da eseguire su terminale per ottenere informazioni e/o compiere rapide operazioni su cartelle e file.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Presento di seguito i più comuni, spesso determinanti per risparmiare tempo su un server di sviluppo, vanno utilizzati con cautela su un server in produzione, magari solo per ottenere delle informazioni veloci e poi contattare l’amministratore di sistema. Ovviamente, se siete voi l’amministratore di sistema, dovreste già conoscerli e la lista di seguito può essere utile solo per un veloce ripasso. Le istruzioni sono state testate su un server Debian / Ubuntu / Mint&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;sudo -s&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Accedi come amministratore (non ti sarà nuovamente richiesta la password)&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;du -h&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mostra la dimensione di tutte le sottocartelle della cartella corrente&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;du -h --max-depth=1&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mostra la dimensione di un livello di sottocartelle della cartella corrente. Se l’output è troppo lungo si può usare &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;du -h --max-depth=1&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;-s è un’opzione che sta per “summarize”, mostra quindi solo la lunghezza&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;du -a /var | sort -n -r | head -n 10&lt;/b&gt;&lt;br /&gt;
Mostra le 10 cartelle più grandi presenti sul sistema&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;truncate -s 0 /path/to/log.log&lt;/b&gt;&lt;br /&gt;
Pulire un file log&lt;br /&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Miniguide&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Sono sequenze di operazioni semplici che sono utili in diverse situazioni.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;ol style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Vai alla directory dei log di Apache&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;cd /var/log/apache2/&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;ol start=&quot;2&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Rimuovi tutti i file&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;rm -rf /var/log/apache2/*&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;ol start=&quot;3&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ricarica apache&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;service apache2 reload&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/5809181834856097791/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/comandi-utili-da-terminale-su-debian.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/5809181834856097791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/5809181834856097791'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/comandi-utili-da-terminale-su-debian.html' title='Comandi utili da terminale su Debian / Ubuntu / Mint'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-4166100691764854012</id><published>2015-01-04T19:28:00.002+01:00</published><updated>2015-01-04T19:28:36.199+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento SEO"/><title type='text'>Magento mettere offline un sito web proteggendo la SEO</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Come mettere off-line un sito realizzato con Magento?&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Dovete aggiornare il Vs. sito web Magento e avete la necessità di metterlo off-line per qualche tempo finchè lo modificate?&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Una prima soluzione potrebbe essere “spegnerlo” e mettere una pagina di sito in costruzione, scaricare il sito in locale e poi rimetterlo on-line quando le modifiche sono state effettuate. In questo caso però, oltre agli ordini inevitabilmente persi, potrebbero esserci degli altri effetti collaterali, primo fra tutti la SEO del sito.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Google &amp;amp; colleghi, infatti, non trovando più le pagine del sito (se ricevono un errore 404) potrebbero decidere di penalizzarle e perderebbero quindi qualche posizione nelle SERP.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Utilizzare un errore 503&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;La soluzione può essere quindi di creare una pagina con errore 503 con questo codice:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;HTTP/1.1 503 Service Temporarily Unavailable&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;Status: 503 Service Temporarily Unavailable&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;Retry-After: 300&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;in questo modo gli header inviati agli spider dei motori riceverebbero il messaggio di errore 503 e di ritornare dopo 300 secondi (generate questo valore dinamicamente in modo da stabilire un tempo di rimessa on-line del sito accettabile).&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Utilizzare la pagina errore 503 di Magento&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In Magento 1.4 e successivi è stata introdotta una gestione nativa degli errori 503 in modo da poter mettere il sito in mantainance mode.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Si tratta di una funzione molto utile perchè mantiene attivi tutti gli url del sito restituendo un erorre 503.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Per attivare la pagina è sufficiente inserire un file maintainance.flag nella root del sito web, non è importante il contenuto del file, basta che esista.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Personalizzare l’aspetto della pagina 503 di Magento&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;La pagina di errore 503 viene impostata in base ad un file specifico che si chiama 503.phtml e si trova nella cartella /errors/default (qui troverete anche i file e gli stili della pagina).&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Potete quindi mostrare la grafica più adatta al design del vostro sito web e tutte le customizzazioni utili per ottenere una adeguata personalizzazione dei contenuti della Vostra pagina di errore 503 su Magento.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;img height=&quot;493px;&quot; src=&quot;https://lh5.googleusercontent.com/maf6qRZsso2yLJZV0MxMoHZMM71LtiF2SSfiUvcjyEoVjG_HO9BFFNTLAxKZcomH748x378enJpofCNO_IyeolSfI8u16W1J9sxCcEowBYThYR9oBtsSVMGziam5gfKzCQ&quot; style=&quot;-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);&quot; width=&quot;330px;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Gestione avanzata della pagina 503 e accesso per l’amministratore (o altri utenti specifici)&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mentre in sito è in mantenimento alcuni utenti potrebbero avere la necessità di accedere comunque (testers e sviluppatori).&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Per fare questo è possibile utilizzare questo codice:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//definisco &amp;nbsp;un array di ip autorizzati&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #ffe4ff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$ip&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;REMOTE_ADDR&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$allowed &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;127.0.0.1&#39;,&#39;89.23.233.10&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: grey; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// these are the IP&#39;s that are allowed to view the site.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;poi cambiare la linea del codice &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;if &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;( &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;file_exists&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #e4e4ff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$maintenanceFile&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) ) {&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;in&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;if &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;file_exists&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #e4e4ff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$maintenanceFile&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) &amp;amp;&amp;amp; !&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;in_array&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$ip&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$allowed&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)) {&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;in questo modo se il file maintainance.flag viene trovato e l’ip dell’utente non è compreso nella lista $allowed il sito va in mainanance mode, restituisce quindi un errore 503.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;SEO blackhat &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Potreste rendere l’accesso libero ai motori di ricerca mentre il sito è in maintainance mode, in questo modo non esisterebbe neanche la necessità di gestire un errore 503 - agli utenti non interessa gran che se è un 404 o un 503, in genere guardano solo il contenuto della pagina :-)&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Si tratta però di una tecnica rischiosa perchè se i motori di ricerca si accorgono dell’utilizzo di tecniche di Cloaking possono decidere di bannare il dominio con danni notevolmente maggiori rispetto ai vantaggi ottenibili.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Cambiare la pagina di errore 503&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;La formattazione della pagina 503 standard di Magento potrebbe non essere coerente con il design del Vostro sito web, quindi potrebbe servire una customizzazione più radicale.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Per ottenere questo si può modificare la seguente riga della pagina index.php di Magento:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;include_once &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;dirname&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) . &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;/errors/503.php&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;in&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: #f7faff; color: navy; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;include_once &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;dirname&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-family: Arial; font-size: 16px; font-style: italic; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) . &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: green; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39;/503/index.php&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;quindi potete inserire nel codice della pagina index.php (contenuta in una cartella 503 che si trova sulla root) il codice che preferite.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/4166100691764854012/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/magento-mettere-offline-un-sito-web.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/4166100691764854012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/4166100691764854012'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/magento-mettere-offline-un-sito-web.html' title='Magento mettere offline un sito web proteggendo la SEO'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/maf6qRZsso2yLJZV0MxMoHZMM71LtiF2SSfiUvcjyEoVjG_HO9BFFNTLAxKZcomH748x378enJpofCNO_IyeolSfI8u16W1J9sxCcEowBYThYR9oBtsSVMGziam5gfKzCQ=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-8782297005766708409</id><published>2015-01-01T20:12:00.000+01:00</published><updated>2015-10-09T23:29:44.629+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database EAV"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="script magento"/><title type='text'>Eseguire un’importazione in Magento da riga di comando</title><content type='html'>&lt;h3 style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;Come eseguire un’importazione di prodotti con DataFlow nel catalogo di Magento da terminale&lt;/span&gt;&lt;/h3&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;L’opzione Dataflow-Profile permette di effettuare aggiornamenti del catalogo senza dover scrivere codice PHP.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Tuttavia a volte può verificarsi un timeout del web server e rendere impossibile l’effettuazione dell’operazione, abbiamo già visto nel post relativo agli &lt;/span&gt;&lt;a href=&quot;http://davidetaddei.blogspot.com/2014/09/cosa-fare-se-avete-gli-indici-bloccati.html&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;indici bloccati&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Eseguire un’importazione di prodotti da riga di comando può sembrare un’operazione un po’ complicata per chi non l’abbia mai effettuata ma talvolta può essere necessaria se il web server va in timeout.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h4 style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Il codice PHP necessario&lt;/span&gt;&lt;/h4&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In effetti per eseguire un’importazione di dati da Magento utilizzando il DataFlow sono sufficienti poche righe di codice:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//verifichiamo che lo script venga eseguito da riga di comando&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;if (php_sapi_name() !== &#39;cli&#39;) {&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;die (&quot;Esegui lo script solo da shell&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//identifico l’ID del profilo di importazione Dataflow&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$profileId = 7; &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//includo Magento&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;require_once &#39;app/Mage.php&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;umask(0);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mage::app()-&amp;gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//instanzio il model dataflow/profile &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$profile = Mage::getModel(&#39;dataflow/profile&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//imposto l’utente che eseguirà lo script&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$userModel = Mage::getModel(&#39;admin/user&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$userModel-&amp;gt;setUserId(0);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mage::getSingleton(&#39;admin/session&#39;)-&amp;gt;setUser($userModel);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//carico il profilo di importazione&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$profile-&amp;gt;load($profileId);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//controllo che il profilo esista realmente&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;if (!$profile-&amp;gt;getId()) {&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Mage::getSingleton(&#39;adminhtml/session&#39;)-&amp;gt;addError(&#39;ERROR: Incorrect profile id&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Mage::register(&#39;current_convert_profile&#39;, $profile);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//eseguo il profilo&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$profile-&amp;gt;run();&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$recordCount = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$batchModel = Mage::getSingleton(&#39;dataflow/batch&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;//comunico nell’output che il profilo è stato eseguito&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;echo &quot;EXPORT COMPLETE. BATCHID: &quot; . $batchModel-&amp;gt;getId();&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h4 style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Come lanciare lo script PHP da riga di comando&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Dicevamo che lo script deve essere eseguito da riga di comando, quindi andiamo su terminale e digitiamo:&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;php export.php&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;fatto.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/8782297005766708409/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/eseguire-unimportazione-in-magento-da.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8782297005766708409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8782297005766708409'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2015/01/eseguire-unimportazione-in-magento-da.html' title='Eseguire un’importazione in Magento da riga di comando'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-4260155720097697099</id><published>2014-11-29T23:08:00.000+01:00</published><updated>2014-11-29T23:08:00.049+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><title type='text'>Magento, verificare il controller utilizzato</title><content type='html'>&lt;h3&gt;
Ottenere il nome del controller con la classe&amp;nbsp;Mage_Core_Model_Url&lt;/h3&gt;
Verificare il nome del controller attivo può essere utile per far comparire un output diverso a seconda delle situazioni.&lt;br /&gt;
&lt;br /&gt;
Ad esempio immaginiamo di voler attribuire una classe CSS ad un tag a seconda che ci troviamo sulla home page o nella pagina del prodotto.&lt;br /&gt;
&lt;h4&gt;
Verifica del controller nei file template (.phtml)&lt;/h4&gt;
Possiamo ottenere il nome del controller che sta utilizzando Magento in questo modo:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$this-&amp;gt;getRequest()-&amp;gt;getControllerName();&lt;/blockquote&gt;
Quindi se ci troviamo sulla home page otterremo &quot;index&quot;, se ci troviamo nella scheda prodotto otterremo &quot;product&quot;.&lt;br /&gt;
&lt;br /&gt;
In questo modo avremo:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$controller=$this-&amp;gt;getRequest()-&amp;gt;getControllerName();&lt;br /&gt;if( $controller==&quot;index&quot; ):&lt;br /&gt;//sono sulla home page quindi&lt;br /&gt;&amp;nbsp; $class=&quot;stile1&quot;;&lt;br /&gt;elseif( $controller==&quot;product&quot; ):&lt;br /&gt;//sono nella scheda prodotto&lt;br /&gt;&amp;nbsp; $class=&quot;stile2&quot;;&lt;br /&gt;endif;&lt;br /&gt;echo &#39;&amp;lt;span class=&quot;&#39;.$class.&#39;&quot;&amp;gt;Nome prodotto&amp;lt;/span&amp;gt;&lt;/blockquote&gt;
L&#39;oggetto Request può anche restituire altre utili informazioni, ad esempio:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
//nome della funzione usata dal controller&lt;br /&gt;$this-&amp;gt;getRequest()-&amp;gt;getActionName();&lt;br /&gt;&lt;br /&gt;//indirizzo della route corrente&lt;br /&gt;$this-&amp;gt;getRequest()-&amp;gt;getRouteName();&lt;br /&gt;&lt;br /&gt;//nome del modulo corrente&lt;br /&gt;$this-&amp;gt;getRequest()-&amp;gt;getModuleName();&lt;/blockquote&gt;
&lt;div&gt;
&lt;h4&gt;
Richiamare il controller all&#39;interno delle classi&lt;/h4&gt;
&lt;/div&gt;
getRequest può essere richiamato da $this solo nei file .phtml, ma se ci troviamo all&#39;interno di una classe, $this restituirà la classe stessa, quindi il metodo getRequest() non sarà disponibile.&lt;br /&gt;
&lt;br /&gt;
Per ottenere le informazioni sopra descritte sarà quindi necessario utilizzare Mage::app() al posto di $this.&lt;br /&gt;
&lt;br /&gt;
La classe che ci viene in aiuto per ottenere queste informazioni è Mage_Core_Model_Url. Possiamo verificare il contenuto dell&#39;oggetto con un print_r():&lt;br /&gt;
&lt;br /&gt;
You can explore all requests with print_r.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
echo &quot;&amp;lt;pre&amp;gt;&quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; print_r(Mage::app()-&amp;gt;getRequest());&lt;br /&gt;echo &quot;&amp;lt;/pre&amp;gt;&quot;;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/4260155720097697099/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-verificare-il-controller.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/4260155720097697099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/4260155720097697099'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-verificare-il-controller.html' title='Magento, verificare il controller utilizzato'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-7158260066442990491</id><published>2014-11-16T01:00:00.000+01:00</published><updated>2014-11-16T01:00:05.474+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento design"/><title type='text'>Magento - caricare un blocco statico tramite codice</title><content type='html'>&lt;h2&gt;
Come caricare un blocco statico in un file phtml?&lt;/h2&gt;
Per caricare un blocco statico all&#39;interno di una pagina su Magento, potrebbe essere comodo effettuare direttamente una modifica all&#39;interno di un file .phtml anzichè andare a modificare i layout XML.&lt;br /&gt;
&lt;br /&gt;
Questa operazione può essere facilmente eseguita, dopo aver creato il blocco statico nel CMS.&lt;br /&gt;
&lt;br /&gt;
Ad esempio, se vogliamo visualizzare il contenuto di un blocco che si chiama block_left_top possiamo utilizzare la seguente istruzione:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;?php echo Mage::app()-&amp;gt;getLayout()-&amp;gt;createBlock(&#39;cms/block&#39;)-&amp;gt;setBlockId(&#39;block_left_top&#39;)-&amp;gt;toHtml(); ?&amp;gt;&lt;/blockquote&gt;
Vediamo insieme da cosa è composta:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Mage::app() mi permette di utilizzare il metodo statico app() della classe Mage, da cui partono tutte le chiamate al framework di Magento.&lt;/li&gt;
&lt;li&gt;Mage::app() crea un oggetto app che tramite il metodo getLayout() crea un oggetto LAYOUT.&lt;/li&gt;
&lt;li&gt;L&#39;oggetto ottenuto tramite il metodo getLayout() può a sua volte utlizzare il metodo createBlock a cui passo il valore &#39;cms/block&#39; per indicare che voglio che tipo di oggetto voglio utilizzare;&lt;/li&gt;
&lt;li&gt;Il nuovo oggetto potrà poi assegnare il blocco statico all&#39;oggetto Blocco creato per scegliere assegnare utilizzo li metodo setBlockId() a cui passerò come parametro l&#39;identificatore del blocco, in questo caso (&quot;block_left_top&quot;);&lt;/li&gt;
&lt;li&gt;L&#39;oggetto ottenuto può generare un output in HTML tramite appunto il metodo toHtml();&lt;/li&gt;
&lt;li&gt;L&#39;output generato può essere inserito in una variabile da utilizzare successivamente oppure stampato direttamente con echo;&lt;/li&gt;
&lt;/ul&gt;
Posso ottenere lo stesso risultato con un codice più compatto utilizzando il metodo statico getBlockSingleton che mi permette di creare direttamente un blocco, a cui poi assegnerò il tipo e l&#39;identificatore prima di ottenere il rendering in formato HTML.</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/7158260066442990491/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-caricare-un-blocco-statico.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7158260066442990491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7158260066442990491'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-caricare-un-blocco-statico.html' title='Magento - caricare un blocco statico tramite codice'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-3154746154160340371</id><published>2014-11-08T01:00:00.000+01:00</published><updated>2014-11-08T01:00:02.692+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><title type='text'>Ottenere le informazioni dello store in Magento</title><content type='html'>&lt;h3&gt;
Come ottenere il codice dello negozio (store) corrente su Magento tramite PHP?&lt;/h3&gt;
Per accedere alle proprietà dello store attivo su Magento si instanzia l&#39;oggetto store tramite il metodo app della classe statica Mage:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$app=Mage::app();&lt;/blockquote&gt;
&lt;br /&gt;
Poi lo store può essere richiamato con il metodo getStore&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$store = $app-&amp;gt;getStore();&lt;/blockquote&gt;
&lt;br /&gt;
Naturalmente posso eseguire tutto in un&#39;unica operazione:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$store = Mage::app()-&amp;gt;getStore();&lt;/blockquote&gt;
&lt;br /&gt;
A questo punto avrà accesso all&#39;oggetto Mage_Core_Store_Model, un modello che mi permetterà di ottenere le seguenti informazioni:&lt;br /&gt;
&lt;br /&gt;
//il nome del negozio&lt;br /&gt;
$name = $store-&amp;gt;getName();&lt;br /&gt;
&lt;br /&gt;
//il codice del negozio&lt;br /&gt;
$code = $store-&amp;gt;getCode();&lt;br /&gt;
&lt;br /&gt;
e, utilizzando i metodi del modello, tante altre utili info, ecco i più importanti esempi:&lt;br /&gt;
&lt;br /&gt;
//il Website Id&lt;br /&gt;
websiteid=$store-&amp;gt;getWebsiteId();&lt;br /&gt;
&lt;br /&gt;
//se il negozio è attivo&lt;br /&gt;
$attivo=$store-&amp;gt;getIsActive();&lt;br /&gt;
&lt;br /&gt;
//l&#39;url della home page del negozio&lt;br /&gt;
$home=getStore()-&amp;gt;getHomeUrl();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/3154746154160340371/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/ottenere-le-informazioni-dello-store-in.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3154746154160340371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/3154746154160340371'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/ottenere-le-informazioni-dello-store-in.html' title='Ottenere le informazioni dello store in Magento'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-392231667267937609</id><published>2014-11-04T03:30:00.000+01:00</published><updated>2014-11-04T03:30:00.870+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database EAV magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>Aggiungere un prefisso a tutte le tabelle di un database Magento (e più in generale su MySQL)</title><content type='html'>&lt;h3&gt;
Come aggiungere un prefisso alle tabelle del DB di Magento&lt;/h3&gt;
In alcuni casi può capitare di dover sfruttare uno stesso database per più applicazione.&lt;br /&gt;
&lt;h4&gt;
La soluzione: utilizzate un prefisso&lt;/h4&gt;
Sia che le applicazioni siano di tipo diverso (ad esempio Magento e Drupal) che, a maggior ragione dello stesso tipo (due installazioni di Magento), potrebbero esserci delle tabelle con lo stesso nome, da qui la necessità di aggiungere un prefisso per evitare che una o più tabelle vadano a &quot;sovrapporsi&quot; e salti l&#39;integrità dei dati.&lt;br /&gt;
&lt;h4&gt;
Aggiungere il prefisso a tutte le tabelle tramite SQL&lt;/h4&gt;
In fase di installazione possiamo specificare il prefisso delle tabelle, quindi il problema si risolve nella fase iniziale.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKPKWwKD-Dy4UrFjqGm0LbxLo5myi4mjbQ0fxF7pp3hYh5LjuHh-mUsu0FMMkZH2hjZbi-1Gjz5C9DmhDMKqqYveJBfROuAM9o0_t4sXX_HWO5X_WUX3W7JVVFtx0IYqzB6bHQzck5myI/s1600/prefisso-database-installazione-magento.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKPKWwKD-Dy4UrFjqGm0LbxLo5myi4mjbQ0fxF7pp3hYh5LjuHh-mUsu0FMMkZH2hjZbi-1Gjz5C9DmhDMKqqYveJBfROuAM9o0_t4sXX_HWO5X_WUX3W7JVVFtx0IYqzB6bHQzck5myI/s1600/prefisso-database-installazione-magento.JPG&quot; height=&quot;342&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;clear: both; text-align: justify;&quot;&gt;
Come comportarsi nel caso di un DB esistente?&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Nel caso in cui non si debba effettuare una nuova installazione e l&#39;unica operazione fosse dover importare solo i db la situazione diventerebbe però un po&#39; problematica.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In questo caso sarebbe opportuno aggiungere il prefisso ad ogni tabella prima del primo database prima di importare il secondo.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Per effettuare questa operazione le opzioni a disposizione sarebbero le seguenti:&lt;br /&gt;
&lt;br /&gt;
1) aprire il file dump con un editor di testo rinominare a mano tutte le tabelle con un copia/incolla del prefisso desiderato (molto esoso in termini di tempo e con un alto rischio di imprecisione);&lt;br /&gt;
&lt;br /&gt;
2) aprire sempre il file, ma rinominare le tabelle con un trova/sostituisci aggiungedo il prefisso (elevatissimo rischio di imprecisione perchè le tabelle possono trovarsi in varie situazioni, CREATE, LOCK, etc.. e quindi difficilmente potremmo individuarle tutte)&lt;br /&gt;
&lt;br /&gt;
3) utilizzare SQL e un po&#39; di PHP&lt;br /&gt;
&lt;br /&gt;
Ovviamente a mio avviso la soluzione 3) è l&#39;unica praticabile.&lt;br /&gt;
&lt;br /&gt;
Oltretutto l&#39;operazione può essere eseguita in due step:&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
PRIMO STEP: ESEGUIRE UNA QUERY SQL&lt;/h4&gt;
La seguente query creerà le istruzioni SQL da eseguire successivamente:&lt;br /&gt;
&lt;br /&gt;
SELECT Concat(&#39;ALTER TABLE &#39;, TABLE_NAME, &#39; RENAME TO hors_&#39;, TABLE_NAME, &#39;;&#39;) FROM information_schema.tables WHERE table_schema = &#39;Sql718613_3&#39;&lt;br /&gt;
&lt;br /&gt;
Se usate PhpMyadmin (tipica situazione di partenza su tutti gli i principali servizi hosting), potete eseguire la query e poi esportare i risultati in un file SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCb_0QJ3bw64RaRjClkRXxsvfH9c-S1aNHM5Y8eGnwtjzlU2vfIXp0lp5cUNPJ6OwPc2OFzLi7KDb2HrOo_PZVMRA0bqV-VFzqEzDmcw_H7r-AxB4k8i6BOrOGEpUuzk3MN8zBRCgOtVk/s1600/risultati-della-query.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCb_0QJ3bw64RaRjClkRXxsvfH9c-S1aNHM5Y8eGnwtjzlU2vfIXp0lp5cUNPJ6OwPc2OFzLi7KDb2HrOo_PZVMRA0bqV-VFzqEzDmcw_H7r-AxB4k8i6BOrOGEpUuzk3MN8zBRCgOtVk/s1600/risultati-della-query.jpg&quot; height=&quot;259&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;risultati query&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl_ZttWqhC63TYtA9YobH96P8Zr3YPZYff402PpfbzSMNgKti_4ZgZbgDpIxjNJksuAMRkbNM7yk0GRzcILxXr6uuyPISsS1a_QkISBY26Kza2_l9at1YvhGt0OUTzs4x0lCOh28H0UDw/s1600/esportazione-risultati-query-mysql.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl_ZttWqhC63TYtA9YobH96P8Zr3YPZYff402PpfbzSMNgKti_4ZgZbgDpIxjNJksuAMRkbNM7yk0GRzcILxXr6uuyPISsS1a_QkISBY26Kza2_l9at1YvhGt0OUTzs4x0lCOh28H0UDw/s1600/esportazione-risultati-query-mysql.JPG&quot; height=&quot;158&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Esportazione dei risultati&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Il file ottenuto potrà essere reimportato su phpmyadmin ( o da riga di comando ) per essere eseguito, e tutte le tabelle saranno rinominate.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/392231667267937609/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/aggiungere-un-prefisso-tutte-le-tabelle.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/392231667267937609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/392231667267937609'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/aggiungere-un-prefisso-tutte-le-tabelle.html' title='Aggiungere un prefisso a tutte le tabelle di un database Magento (e più in generale su MySQL)'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKPKWwKD-Dy4UrFjqGm0LbxLo5myi4mjbQ0fxF7pp3hYh5LjuHh-mUsu0FMMkZH2hjZbi-1Gjz5C9DmhDMKqqYveJBfROuAM9o0_t4sXX_HWO5X_WUX3W7JVVFtx0IYqzB6bHQzck5myI/s72-c/prefisso-database-installazione-magento.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-8651887221032746745</id><published>2014-11-02T21:23:00.000+01:00</published><updated>2014-11-02T21:23:00.212+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database EAV magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>Magento, cercare articoli non assegnati a nessuna categoria</title><content type='html'>&lt;h3&gt;
Come cercare tutti gli articoli su Magento che non sono stati assegnati ad una categoria?&lt;/h3&gt;
Avete inserito i prodotti del Vostro catalogo e volete creare un report della situazione relativa a quelli non assegnati a nessuna categoria?&lt;br /&gt;
&lt;br /&gt;
Su Magento potete avere questa informazioni relativamente alla situazione di una categoria, per farlo è sufficiente andare nel backend:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9dizr4GUHRoZgTzG6k3kJ7uRH-uPeKbiylYb3CnnpHGLEZvtKktgyBzq409wFzKEXCxDJtHaUJ_mEjfo7RbyF242IrILgZ_d0P_2srjgqHATGRGImhlgZCt1tNSkWDCNz7JUN9w4z8Ww/s1600/magento-mostrare-i-prodotti-nella-categoria.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9dizr4GUHRoZgTzG6k3kJ7uRH-uPeKbiylYb3CnnpHGLEZvtKktgyBzq409wFzKEXCxDJtHaUJ_mEjfo7RbyF242IrILgZ_d0P_2srjgqHATGRGImhlgZCt1tNSkWDCNz7JUN9w4z8Ww/s1600/magento-mostrare-i-prodotti-nella-categoria.jpg&quot; height=&quot;270&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;tutti i prodotti della categoria corrente&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Come fare per avere un report relativo a tutte le categorie?&lt;br /&gt;
&lt;br /&gt;
Non esiste un&#39;interfaccia nel backend di Magento che ci permetta di farlo, però può venirci in aiuto l&#39;SQL.&lt;br /&gt;
&lt;h4&gt;
La query da eseguire&lt;/h4&gt;
Andate su phpmyadmin (o da riga di comando) ed eseguite la seguente query:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
SELECT e.entity_id, e.sku FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL&lt;/blockquote&gt;
&lt;div&gt;
Nei risultati potete cambiare i campi della select per conoscere informazioni differenti, di norma lo sku è sufficiente per evitare query più complesse nel database EAV di Magento che potrebbero richiedervi numerose e articolate JOIN.&lt;br /&gt;
&lt;br /&gt;
Se usate phpMyAdmin potete esportare i risultati in CSV per una più agevole lettura.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/8651887221032746745/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-cercare-articoli-non-assegnati.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8651887221032746745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8651887221032746745'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/11/magento-cercare-articoli-non-assegnati.html' title='Magento, cercare articoli non assegnati a nessuna categoria'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9dizr4GUHRoZgTzG6k3kJ7uRH-uPeKbiylYb3CnnpHGLEZvtKktgyBzq409wFzKEXCxDJtHaUJ_mEjfo7RbyF242IrILgZ_d0P_2srjgqHATGRGImhlgZCt1tNSkWDCNz7JUN9w4z8Ww/s72-c/magento-mostrare-i-prodotti-nella-categoria.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-389916009094328019</id><published>2014-09-02T05:28:00.000+02:00</published><updated>2014-09-02T05:28:00.159+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><title type='text'>Verificare in Magento se un modulo è installato e attivo</title><content type='html'>&lt;h2&gt;
Come verificare su Magento la presenza di un modulo?&lt;/h2&gt;
In alcuni casi può essere utile, su Magento, controllare se è stato installato oppure no un modulo.&lt;br /&gt;
&lt;br /&gt;
Ad esempio potrebbe essere utile far comportare il proprio tema in un modo o in un altro nel caso sia installato un modulo.&lt;br /&gt;
&lt;br /&gt;
Immaginate di avere installato un modulo aggiuntivo che sostituisce il checkout, ma quando viene aggiunto un prodotto al carrello, il redirect di default rimanda l&#39;utente al checkout normale.&lt;br /&gt;
&lt;br /&gt;
Naturalmente potreste modificare il comportamente del tasto ADDTOCART, ma potrebbero esserci in giro dei link che avete creato in precedenza. Con questo codice è possibile intercettare l&#39;installazione del modulo Magestore_onestepcheckout e redirezionare l&#39;utente alla giusta pagina.&lt;br /&gt;
&lt;br /&gt;
Il codice da usare a questo scopo è questo:&lt;br /&gt;
&lt;br /&gt;
$modules = Mage::getConfig()-&amp;gt;getNode(&#39;modules&#39;)-&amp;gt;children();&lt;br /&gt;
$modulesArray = (array)$modules;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
if(isset($modulesArray[&#39;Magestore_onestepcheckout&amp;nbsp;&#39;])) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $url=$this-&amp;gt;getCheckoutUrl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Mage::app()-&amp;gt;getFrontController()-&amp;gt;getResponse()-&amp;gt;setRedirect($url);&lt;br /&gt;
&lt;br /&gt;
} &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;
Oppure:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
if( $modules-&amp;gt;Magestore_Onestepcheckout-&amp;gt;active==true ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $url=$this-&amp;gt;getCheckoutUrl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Mage::app()-&amp;gt;getFrontController()-&amp;gt;getResponse()-&amp;gt;setRedirect($url);&lt;br /&gt;
} &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;
Sostanzialmente la stessa cosa.&lt;br /&gt;
&lt;h3&gt;
Verifica del modulo installato attraverso il framework di Magento&lt;/h3&gt;
In realtà è anche disponibile una soluzione migliore, usando però il metodo isModuleEnabled dell&#39;helper della classe Mage:&lt;br /&gt;
&lt;br /&gt;
Mage::helper(&#39;core&#39;)-&amp;gt;isModuleEnabled(&#39;Magestore_onestepcheckout&amp;nbsp;&#39;);&lt;br /&gt;
&lt;br /&gt;
In questo questo post di Stackoverflow potete trovare ulteriori alternative:&lt;br /&gt;
&lt;br /&gt;
http://stackoverflow.com/questions/4307407/magento-checking-if-a-module-is-installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/389916009094328019/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/09/verificare-in-magento-se-un-modulo-e.html#comment-form' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/389916009094328019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/389916009094328019'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/09/verificare-in-magento-se-un-modulo-e.html' title='Verificare in Magento se un modulo è installato e attivo'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-2559670211478652015</id><published>2014-09-01T13:13:00.000+02:00</published><updated>2014-09-01T13:13:00.027+02:00</updated><title type='text'>Cosa fare se avete gli indici bloccati su Magento</title><content type='html'>&lt;h2&gt;
Come sbloccare gli indici su Magento&lt;/h2&gt;
Cosa fare se in un sito Magento quando ricostruite gli indici non vanno in stato PRONTO?&lt;br /&gt;
&lt;br /&gt;
Le cause possono essere varie, in generale il timeout dello script causato da tempi di elaborazione troppo lunghi. Questo problema a sua volta può essere causato da risorse insufficienti nel momento in cui viene effettuata l&#39;operazione, specie se nel sito ci sono molti prodotti.&lt;br /&gt;
&lt;br /&gt;
Nel caso in cui il le risorse del server su cui è pubblicato il vostro sito siano sufficienti per l&#39;ordinaria amministrazione potrebbe succedere abbastanza raramente, ma nel caso in cui l&#39;operazione venga eseguita in contemporanea con un&#39;altra che sta già impegnando una quantità importante di risorse gli indici potrebbero restare bloccati in fase di elaborazione come nella seguente schermata:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIIqDMQhqa6MDCo5Z7qxHbKmI5bRr6-ZIXYbs0N3SL9jdXoFdOU16rEeQpl14XZoifSNjq6mGLY0cXvmIlnpVLlI_av076uiUAGYe__f15dx-PUpBtjC5LLJ-lWJLst02xWOB_7mtv7E/s1600/magento-indici-in-elaborazione.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIIqDMQhqa6MDCo5Z7qxHbKmI5bRr6-ZIXYbs0N3SL9jdXoFdOU16rEeQpl14XZoifSNjq6mGLY0cXvmIlnpVLlI_av076uiUAGYe__f15dx-PUpBtjC5LLJ-lWJLst02xWOB_7mtv7E/s1600/magento-indici-in-elaborazione.JPG&quot; height=&quot;262&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A questo punto nel momento in cui tentiate di ricostruirli nuovamente l&#39;operazione potrebbe non andare a buon fine a causa del fatto che una parte degli indici resta BLOCCATA.&lt;br /&gt;
&lt;h3&gt;
Sbloccare gli indici di Magento&lt;/h3&gt;
&lt;div&gt;
A parte aumentare i tempi di timeout di PHP nel php.ini, una soluzione manuale potrebbe essere la seguente procedura:&lt;/div&gt;
&lt;br /&gt;
1) cancellate gli indici svuotando la cartella /var/locks (solo il contenuto, non cancellate la cartella);&lt;br /&gt;
2)&amp;nbsp;andate database e cercate la tabella &lt;b&gt;index_process&lt;/b&gt;, modificate quindi i valori del campo &lt;b&gt;status&lt;/b&gt; in che non sono &lt;b&gt;pending &lt;/b&gt;in stato &lt;b&gt;pending&lt;/b&gt;&lt;br /&gt;
3) a questo punto ricostruite nuovamente gli indici&lt;br /&gt;
&lt;h3&gt;
Ricostruire gli indici del database di Magento da riga di comando&lt;/h3&gt;
Se il problema non è risolto potete tentare di ricostruire gli indici dala riga di comando (dovete però avere accesso al terminale).&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Per avviare l&#39;operazione potete andare nella cartella /shell del sito web, troverete un file indexer.php che può essere eseguito da riga di comando tramite la classe Mage_Shell_Compiler.&lt;br /&gt;
&lt;br /&gt;
Il file shell/indexer.php accetta come argomento il nome dell&#39;indice. Potete scegliere di ricostruire un indice alla volta oppure tutti gli 8 indici insieme. Naturalmente se avete risorse abbondanti potete scegliere la seconda ipotesi, ma in questo caso non dovreste essere arrivati a questo articolo!&lt;br /&gt;
&lt;br /&gt;
Quindi per risparmiare risorse e rendere il procedimento di ricostruzione più veloce e meno accidentato vi consiglio di ricostruirne uno alla volta tramite questa istruzione:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
php -f indexer.php -- -reindex catalog_url&lt;/blockquote&gt;
I nomi degli indici sono quelli che trovate nel campo&amp;nbsp;index_process.indexer_code.&lt;br /&gt;
&lt;br /&gt;
Oppure potete scegliere di ricostruire tutto, in questo modo:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
php -f indexer.php -- -reindexall&lt;/blockquote&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;Per ogni indice ricostruito riceverete un messaggio di conferma.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlpEQuEAnJeZnFppTbbHm_GkDfxlq9fYVXO4gVFkJkrlcTLF14VtJRBN5JARLwAtOI2p1Ktk_Z5eg4jd52N-GmnAu5LeLzstOG2PUB78FkEZQLAUl7BjA-SNY3FwuGhFqTQeaxeFuTTAc/s1600/magento-shell-reindexall.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlpEQuEAnJeZnFppTbbHm_GkDfxlq9fYVXO4gVFkJkrlcTLF14VtJRBN5JARLwAtOI2p1Ktk_Z5eg4jd52N-GmnAu5LeLzstOG2PUB78FkEZQLAUl7BjA-SNY3FwuGhFqTQeaxeFuTTAc/s1600/magento-shell-reindexall.JPG&quot; height=&quot;17&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
L&#39;elenco completo&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWhrW08HTJYOitG37jf0p9SBmAhpMGwSExQ6Y22M7aW5HKBK6xPRt64L0fl-p0yVh04JuEYzQ1Q1X1aRwiPcmNftV5IE-SAAMO2jfd74JRmljlFQJK_5Pvzq_bDBUIkhXzwwLByKwlXM/s1600/magento-tutti-indici-ricostruiti.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWhrW08HTJYOitG37jf0p9SBmAhpMGwSExQ6Y22M7aW5HKBK6xPRt64L0fl-p0yVh04JuEYzQ1Q1X1aRwiPcmNftV5IE-SAAMO2jfd74JRmljlFQJK_5Pvzq_bDBUIkhXzwwLByKwlXM/s1600/magento-tutti-indici-ricostruiti.JPG&quot; height=&quot;116&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Approfondimenti&lt;/h3&gt;
Per un ulteriore approfondimento potete andare su questo link&amp;nbsp;&lt;a href=&quot;http://inchoo.net/ecommerce/magento/executing-magento-indexer-from-shell/&quot;&gt;http://inchoo.net/ecommerce/magento/executing-magento-indexer-from-shell/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/2559670211478652015/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/09/cosa-fare-se-avete-gli-indici-bloccati.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/2559670211478652015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/2559670211478652015'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/09/cosa-fare-se-avete-gli-indici-bloccati.html' title='Cosa fare se avete gli indici bloccati su Magento'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIIqDMQhqa6MDCo5Z7qxHbKmI5bRr6-ZIXYbs0N3SL9jdXoFdOU16rEeQpl14XZoifSNjq6mGLY0cXvmIlnpVLlI_av076uiUAGYe__f15dx-PUpBtjC5LLJ-lWJLst02xWOB_7mtv7E/s72-c/magento-indici-in-elaborazione.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-8843469832268270092</id><published>2014-08-31T19:07:00.000+02:00</published><updated>2014-08-31T19:07:00.149+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento SEO"/><title type='text'>Magento - rimozione della cartella per il negozio predefinito (pubblicazione di tutte le url sulla root)</title><content type='html'>&lt;h2&gt;
Magento - Pubblicazione degli url sulla root per il negozio predefinito&lt;/h2&gt;
Per varie ragioni principalmente legate alla SEO può essere necessario (o comunque preferibile) mettere tutti gli indirizzi del negozio predefinito sulla root del sito web anzichè su una sottocartella (tipicamente /it/ per i siti italiani).&lt;br /&gt;
&lt;br /&gt;
Questo significa far gestire a Magento gli url senza aggiungere il codice negozio per avere gli url sulla root e poi forzarne il caricamento su sottocartelle create appositamente per i restanti codici negozio.&lt;br /&gt;
&lt;h3&gt;
Disabilitiamo su Magento l&#39;aggiunta del Codice del Negozio agli URLs&lt;/h3&gt;
Innanzitutto disabilitiamo quindi l&#39;aggiunta del codice negozio agli Url:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggPyxd7d_v-hqprF6Kp8zlhyLVdNA4c6r3W76Cw21lZXIfRfKdqNB5GOJtCDlZoQGkplNQy-hMtgp-AtnWitr5rESny7kTDILU9ZE7QY62865anNJVRpJIovZmUD1bkE031PV-ubnxqXM/s1600/04.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggPyxd7d_v-hqprF6Kp8zlhyLVdNA4c6r3W76Cw21lZXIfRfKdqNB5GOJtCDlZoQGkplNQy-hMtgp-AtnWitr5rESny7kTDILU9ZE7QY62865anNJVRpJIovZmUD1bkE031PV-ubnxqXM/s1600/04.JPG&quot; height=&quot;98&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A questo punto tutti gli url saranno sulla root.&lt;br /&gt;
&lt;h3&gt;
Creazione della cartella con il codice negozio per il negozio NON predefinito&lt;/h3&gt;
Ora creiamo una cartella per ogni negozio NON PREDEFINITO, utilizzeremo il codice negozio per nominare la cartella. In ciascuna di queste cartelle copieremo i seguenti file dalla root di Magento:&lt;br /&gt;
&lt;br /&gt;
* .htaccess&lt;br /&gt;
* index.php&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ofbwpjvF8JdJTmCT_aenOpt5eG1DDJQOd04gxzm6jtJ9waR5XBDoZcAu9VZR2uxRGpBgEvvwRvem4uyfvtTuNs-GPTIR4Dy3WUBOFciYMS2j2pr5o62WvioyrxxwNMzxKxCQXreHhwE/s1600/00.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ofbwpjvF8JdJTmCT_aenOpt5eG1DDJQOd04gxzm6jtJ9waR5XBDoZcAu9VZR2uxRGpBgEvvwRvem4uyfvtTuNs-GPTIR4Dy3WUBOFciYMS2j2pr5o62WvioyrxxwNMzxKxCQXreHhwE/s1600/00.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In seguito vedremo quali modifiche vanno effettuate ai due file.&lt;br /&gt;
&lt;h3&gt;
Impostazione dell&#39;url per ogni negozio&lt;/h3&gt;
Ora per ogni negozio dovremo specificare manualmente l&#39;indirizzo del sito web.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrWVSkfJGFQosNs8ixTEoeWCqLFdMI4J_-gFvCDlFyR1vTOnlGRh5w6wf3bGiVfm6E2izJs7GFTFO2hG0z3U89D4fq1dBzFVKdZz6AZRCGM_jjGKRnnJ8gWPX_w8M7ovUmMpm4XY1pvjI/s1600/03.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrWVSkfJGFQosNs8ixTEoeWCqLFdMI4J_-gFvCDlFyR1vTOnlGRh5w6wf3bGiVfm6E2izJs7GFTFO2hG0z3U89D4fq1dBzFVKdZz6AZRCGM_jjGKRnnJ8gWPX_w8M7ovUmMpm4XY1pvjI/s1600/03.JPG&quot; height=&quot;140&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Le differenze rispetto alle normali configurazioni è che:&lt;br /&gt;
&lt;br /&gt;
* per URL di base inseriamo http://www.ilmiositoweb.it/en/ che è il percorso effettivo del sito web;&lt;br /&gt;
* per Skin URL di base andiamo ad inserire al posto della solita variabile {{unsecure_base_url}} l&#39;indirizzo del sito web http://www.ilmiositoweb.it/skin. Lo stesso discorso vale per i campi Media URL di base e JavaScript URL di base;&lt;br /&gt;
&lt;br /&gt;
Questo perchè ogni store deve utilizzare come root la cartella fisica corrispondente al codice negozio, ma deve prendere dalla root principale del sito &amp;nbsp;i CSS, le immagini e i JavaScript.&lt;br /&gt;
&lt;br /&gt;
La stessa procedura vale per gli indirizzi sicuri, se utilizzate una sessione HTTPS.&lt;br /&gt;
&lt;h3&gt;
MODIFICA DEL FILE index.php&lt;/h3&gt;
Ora che abbiamo modificato detto a Magento di usare come root per ogni store NON PREDEFINITO le cartelle fisiche nominate come i codici negozio, dobbiamo modificare file .htaccess e index.php per far funzionare l&#39;entry point principale del software.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWVazmX56lQ_SFfqqyvfyLVuu2Jttey-wtbTMN4Zu0i0_gWbmHsHXGU-M56QbNKiyJNM2Ad1FbgibJD2kjgtO6j6-LQwM5Yjhyphenhyphen3816SBOxXj2u5c2YFjYz0C2LYFlMwxdYFWIVOz4206o/s1600/02.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWVazmX56lQ_SFfqqyvfyLVuu2Jttey-wtbTMN4Zu0i0_gWbmHsHXGU-M56QbNKiyJNM2Ad1FbgibJD2kjgtO6j6-LQwM5Yjhyphenhyphen3816SBOxXj2u5c2YFjYz0C2LYFlMwxdYFWIVOz4206o/s1600/02.JPG&quot; height=&quot;88&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
a questo punto dobbiamo modificare l&#39;entry point di Magento, il file index.php contenuto nella cartella /en/ appena creata, non quello sulla root.&lt;br /&gt;
&lt;br /&gt;
Andiamo alla fine del file, qui troveremo il seguente codice:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
/* Store or website code */&lt;br /&gt;
$mageRunCode = isset($_SERVER[&#39;MAGE_RUN_CODE&#39;]) ? $_SERVER[&#39;MAGE_RUN_CODE&#39;] : &#39;&#39;;&lt;br /&gt;
/* Run store or run website */&lt;br /&gt;
$mageRunType = isset($_SERVER[&#39;MAGE_RUN_TYPE&#39;]) ? $_SERVER[&#39;MAGE_RUN_TYPE&#39;] : &#39;store&#39;;&lt;br /&gt;
Mage::run($mageRunCode, $mageRunType);&lt;/blockquote&gt;
&lt;br /&gt;
inseriremo quindi le seguenti variabili prima dell&#39;ultima riga:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$mageRunCode=&quot;en&quot;;&lt;br /&gt;
$mageRunType=&quot;store&quot;;&lt;br /&gt;
Mage::run($mageRunCode, $mageRunType);&lt;/blockquote&gt;
In questo modo le variabili $mageRunCode e $mageRunType anzichè essere impostate dinamicamente avranno sempre lo stesso valore a seconda della cartella dove si trovano.&lt;br /&gt;
&lt;br /&gt;
Ora dobbiamo dire a Magento i percorsi giusti per le variabili:&lt;br /&gt;
&lt;br /&gt;
* $compilerConfig&lt;br /&gt;
* $mageFilename&lt;br /&gt;
&lt;br /&gt;
e indicare il percorso giusto per il file errors/503.php&lt;br /&gt;
&lt;br /&gt;
Per fare questo, dato che sarà il file /en/index.php il nuovo entry point, avremo bisogno di modificare i percorsi dicendogli di salire di un livello e andare sulla root.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBjAUxa22q_mnS2DBJh6BtuZ8_G_VvMM6FncJMsGzYkzQObo2QMi5GyPZjDivlQCvRi8Z-1lF2wvLE48QpFaVlB_ip2f7DWJHqrv9fe223_20zBPtad3OtwoPLS1DKQOKvFmskf-yVO14/s1600/05.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBjAUxa22q_mnS2DBJh6BtuZ8_G_VvMM6FncJMsGzYkzQObo2QMi5GyPZjDivlQCvRi8Z-1lF2wvLE48QpFaVlB_ip2f7DWJHqrv9fe223_20zBPtad3OtwoPLS1DKQOKvFmskf-yVO14/s1600/05.JPG&quot; height=&quot;316&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
Modifica del file .htaccess&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWcfhpnEg6QMgB2GU3N___06gDVVZ6cH4FcVJsjYK6qk5uoTtsuWxgKUAqJr1NaCZLLm1Z3wsuY_uO1qd-Ko6U3fqym-caacIJoojBKAnhYwLY4-0PPKWL-UjK-TXCccvAJSFrLkdKFo/s1600/01.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWcfhpnEg6QMgB2GU3N___06gDVVZ6cH4FcVJsjYK6qk5uoTtsuWxgKUAqJr1NaCZLLm1Z3wsuY_uO1qd-Ko6U3fqym-caacIJoojBKAnhYwLY4-0PPKWL-UjK-TXCccvAJSFrLkdKFo/s1600/01.JPG&quot; height=&quot;135&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Alla riga 123 del file .htaccess (se non sono state effettuate altre modifiche al file) troveremo la riga&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
# RewriteBase /magento/&lt;/blockquote&gt;
decommentiamola e inseriamo al posto di /magento/ il percorso della cartella su cui vogliamo inserire la root del sito web. in questo modo:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
RewriteBase /en/&lt;/blockquote&gt;
In questo modo varemo modificato correttamente il percorso dei negozio.&lt;br /&gt;
&lt;h4&gt;
Ordine degli store&lt;/h4&gt;
Sulle vecchie versioni di Magento (1.7 e precedenti) occorre indicare come store predefinito in SISTEMA -&amp;gt; GESTIONE NEGOZI-&amp;gt; NOME VISTA NEGOZIO l&#39;ordine di caricamento del negozio. Nelle versioni più recenti (1.8 e successive) occorre inserire sempre in SISTEMA -&amp;gt; GESTIONE NEGOZI-&amp;gt; NOME VISTA NEGOZIO la vista negozio di default.&lt;br /&gt;
&lt;h3&gt;
Localizzazione&lt;/h3&gt;
Infine in SISTEMA -&amp;gt; CONFIGURAZIONE -&amp;gt; GENERALE non dimentichiamoci di impostare come lingua predefinita quella del negozio predefinito.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiATpldt3-lcDY70o8lTxPelHRXhNOLcgOtBkjZgdOdLrSyAwFYLP_4LmvmI4EVssKxdekyFt70xCDui1BPkevENpZN2d5Efz0hNfe8WlqtEOvONRkOoIGueQSlRLOvrqUlug5brnDnHLQ/s1600/06.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiATpldt3-lcDY70o8lTxPelHRXhNOLcgOtBkjZgdOdLrSyAwFYLP_4LmvmI4EVssKxdekyFt70xCDui1BPkevENpZN2d5Efz0hNfe8WlqtEOvONRkOoIGueQSlRLOvrqUlug5brnDnHLQ/s1600/06.JPG&quot; height=&quot;125&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/8843469832268270092/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/magento-rimozione-della-cartella-per-il.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8843469832268270092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/8843469832268270092'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/magento-rimozione-della-cartella-per-il.html' title='Magento - rimozione della cartella per il negozio predefinito (pubblicazione di tutte le url sulla root)'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggPyxd7d_v-hqprF6Kp8zlhyLVdNA4c6r3W76Cw21lZXIfRfKdqNB5GOJtCDlZoQGkplNQy-hMtgp-AtnWitr5rESny7kTDILU9ZE7QY62865anNJVRpJIovZmUD1bkE031PV-ubnxqXM/s72-c/04.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-1050490783693921905</id><published>2014-08-28T03:05:00.000+02:00</published><updated>2014-08-21T19:12:15.288+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Virtuemart 2.0"/><title type='text'>» Programmatore php joomla esperto SEO @ Davide Taddei: Disabilitare il Multivendor su Virtuemart 2 se è s...</title><content type='html'>&lt;a href=&quot;http://espertojoomla.blogspot.com/2014/08/disabilitare-il-multivendor-su.html?spref=bl&quot;&gt;» Programmatore php joomla esperto SEO @ Davide Taddei: Disabilitare il Multivendor su Virtuemart 2 se è s...&lt;/a&gt;: La funzione multivendor di Virtuemart 2 può essere attivata o disattivata in questo modo:</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/1050490783693921905/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo_37.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1050490783693921905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1050490783693921905'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo_37.html' title='» Programmatore php joomla esperto SEO @ Davide Taddei: Disabilitare il Multivendor su Virtuemart 2 se è s...'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-1208793708789720305</id><published>2014-08-27T04:38:00.000+02:00</published><updated>2014-08-21T19:11:42.402+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Virtuemart 2.0"/><title type='text'>» Programmatore php joomla esperto SEO @ Davide Taddei: modificare il footer dell&#39;e-mail dell&#39;ordine in Vi...</title><content type='html'>&lt;a href=&quot;http://espertojoomla.blogspot.com/2014/08/modificare-il-footer-delle-mail.html?spref=bl&quot;&gt;» Programmatore php joomla esperto SEO @ Davide Taddei: modificare il footer dell&#39;e-mail dell&#39;ordine in Vi...&lt;/a&gt;: A volte può servire modificare il messaggio di conferma d&#39;ordine di Virtuemart 2.   Potrebbe capitare ad esempio di non avere Shop Name ...</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/1208793708789720305/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo_21.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1208793708789720305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1208793708789720305'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo_21.html' title='» Programmatore php joomla esperto SEO @ Davide Taddei: modificare il footer dell&#39;e-mail dell&#39;ordine in Vi...'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-1464555402440741409</id><published>2014-08-26T05:59:00.000+02:00</published><updated>2014-08-21T19:11:52.734+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Virtuemart 2.0"/><title type='text'>» Programmatore php joomla esperto SEO @ Davide Taddei: Tradurre i campi personalizzati (custom fields) di...</title><content type='html'>&lt;a href=&quot;http://espertojoomla.blogspot.com/2014/08/tradurre-i-campi-personalizzati-custom.html?spref=bl&quot;&gt;» Programmatore php joomla esperto SEO @ Davide Taddei: Tradurre i campi personalizzati (custom fields) di...&lt;/a&gt;: Per tradurre i campi personalizzati su Virtuemart 2 è sufficiente seguire la stessa logica di Joomla! integrato quindi per tradurre il valor...</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/1464555402440741409/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1464555402440741409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/1464555402440741409'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/programmatore-php-joomla-esperto-seo.html' title='» Programmatore php joomla esperto SEO @ Davide Taddei: Tradurre i campi personalizzati (custom fields) di...'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-7573453747553754467</id><published>2014-08-23T15:56:00.000+02:00</published><updated>2015-10-09T23:31:06.193+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database EAV magento"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="script magento"/><title type='text'>Eliminazione delle immagini dal Database MySql e struttura EAV del database di Magento</title><content type='html'>&lt;h2&gt;
Eliminazione delle immagini dal Database MySql di Magento&lt;/h2&gt;
Su Magento può capitare di voler eliminare le immagini dei prodotti direttamente dal database. Per farlo occorre modificare i dati delle seguenti tabelle coinvolte sono:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;catalog_product_entity_varchar&lt;/li&gt;
&lt;li&gt;catalog_product_entity_media_gallery&lt;/li&gt;
&lt;li&gt;catalog_product_entity_media_gallery_value&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Le tabelle della galleria&lt;/h3&gt;
Le seguenti tabelle:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;catalog_product_entity_media_gallery&lt;/li&gt;
&lt;li&gt;catalog_product_entity_media_gallery_value&lt;/li&gt;
&lt;/ul&gt;
contengono le immagini della galleria, per eliminare tutti i record è quindi sufficiente eseguire le seguenti query:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
DELETE FROM catalog_product_entity_media_gallery_value&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
DELETE FROM catalog_product_entity_media_gallery&lt;/blockquote&gt;
A causa delle Foreign Key&lt;b&gt; un comando TRUNCATE non funzionerebbe&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Infine si possono eliminare le immagini dalla tabella:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;catalog_product_entity_varchar&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
E&#39; possibile utilizzare la seguente istruzione SQL:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
DELETE FROM `catalog_product_entity_varchar` WHERE `attribute_id`=85 OR `attribute_id`=86 OR `attribute_id`=87&lt;/blockquote&gt;
I valori 85 - 86 - 87 della clausola WHERE rappresentano i vari formati di immagine disponibili per il prodotto su Magento (image, thumb, small).&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Osservazioni sulla struttura della tabella catalog_product_entity_varchar e sul database EAV di Magento&amp;nbsp;&lt;/h3&gt;
Questa tabella contiene gli attributi di tipo VARCHAR dei prodotti inseriti. In Magento la maggior parte delle informazioni relative ai prodotti sono gestite come attributi. Quindi un&#39;istruzione DELETE senza nessuna WHERE specificata come nel caso delle tabelle relative alla galleria delle immagini cancellerebbe, non solo i riferimenti ai file delle immagini dei prodotti ma anche altre informazioni.&lt;br /&gt;
&lt;br /&gt;
I campi della tabella sono i seguenti:&lt;br /&gt;
&lt;br /&gt;
* value_id, la chiave primaria della tabella&lt;br /&gt;
* entity_type_id, il tipo di entità, nel caso dei prodotti del catalogo il valore è sempre 4&lt;br /&gt;
* attribute_id, il tipo di attributo da cancellare&lt;br /&gt;
* store_id, l&#39;id del negozio (sarà sempre 1 se non gestite un sito multilingua o un multistore)&lt;br /&gt;
* entity_id, l&#39;id del recordprodotto&lt;br /&gt;
* value, il valore effettivamente inserito&lt;br /&gt;
&lt;br /&gt;
Se volete verificare quali informazioni sono disponibili per un singolo prodotto (supponiamo quello con id 363) potete quindi eseguire la seguente query:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
SELECT * FROM &amp;nbsp;`catalog_product_entity_varchar` WHERE &amp;nbsp;`entity_id` =363;&lt;/blockquote&gt;
troverete tutti gli attributi assegnati a quel prodotto. Per conoscere a cosa corrisponde il valore dell&#39;attribute_id, è sufficiente andare nel pannello di controllo su &lt;b&gt;CATALOGO-&amp;gt;ATTRIBUTI-&amp;gt;GESTIONE ATTRIBUTI&lt;/b&gt; e &amp;nbsp;verificare il valore dell&#39;attributo.&lt;br /&gt;
&lt;br /&gt;
Se filtrerete i nomi degli attributi con i seguenti codici attributo:&lt;br /&gt;
&lt;br /&gt;
* thumbnail&lt;br /&gt;
* image&lt;br /&gt;
* small_image&lt;br /&gt;
&lt;br /&gt;
troverete appunto gli id 85, 86 e 87.&lt;br /&gt;
&lt;h4&gt;
Per saperne di più sulla struttura EAV del database di Magento:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://fishpig.co.uk/magento/tutorials/eav-database-structure/&quot;&gt;http://fishpig.co.uk/magento/tutorials/eav-database-structure/&lt;/a&gt; (tutorial in inglese)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://sqlblog.com/blogs/aaron_bertrand/archive/2009/11/19/what-is-so-bad-about-eav-anyway.aspx&quot;&gt;http://sqlblog.com/blogs/aaron_bertrand/archive/2009/11/19/what-is-so-bad-about-eav-anyway.aspx&lt;/a&gt; (appunti in inglese sulla performance di un database EAV)&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/7573453747553754467/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/eliminazione-delle-immagini-dal.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7573453747553754467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/7573453747553754467'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2014/08/eliminazione-delle-immagini-dal.html' title='Eliminazione delle immagini dal Database MySql e struttura EAV del database di Magento'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2720399798829058627.post-6385533719943917559</id><published>2012-04-17T15:45:00.000+02:00</published><updated>2015-10-09T23:32:38.918+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="seo"/><title type='text'>La SEO influenza i Social Media? I Social Media influenzano la SEO?</title><content type='html'>&lt;div id=&quot;__ss_12572701&quot; style=&quot;width: 510px;&quot;&gt;
&lt;span style=&quot;display: block; margin: 12px 0 4px;&quot;&gt;Social media e SEO sono talvolta contrapposti &amp;nbsp;come possibilità di portare traffico al nostro sito web, a volte per motivi di budget (non abbiamo i soldi per fare tutte e due) altre volte per motivi di tempo (non abbiamo tempo di seguire entrambi i progetti) molto spesso perchè i webmaster sono più orientati verso una delle due soluzioni e detestano l&#39;altra.&lt;/span&gt;&lt;span style=&quot;display: block; margin: 12px 0 4px;&quot;&gt;In tutti e tre i casi è evidente la mancanza di un approccio professionale al problema, in queste slides un metodo ragionato basato sull&#39;esperienza di anni di SEO della M.C. Marketing e Comunicazione, web agency anconetana che dal 1997 si occupa di curare la visibilità dei propri clienti sul web, ci aiuta a orientarci verso la strada giusta per una strategia di vincente di visibilità sul web.&lt;/span&gt;&lt;strong style=&quot;display: block; margin: 12px 0 4px;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/gruppomc/social-media-seo-12572701&quot; target=&quot;_blank&quot; title=&quot;Social media &amp;amp; seo&quot;&gt;Social Media &amp;amp; SEO&lt;/a&gt;&lt;/strong&gt; &lt;iframe frameborder=&quot;0&quot; height=&quot;426&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/12572701?rel=0&quot; width=&quot;510&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;div style=&quot;padding: 5px 0 12px;&quot;&gt;
Guarda altre interessanti presentazioni sul canale Slideshare di&amp;nbsp;&lt;a href=&quot;http://www.slideshare.net/gruppomc&quot; target=&quot;_blank&quot;&gt;Gruppo M.C. Ancona dal 1979 / Consulenti aziendali e Web agency&lt;/a&gt; &lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://davidetaddei.blogspot.com/feeds/6385533719943917559/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davidetaddei.blogspot.com/2012/04/la-seo-influenza-i-social-media-i.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/6385533719943917559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2720399798829058627/posts/default/6385533719943917559'/><link rel='alternate' type='text/html' href='http://davidetaddei.blogspot.com/2012/04/la-seo-influenza-i-social-media-i.html' title='La SEO influenza i Social Media? I Social Media influenzano la SEO?'/><author><name>Wordpress programmatore esperto</name><uri>http://www.blogger.com/profile/00876240652348125257</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizcFTD4ofXWEfoP0BaWRqJH5Rz3ZkbgZxt9pJv8d-sDnng49EiOMPFY4iA4XNwMbOo3-pKVEWzm4oqPrjYPl_6z7_zpKqHHZ50hpTx_eU9J6iQPZogx11OlR_dCEQoVGgRxYakWUuzPN9PnG_madBmiEfKW-Txzgd01-5Ud4j-jDiB6g/s1600/avatar-davide-taddei.jpg'/></author><thr:total>0</thr:total></entry></feed>