<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Icefusion Portal</title>
	<atom:link href="http://www.icefusion.com.br/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icefusion.com.br</link>
	<description>Programação, Redes, Linux, WebDeveloper</description>
	<lastBuildDate>Wed, 16 May 2012 01:30:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>jQuery &#8211; Plugin para Máscaras em Campo</title>
		<link>http://www.icefusion.com.br/jquery-plugin-para-mascaras-em-campo/</link>
		<comments>http://www.icefusion.com.br/jquery-plugin-para-mascaras-em-campo/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 22:49:11 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[campos]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[máscara]]></category>
		<category><![CDATA[mask]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=560</guid>
		<description><![CDATA[Muito importante para os sites atuais, a máscara é usada para orientar o usuário a fazer a entrada correta dos dados antes de envia-los via formulário. Para esse tipo de trabalho, o jQuery possui um plugin especial (masked input plugin), que atribui as máscaras conforme configuradas pelo desenvovedor. O primeiro passo é adicionar o jQuery]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Muito importante para os sites atuais, a máscara é usada para orientar o usuário a fazer a entrada correta dos dados antes de envia-los via formulário. Para esse tipo de trabalho, o jQuery possui um plugin especial (<a title="Masked Input Plugin" href="http://digitalbush.com/projects/masked-input-plugin/">masked input plugin</a>), que atribui as máscaras conforme configuradas pelo desenvovedor.</p>
<p><span id="more-560"></span></p>
<p style="text-align: justify;">O primeiro passo é adicionar o jQuery e o Plugin no head do site conforme abaixo:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;</pre></div></div>

<p style="text-align: justify;">Depois de adicionado o jQuery e o Plugin, deve-se configurar o plugin com as classes e máscaras que serão utilizadas, tudo isso dentro de uma chamada jQuery. Pode ser feito no head após as chamadas dos scripts, ou seguindo as recomendações no footer.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#data&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;99/99/9999&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#fone&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;(999) 999-9999&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cep&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;99999-999&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cpf&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;999.999.999-99&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cnpj&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;99.999.999/9999-99&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p style="text-align: justify;">Note que os campos que forem configurados, as máscaras apareceram com as barras ou hifens e com o underline como marcação onde irão os caracteres (placeholder).</p>
<p style="text-align: justify;">Os caracteres aceitos pelo plugin são os seguintes:</p>
<ul style="text-align: justify;">
<li>a – Representa um carácter alpha numérico (A-Z,a-z)</li>
<li>9 – Representa um carácter numérico (0-9)</li>
<li>* – Representa um carácter alpha numeric character (A-Z,a-z,0-9)</li>
</ul>
<div style="text-align: justify;">O link para download do plugin é o seguinte:</div>
<div>
<ul>
<li style="text-align: justify;"><a href="http://digitalbush.com/projects/masked-input-plugin/">Masked Input Plugin</a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/jquery-plugin-para-mascaras-em-campo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurando um Cliente do GIT &#8211; Linux</title>
		<link>http://www.icefusion.com.br/configurando-um-cliente-do-git-linux/</link>
		<comments>http://www.icefusion.com.br/configurando-um-cliente-do-git-linux/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 02:46:17 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[controle]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[repositório]]></category>
		<category><![CDATA[versão]]></category>
		<category><![CDATA[versionamento]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=549</guid>
		<description><![CDATA[E ae galera como vão? No post anterior, eu expliquei como configurar a parte de servidor do GIT. Neste post estarei explicando como configurar o client para que possa atualizar o repositório conforme as atualizações no seu servidor local, isto é, em sua máquina. No post de agora estarei explicando a instalação e configuração no]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">E ae galera como vão? No post anterior, eu expliquei como configurar a parte de servidor do GIT. Neste post estarei explicando como configurar o client para que possa atualizar o repositório conforme as atualizações no seu servidor local, isto é, em sua máquina. No post de agora estarei explicando a instalação e configuração no linux, e no próximo estarei fazendo isto para o windows.</p>
<p style="text-align: justify;"><span id="more-549"></span>Caso a instalação que foi feita anteriormente na configuração seja no mesmo computador que estará trabalhando, a parte de instalação não é necessária. Caso o contrário basta repetir os passo do artigo<a href="http://www.icefusion.com.br/configurando-servidor-git/"> anterior</a>.</p>
<p style="text-align: justify;">Após feita a instalação e a configuração do repositório no servidor, para configurar o client você deverá fazer os seguintes passos.</p>
<p style="text-align: justify;">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">1</span> - <span style="color: #c20cb9; font-weight: bold;">git</span> config <span style="color: #660033;">--global</span> user.name <span style="color: #ff0000;">'&amp;lt;name&amp;gt;'</span>
<span style="color: #000000;">2</span> - <span style="color: #c20cb9; font-weight: bold;">git</span> config <span style="color: #660033;">--global</span> user.email <span style="color: #ff0000;">'&amp;lt;email&amp;gt;'</span>
<span style="color: #000000;">3</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> projeto
<span style="color: #000000;">4</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">git</span> init
<span style="color: #000000;">5</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">git</span> add .
<span style="color: #000000;">6</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> ‘Inicializando Repositório’
<span style="color: #000000;">7</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>host:localização_arquivos
<span style="color: #000000;">8</span> - aioros$ <span style="color: #c20cb9; font-weight: bold;">git</span> push origin master
Counting objects: <span style="color: #000000;">13</span>, done.
Compressing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, done.
Writing objects: <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">13</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000;">1.20</span> KiB, done.
Total <span style="color: #000000;">13</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, reused <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>delta <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
To <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>host:localização_arquivos
<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>new branch<span style="color: #7a0874; font-weight: bold;">&#93;</span> master -<span style="color: #000000; font-weight: bold;">&amp;</span>gt; master</pre></div></div>

<p>&nbsp;</p>
<p style="text-align: justify;">feito isto o seu repositório está configurado e pronto para você trabalhar em cima dele.</p>
<p style="text-align: justify;">Explicando os comando:</p>
<p style="text-align: justify;">1 &#8211; Setando Nome do usuário do Repositório.</p>
<p style="text-align: justify;">2 &#8211; Setando Email do usuário.</p>
<p style="text-align: justify;">3 &#8211; Criando o Diretório do Projeto .</p>
<p style="text-align: justify;">4 &#8211; Inicialização do Versionamento<strong>.<br style="text-align: justify;" /></strong></p>
<p style="text-align: justify;">5 &#8211; Adicionando todos arquivos para serem commitados<strong>.</strong></p>
<p style="text-align: justify;">6 &#8211; Comitando arquivos para o repositório<strong>.</strong></p>
<p style="text-align: justify;">7 &#8211; Configurando o Repositório Remoto.</p>
<p style="text-align: justify;">8 &#8211; Enviando Arquivos para o Repositório.</p>
<p style="text-align: justify;">
<p style="text-align: justify;">Creio que seja isto para configurar o client. No Windows é a mesma coisa, porém tem que ser instalado a versão deste local &#8211; <a href="http://code.google.com/p/msysgit/downloads/list" target="_blank">http://code.google.com/p/msysgit/downloads/list<br />
</a></p>
<p style="text-align: justify;">utilizado a instalação do <a href="http://code.google.com/p/msysgit/" target="_blank">msysGit</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/configurando-um-cliente-do-git-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Trabalhando com GIT]]></series:name>
	</item>
		<item>
		<title>Configurando um Servidor GIT</title>
		<link>http://www.icefusion.com.br/configurando-servidor-git/</link>
		<comments>http://www.icefusion.com.br/configurando-servidor-git/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 13:18:47 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[configurando]]></category>
		<category><![CDATA[controle]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[versão]]></category>
		<category><![CDATA[versionamento]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=541</guid>
		<description><![CDATA[Como vão galera? Bom estarei iniciando com este post, uma série de posts sobre como instalar, configurar e utilizar o GIT. Como dito num artigo anterior, o GIT  é um sistema de controle de versões de fácil utilização (claro após conhecer os comandos), principalemente para usuários habituados ao sitema de linha de comandos (shell, console)]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Como vão galera? Bom estarei iniciando com este post, uma série de posts sobre como instalar, configurar e utilizar o GIT. Como dito num artigo anterior, o GIT  é um sistema de controle de versões de fácil utilização (claro após conhecer os comandos), principalemente para usuários habituados ao sitema de linha de comandos (shell, console) do Linux.</p>
<p style="text-align: justify;"><span id="more-541"></span>Bom seguindo nosso post, estarei demonstrando como instalar o git e configura-lo no servidor. O primeiro passo para configurar é você saber qual a distribuição linux que você está instalando o GIT. No meu caso, utilizo o Debian, portanto os comandos aqui demonstrados para a instalação serão em cima da plataforma do Debian. Para informações sobre outras distro, creio que o google tem um bom acervo.</p>
<p style="text-align: justify;">Primeiro estaremos executando os comandos de instalação.</p>
<p style="text-align: justify;">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">aioros:~<span style="color: #666666; font-style: italic;"># apt-get install git-core</span></pre></div></div>

</p>
<p style="text-align: justify;">após instalado, você pode checar se o pacote foi instalado corretamente utilizando</p>
<p style="text-align: justify;">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">aioros:~<span style="color: #666666; font-style: italic;"># dpkg -l git-core</span></pre></div></div>

</p>
<p style="text-align: justify;">Tudo instalado, iremos agora configurar os repositórios. Nesta parte, você usuário deve saber onde está configurado o seu diretório do ftp. Ele pode estar no /var/www ou como no meu caso, está configurado numa pasta public_html no home do meu usuário linux (no meu caso icefusion).</p>
<p style="text-align: justify;">Você irá acessar este local e dentro dele escolherá o diretório de seu projeto caso já exista, ou criará uma nova. Dentro do diretório de seu projeto você irá executar os seguinte comando:</p>
<p style="text-align: justify;">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">aioros:~<span style="color: #666666; font-style: italic;"># git --bare init</span></pre></div></div>

</p>
<p style="text-align: justify;">Com este comando, você estará inicializando um novo repositório no servidor. Após esta configuração, agora você pode começar a configurar o git no seu computador para trabalhar cm o servidor. Estas configurações serão expostas no próximo post.</p>
<p style="text-align: justify;">
<p style="text-align: justify;">Obrigado!<strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/configurando-servidor-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[Trabalhando com GIT]]></series:name>
	</item>
		<item>
		<title>Botão Share / Compartilhar &#8211; Parte 2</title>
		<link>http://www.icefusion.com.br/botao-share-compartilhar-parte-2/</link>
		<comments>http://www.icefusion.com.br/botao-share-compartilhar-parte-2/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 02:44:43 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[addthis]]></category>
		<category><![CDATA[botão]]></category>
		<category><![CDATA[compartilhar]]></category>
		<category><![CDATA[dzone]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mídias]]></category>
		<category><![CDATA[reddit]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[sharesidebar]]></category>
		<category><![CDATA[sociais]]></category>
		<category><![CDATA[stumbleupon]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=530</guid>
		<description><![CDATA[Yo&#8230; Estou colocando mais alguns botões de compartilhamento para ajudar a todos na divulgação de seus sites. Reddit &#60;script&#62;reddit_url='&#60;data:post.url/&#62;'&#60;/script&#62; &#60;script&#62;reddit_title='&#60;data:post.title/&#62;'&#60;/script&#62; &#60;script language=&#34;javascript&#34; src=&#34;http://reddit.com/button.js?t=2&#34;&#62;&#60;/script&#62; Maiores Informações: http://www.reddit.com/buttons/ Stumbleupon &#60;script src=&#34;http://www.stumbleupon.com/hostedbadge.php?s=5&#34;&#62;&#60;/script&#62; Maiores Informações:http://www.stumbleupon.com/badges/landing/ Addthis &#60;!-- AddThis Button BEGIN --&#62; &#60;div class=&#34;addthis_toolbox addthis_default_style &#34;&#62; &#60;a class=&#34;addthis_counter&#34;&#62;&#60;/a&#62; &#60;/div&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e2790083eb75e8f&#34;&#62;&#60;/script&#62; &#60;!-- AddThis Button END --&#62; Maiores Informações:https://www.addthis.com/ Linkedin]]></description>
			<content:encoded><![CDATA[<p>Yo&#8230;<br />
Estou colocando mais alguns botões de compartilhamento para ajudar a todos na divulgação de seus sites.<br />
<span id="more-530"></span><br />
<strong>Reddit</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">   <span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>reddit_url<span style="color: #339933;">=</span><span style="color: #3366CC;">'&lt;data:post.url/&gt;'</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>reddit_title<span style="color: #339933;">=</span><span style="color: #3366CC;">'&lt;data:post.title/&gt;'</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://reddit.com/button.js?t=2&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores Informações: <a href="http://www.reddit.com/buttons/">http://www.reddit.com/buttons/</a></p>
<p><strong>Stumbleupon</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.stumbleupon.com/hostedbadge.php?s=5&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores Informações:<a href="http://www.stumbleupon.com/badges/landing/">http://www.stumbleupon.com/badges/landing/</a></p>
<p><strong>Addthis</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span> AddThis Button BEGIN <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;addthis_toolbox addthis_default_style &quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>a <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;addthis_counter&quot;</span><span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e2790083eb75e8f&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span> AddThis Button END <span style="color: #339933;">--&gt;</span></pre></div></div>

<p>Maiores Informações:<a href="https://www.addthis.com/get-addthis?where=website&#038;type=bm&#038;clickbacks=1&#038;frm=home&#038;analytics=0&#038;bm=tb14">https://www.addthis.com/</a></p>
<p><strong>Linkedin</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://platform.linkedin.com/in.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;in/share&quot;</span> data<span style="color: #339933;">-</span>counter<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores Informações:<a href="http://www.linkedin.com/publishers">http://www.linkedin.com/publishers</a></p>
<p><strong>DZone</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://widgets.dzone.com/links/
widgets/zoneit.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores Informações:<a href="http://www.dzone.com/links/buttons.jsp">http://www.dzone.com/links/buttons.jsp</a></p>
<p><strong>Share Side Bar</strong></p>
<p>Cole antes do <strong></body></strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;!--ShareSidebar.com BEGINS--&gt;
&lt;style&gt;
.FBConnectButton_Small{background-position:-5px -232px !important;border-left:1px solid #1A356E}.FBConnectButton_Text{margin-left:12px !important;padding:2px 3px 3px !important}#ShareSidebar{top: 5%;width:69px;Right: 0 !important;overflow:hidden;position: fixed;z-index: 100000;text-align:center;line-height:normal;_position: absolute;font-size:9px;}#ShareSidebar a,#ShareSidebar a:hover,#ShareSidebar a:visited{text-decoration:none;font-size:9px;}&lt;/style&gt;&lt;div id=&quot;ShareSidebar&quot;&gt;
&lt;iframe style=&quot;float:left; margin:10px 0 0 12px; height:61px;&quot; src=&quot;http://www.facebook.com/plugins/like.php?app_id=141440452603597&amp;href=http://www.yourwebsite.com&amp;send=false&amp;layout=box_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;&lt;a name=&quot;fb_share&quot; type=&quot;box_count&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://apis.google.com/js/plusone.js&quot;&gt;&lt;/script&gt;&lt;g:plusone size=&quot;tall&quot;&gt;&lt;/g:plusone&gt;&lt;/div&gt;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;&lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-count=&quot;vertical&quot;&gt;Tweet&lt;/a&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://platform.twitter.com/widgets.js&quot;&gt;&lt;/script&gt;&lt;/script&gt;&lt;/div&gt;
&nbsp;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SCRIPT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> s1 <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SCRIPT'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>s.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>s.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>s.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://widgets.digg.com/buttons.js'</span><span style="color: #339933;">;</span>s1.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> s1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>&lt;a class=&quot;DiggThisButton DiggMedium&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&nbsp;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://reddit.com/static/button/button2.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&nbsp;
&lt;div style=&quot;float:left; margin:10px 0 0 10px;&quot;&gt;&lt;script src=&quot;http://www.stumbleupon.com/hostedbadge.php?s=5&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&nbsp;
&lt;div style=&quot;float:left; margin:10px 0 0 7px;&quot;&gt;&lt;script src=&quot;http://orkut-share.googlecode.com/svn/trunk/delicious.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&nbsp;
&lt;div style=&quot;float:left; margin:10px 0 0 5px; color:#000000; font-family:Arial, Helvetica, sans-serif; background-color:#F4295C; padding:2px 3px;&quot;&gt;&lt;a href=&quot;http://sharesidebar.com&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;Share&lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt;Sidebar&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;!--ShareSidebar.com ENDS--&gt;</pre></div></div>

<p>Maiores Informações:<a href="http://sharesidebar.com/">http://sharesidebar.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/botao-share-compartilhar-parte-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Share]]></series:name>
	</item>
		<item>
		<title>Adicionando Botão Curtir no Magento</title>
		<link>http://www.icefusion.com.br/adicionando-botao-curtir-no-magento/</link>
		<comments>http://www.icefusion.com.br/adicionando-botao-curtir-no-magento/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 22:05:55 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[curtir]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[página]]></category>
		<category><![CDATA[produtos]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=522</guid>
		<description><![CDATA[Yo&#8230; Mais uma do magento hehehe. Tenho visto muitas pessoas utilizando Módulos do Magento Connect para incluir o botão do facebook na página de produtos do Magento. Neste post, irei mostrar como colocar o código sem módulos ou plugins do magento pegando o código direto da área de developer do facebook. Primeiro precisamos adicionar o]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Yo&#8230;<br />
Mais uma do magento hehehe. Tenho visto muitas pessoas utilizando Módulos do Magento Connect para incluir o botão do facebook na página de produtos do Magento. Neste post, irei mostrar como colocar o código sem módulos ou plugins do magento pegando o código direto da área de developer do facebook.<span id="more-522"></span></p>
<p>Primeiro precisamos adicionar o seguinte código no <strong>view.phtml</strong> no seguinte caminho: <strong>app/design/template/default/catalog/product/view.phtml </strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$currentUrl</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCurrentUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
&nbsp;
&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;&lt;script src=&quot;http://connect.facebook.net/en_US/all.js#appId=126180637469336&amp;amp;xfbml=1&quot;&gt;&lt;/script&gt;&lt;fb:like href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentUrl</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; send=&quot;false&quot; layout=&quot;button_count&quot; width=&quot;200&quot; show_faces=&quot;false&quot; font=&quot;&quot;&gt;&lt;/fb:like&gt;</pre></div></div>

<p>&nbsp;</p>
<p>Depois criar um arquivo chamado <strong>meta.phtml</strong> no seguinte caminho:<strong>app/design/template/default/page/html/meta.phtml </strong><br />
Incluir o seguinte código nele.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$product</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_product</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$product</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
     &lt;meta property=&quot;og:title&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;meta property=&quot;og:url&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCurrentUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
    &lt;meta property=&quot;og:type&quot; content=&quot;product&quot;/&gt;
    &lt;meta property=&quot;og:image&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span>Mage<span style="color: #339933;">::</span><span style="color: #004000;">registry</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'current_product'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'small_image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;</pre></div></div>

<p>Adicionar o seguinte código no <strong>catalog.xml</strong> no caminho:<strong>app/design/layout/catalog.xml</strong><br />
Localize a tag catalog_product_view e dentro dela a tag reference name=&#8221;head&#8221; e coloque o seguinte código:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;page/html&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;meta&quot;</span> <span style="color: #000066;">as</span>=<span style="color: #ff0000;">&quot;meta&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;page/html/meta.phtml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Ficaria desta <strong>forma</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;catalog_product_view<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reference</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;head&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;page/html&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;meta&quot;</span> <span style="color: #000066;">as</span>=<span style="color: #ff0000;">&quot;meta&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;page/html/meta.phtml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/reference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/catalog_product_view</span><span style="color: #ff0000;">&quot;&gt;</span></span></pre></div></div>

<p>E adicionar a seguinte linha de comando no <strong>head.phtml</strong> no caminho: <strong>app/design/template/default/page/html/head.phtml</strong> juntamente com as outras metas.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getChildHtml</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Após isso creio que tudo estará funcionando.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/adicionando-botao-curtir-no-magento/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Re-Indexação da Navegação em Camadas</title>
		<link>http://www.icefusion.com.br/re-indexacao-da-navegacao-em-camadas/</link>
		<comments>http://www.icefusion.com.br/re-indexacao-da-navegacao-em-camadas/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 00:51:17 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[camadas]]></category>
		<category><![CDATA[indexação]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[navegação]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=513</guid>
		<description><![CDATA[E ae galera como vão. Bom pelo que pude perceber no magento durante esse tempo é que o sistema é bom, porém existem vários bugzinhos, não sei se por causa do tipo de Banco de Dados que segue o Modelo EAV, ou se é por causa da programação que realmente é complexa desenvolver em cima]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">E ae galera como vão. Bom pelo que pude perceber no magento durante esse tempo é que o sistema é bom, porém existem vários bugzinhos, não sei se por causa do tipo de Banco de Dados que segue o Modelo EAV, ou se é por causa da programação que realmente é complexa desenvolver em cima deste modelo.</p>
<p style="text-align: justify;">Aqui vou deixar alguns arquivos que encontrei para forçar a re-indexação da navegação em camadas. O teste que fiz, foi em cima da versão 3.1.3.</p>
<p style="text-align: justify;"><span id="more-513"></span></p>
<p><strong>badger-cm_LayeredCache.php </strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span><span style="color: #666666; font-style: italic;">//####################################### </span>
<span style="color: #666666; font-style: italic;">//# Magento Layered Nav - Badger || Duck//####################################### </span>
<span style="color: #666666; font-style: italic;">//# @author: Chris McKee [chrismckee.co.uk] </span>
<span style="color: #666666; font-style: italic;">//# @licence: GNU, basically do what you like but </span>
<span style="color: #666666; font-style: italic;">//#           leave my name somewhere </span>
<span style="color: #666666; font-style: italic;">//# @licenceurl: http://www.gnu.org/copyleft/gpl.html//###############################... </span>
try<span style="color: #009900;">&#123;</span> 
        <span style="color: #990000;">ob_implicit_flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Saves having to flush manually </span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ini_get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'safe_mode'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #990000;">set_time_limit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">/*Set time limit to 
unlimited, though we shouldnt need to*/</span> 
        <span style="color: #990000;">ignore_user_abort</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Lets the script run to completion even if you </span>
kill the browser 
        <span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;app/Mage.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        Mage<span style="color: #339933;">::</span><span style="color: #004000;">app</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//as per magento handling </span>
        Mage<span style="color: #339933;">::</span><span style="color: #004000;">setIsDeveloperMode</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//apmh </span>
        <span style="color: #990000;">umask</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #666666; font-style: italic;">/*{ CONFIGURABLES }*/</span> 
        <span style="color: #000088;">$HM</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* How many records to process at once*/</span> 
        <span style="color: #000088;">$STOREID</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'1'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* Theres many ways to skin a monkey but this will 
help reduce processing by reducing requests.*/</span> 
        <span style="color: #000088;">$HOWTORUN</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/*1 = PHP CLI (aka SSH Mode), 2 = Browser (aka if your 
using the wrapper)*/</span> 
        <span style="color: #666666; font-style: italic;">/* Automatically Count Products */</span> 
                <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">;</span> 
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$HOWTORUN</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> 
                <span style="color: #009900;">&#123;</span> 
                        <span style="color: #666666; font-style: italic;">/*## CLI Version */</span> 
                        <span style="color: #000088;">$prodCount</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cm_pd&quot;</span><span style="color: #339933;">;</span> 
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                                                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                                        <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
                                                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #009900;">&#125;</span> 
                        <span style="color: #b1b100;">else</span> 
                        <span style="color: #009900;">&#123;</span> 
                                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;can't open file&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #000088;">$tmpIDs</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/product'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCollection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span> 
<span style="color: #339933;">&gt;</span>getAllIds<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
                                        <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tmpIDs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpIDs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//-1 Accounts for 0 in </span>
<span style="color: #990000;">array</span><span style="color: #339933;">.</span> 
                                        <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$total</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #009900;">&#125;</span> 
                        <span style="color: #666666; font-style: italic;">/*## End CLI Version*/</span> 
                <span style="color: #009900;">&#125;</span> 
                <span style="color: #b1b100;">else</span> 
                <span style="color: #009900;">&#123;</span> 
                        <span style="color: #666666; font-style: italic;">/*## Browser Version */</span> 
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pcount'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pcount'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                                        <span style="color: #000088;">$tmpIDs</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/product'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCollection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span> 
<span style="color: #339933;">&gt;</span>getAllIds<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
                                        <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pcount'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tmpIDs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpIDs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//-1 Accounts </span>
<span style="color: #b1b100;">for</span> <span style="color: #cc66cc;">0</span> in <span style="color: #990000;">array</span><span style="color: #339933;">.</span> 
                                <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pcount'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
                        <span style="color: #009900;">&#125;</span> 
                        <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span> <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pcount'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> 
                        <span style="color: #666666; font-style: italic;">/*## End Browser Version */</span> 
                <span style="color: #009900;">&#125;</span> 
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Total Wasn't Captured&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> 
        <span style="color: #666666; font-style: italic;">/* End Count Products */</span> 
        <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #006699; font-weight: bold;">$total</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$countFile</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cm_cnt&quot;</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$store</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">app</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStore</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$STOREID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #666666; font-style: italic;">//Create a count file if we dont have one </span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
                                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span> 
        <span style="color: #b1b100;">else</span> 
        <span style="color: #009900;">&#123;</span> 
                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;can't open file&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> 
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
                        <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$count</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span> 
        <span style="color: #666666; font-style: italic;">//If we havent started counting yet clear cache. </span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#123;</span> 
                        Mage<span style="color: #339933;">::</span><span style="color: #004000;">app</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cleanCache</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #666666; font-style: italic;">//Clear the database flag from any previous &quot;normal&quot; indexes that </span>
failed 
                        <span style="color: #000088;">$flag</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalogindex/catalog_index_flag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span> 
<span style="color: #339933;">&gt;</span>loadSelf<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
                        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$flag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> 
Mage_CatalogIndex_Model_Catalog_Index_Flag<span style="color: #339933;">::</span><span style="color: #004000;">STATE_RUNNING</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$flag</span><span style="color: #339933;">-</span> 
<span style="color: #339933;">&gt;</span>delete<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        <span style="color: #009900;">&#125;</span> 
        <span style="color: #000088;">$max</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span><span style="color: #339933;">+</span><span style="color: #000088;">$HM</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$sx</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">app</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStore</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;start loop (max = <span style="color: #006699; font-weight: bold;">$max</span>) (count = <span style="color: #006699; font-weight: bold;">$count</span>)&quot;</span><span style="color: #339933;">;</span> 
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$count</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$max</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#123;</span> 
        <span style="color: #990000;">ob_end_flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$total</span><span style="color: #009900;">&#41;</span> 
                                <span style="color: #009900;">&#123;</span> 
                                        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br&gt;&lt;h1&gt;Completed&lt;/h1&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                <span style="color: #009900;">&#125;</span> 
                        Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalogindex/indexer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">plainReindex</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> 
<span style="color: #000088;">$sx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #666666; font-style: italic;">//Write where were up to </span>
                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;can't open file&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">ob_flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span>catch<span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">&quot;&lt;br&gt;&lt;p style=red&gt;ERROR: <span style="color: #006699; font-weight: bold;">$e</span>&lt;/p&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> 
<span style="color: #666666; font-style: italic;">#EOF 
</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>badger-count.php </strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">/####################################### 
//# Magento Layered Nav - Badger || Duck - Counter 
//####################################### 
//# @author: Chris McKee [chrismckee.co.uk] 
//# @licence: GNU, basically do what you like but 
//#           leave my name somewhere 
//# @licenceurl: http://www.gnu.org/copyleft/gpl.html 
//####################################### 
?&gt; 
&lt;html&gt; 
&lt;head&gt; 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;done&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;5&quot; /&gt; 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
&lt;/head&gt; 
&lt;body&gt; 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$prodCount</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cm_pd&quot;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$countFile</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cm_cnt&quot;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;done&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
        <span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Files Deleted&quot;</span><span style="color: #339933;">;</span> 
        <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                                                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                                        <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prodCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
                                                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                        <span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                                        <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$countFile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
                                        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span> 
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
                <span style="color: #000088;">$left</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$count</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;b&gt;[Count: <span style="color: #006699; font-weight: bold;">$count</span> | Total: <span style="color: #006699; font-weight: bold;">$total</span>][ <span style="color: #006699; font-weight: bold;">$left</span> to go]&lt;/b&gt;&quot;</span><span style="color: #339933;">;</span> 
                                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$left</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> 
                                <span style="color: #009900;">&#123;</span> 
                                        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&lt;a href='badger-count.php?done=1' 
target='_parent'&gt;Click Here To Complete and Delete Count files&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span> 
                                        <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                                <span style="color: #009900;">&#125;</span> 
        <span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span> 
&lt;/body&gt; 
&lt;/html&gt;</pre></div></div>

<p><strong>badger-wrapper.php </strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span>####################################### </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span># Magento Layered Nav - Badger || Duck - WRAPPER </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span>####################################### </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span># @author: Chris McKee <span style="color: #66cc66;">&#91;</span>chrismckee.co.uk<span style="color: #66cc66;">&#93;</span> </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span># @licence: GNU, basically do what you like but </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span>#           leave my <span style="color: #000066;">name</span> somewhere </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span># @licenceurl: http:<span style="color: #66cc66;">//</span>www.gnu.org<span style="color: #66cc66;">/</span>copyleft<span style="color: #66cc66;">/</span>gpl.html </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span>####################################### </span>
<span style="color: #009900;">?&gt;</span> 
<span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/ </span>
<span style="color: #00bbdd;">TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en-gb&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Magento Layered Cache<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;robots&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;noindex,noarchive&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span> 
<span style="color: #808080; font-style: italic;">&lt;!-- </span>
<span style="color: #808080; font-style: italic;">@charset &quot;utf-8&quot;; </span>
<span style="color: #808080; font-style: italic;">/************************************************************\ </span>
<span style="color: #808080; font-style: italic;"> * Core: Magento </span>
<span style="color: #808080; font-style: italic;"> * @Target: Layered Nav refresh </span>
<span style="color: #808080; font-style: italic;"> * @author: Chris.McKee </span>
<span style="color: #808080; font-style: italic;"> * @date: 23-07-2009 </span>
<span style="color: #808080; font-style: italic;">\************************************************************/ </span>
<span style="color: #808080; font-style: italic;">html{ font-size:16px;color:#000; background:#F9F9F9; } /* Set BASE </span>
<span style="color: #808080; font-style: italic;">Font Size */ </span>
<span style="color: #808080; font-style: italic;">/* Reset Browser Differences */ </span>
<span style="color: #808080; font-style: italic;">*,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{ margin: </span>
<span style="color: #808080; font-style: italic;">0;padding:0px;} </span>
<span style="color: #808080; font-style: italic;">table{border-collapse:collapse;border-spacing:0} </span>
<span style="color: #808080; font-style: italic;">address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight: </span>
<span style="color: #808080; font-style: italic;">400} </span>
<span style="color: #808080; font-style: italic;">ol,ul,li{list-style:none} </span>
<span style="color: #808080; font-style: italic;">caption,th{text-align:left;} </span>
<span style="color: #808080; font-style: italic;">h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400} </span>
<span style="color: #808080; font-style: italic;">q:before,q:after{content:''} </span>
<span style="color: #808080; font-style: italic;">fieldset,img,abbr,acronym{border:none;font-variant:normal;} </span>
<span style="color: #808080; font-style: italic;">sup{vertical-align:text-top;} </span>
<span style="color: #808080; font-style: italic;">sub{vertical-align:text-bottom;} </span>
<span style="color: #808080; font-style: italic;">input,textarea,select{font-family:inherit;font-size:inherit;font- </span>
<span style="color: #808080; font-style: italic;">weight:inherit;} </span>
<span style="color: #808080; font-style: italic;">input,textarea,select{*font-size:100%;} </span>
<span style="color: #808080; font-style: italic;">legend{color:#000;} </span>
<span style="color: #808080; font-style: italic;">html, body { height:100%;       width:100%;     } </span>
<span style="color: #808080; font-style: italic;">/*EORESET*/ </span>
<span style="color: #808080; font-style: italic;">/* Now thats over we can begin */ </span>
<span style="color: #808080; font-style: italic;">body {font:0.8em &quot;Trebuchet MS&quot;, Helvetica, Verdana, Arial, FreeSans, </span>
<span style="color: #808080; font-style: italic;">sans-serif;} </span>
<span style="color: #808080; font-style: italic;">h1{ </span>
<span style="color: #808080; font-style: italic;">        font-size:1.6em; </span>
<span style="color: #808080; font-style: italic;">        position:absolute; </span>
<span style="color: #808080; font-style: italic;">        left:4px; </span>
<span style="color: #808080; font-style: italic;">        display:block; </span>
<span style="color: #808080; font-style: italic;">        top: 8px; </span>
<span style="color: #808080; font-style: italic;">} </span>
&nbsp;
<span style="color: #808080; font-style: italic;">#refresh{ </span>
<span style="color: #808080; font-style: italic;">  position:absolute; </span>
<span style="color: #808080; font-style: italic;">        left:-1000px; </span>
<span style="color: #808080; font-style: italic;">        height:0px; </span>
<span style="color: #808080; font-style: italic;">        width:0px; </span>
<span style="color: #808080; font-style: italic;">} </span>
&nbsp;
<span style="color: #808080; font-style: italic;">#counter{ position:relative; margin: 25% auto 0px; border:0px; outline: </span>
<span style="color: #808080; font-style: italic;">0px;} </span>
<span style="color: #808080; font-style: italic;">#counter * {font-size:5em; text-align:center; } </span>
<span style="color: #808080; font-style: italic;">small a{ position:absolute; bottom:8px; right:8px; display:block; text- </span>
<span style="color: #808080; font-style: italic;">decoration:none; color:#666; } </span>
<span style="color: #808080; font-style: italic;">--&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span> 
//<span style="color: #009900;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span> </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span><span style="color: #cc66cc;">40</span> Seconds <span style="color: #66cc66;">&#40;</span>no point in changin this<span style="color: #66cc66;">&#41;</span> </span>
<span style="color: #009900;">var intervalID; </span>
<span style="color: #009900;">function startREFRESH<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>  intervalID <span style="color: #66cc66;">=</span> setInterval<span style="color: #66cc66;">&#40;</span>reloadREFRESH, </span>
<span style="color: #009900;"><span style="color: #cc66cc;">40000</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span> </span>
<span style="color: #009900;">function reloadREFRESH<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> refresh.location.reload<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span> </span>
<span style="color: #009900;">function stopREFRESH<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> clearInterval<span style="color: #66cc66;">&#40;</span>intervalID<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span> </span>
<span style="color: #009900;"><span style="color: #66cc66;">//</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Shortcut Icon&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image/x-icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http:// </span>
<span style="color: #009900;">chrismckee.co.uk/favicon.ico&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;startREFRESH();&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Layered Navigation Refresh From Browser<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;badger-count.php&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;counter&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;counter&quot;</span>&gt;</span>You At 
Least Need a Browser that Supports IFRAMES<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;badger-cm_LayeredCache.php&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;refresh&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;refresh&quot;</span> </span>
<span style="color: #009900;">&gt;</span>You At Least Need a Browser that Supports IFRAMES<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</span> 
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://chrismckee.co.uk/?s=layered </span>
<span style="color: #009900;">+navigation&quot;</span>&gt;</span>ChrisMckee Designs<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p style="text-align: justify;">Após criar cada arquivo,suba os arquivos no diretório raiz da loja. Neste local,  você irá executar o arquivo <strong>badger-wrapper.php</strong>. Você notará que aparecerá número indicando quantos registros ja foram indexados e quantos ainda faltam. Também notará que a página no status no rodapé do browser aparecerá concluído e piscará. Isto acontece pq o código executa um refresh para não estrapolar o tempo máximo de execução. Após finalizado, aparecerá um link para deletar os arquivos temporários que o sistema cria.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/re-indexacao-da-navegacao-em-camadas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mídias Sociais &#8211; Botão Share / Compartilhar &#8211; Parte 1</title>
		<link>http://www.icefusion.com.br/botao-share-compartilhar-parte-1/</link>
		<comments>http://www.icefusion.com.br/botao-share-compartilhar-parte-1/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 04:38:41 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[+1]]></category>
		<category><![CDATA[addthis]]></category>
		<category><![CDATA[botão]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[buzz]]></category>
		<category><![CDATA[compartilhar]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[divulgação]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mídias]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[sociais]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=449</guid>
		<description><![CDATA[Yo&#8230; E ae galera, como vão? Neste post estarei passando algumas informações sobre como colocar botões de share / compartilhar em algumas mídias sociais em seus sites. É de extrema importância estes botões, pois ajudam a divulgar o sites, aumentando a indexação e consequentemente aumentando o número de visitas. Segue abaixo alguns links e códigos.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Yo&#8230;</p>
<p style="text-align: justify;">E ae galera, como vão? Neste post estarei passando algumas informações sobre como colocar botões de share / compartilhar em algumas mídias sociais em seus sites. É de extrema importância estes botões, pois ajudam a divulgar o sites, aumentando a indexação e consequentemente aumentando o número de visitas. Segue abaixo alguns links e códigos.</p>
<p><span id="more-449"></span><br />
<strong>Facebook</strong><br />
<em>Like Button</em></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fb-root&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://connect.facebook.net/en_US/all.js#appId=126180637469336&amp;amp;xfbml=1&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;&lt;fb:like <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> send<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> layout<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box_count&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;60&quot;</span> show_faces<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> font<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>fb:like&gt;&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://connect.facebook.net/en_US/all.js#appId=126180637469336&amp;amp;xfbml=1&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;fb:like <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> send<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> layout<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box_count&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;60&quot;</span> show_faces<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> font<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>fb:like&gt;</span></pre></div></div>

<p><em>Share Button</em></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box_count&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fb_share&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.facebook.com/sharer.php&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>Share<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Maiores informações podem ser encontradas aqui &#8211; http://developers.facebook.com/docs/plugins/</p>
<p><strong>Twitter</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/share&quot;</span> data-count<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;vertical&quot;</span> data-via<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;SEU-TWITTER&quot;</span>&gt;</span>Tweet<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://platform.twitter.com/widgets.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Maiores Informações podem ser encontradas aqui &#8211; http://twitter.com/about/resources/tweetbutton</p>
<p><strong>Google</strong></p>
<p><em>Google +1</em><br />
Inserir na Entre a Tag &lt;head&gt; &lt;/head&gt;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;https://apis.google.com/js/plusone.js&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #006600; font-style: italic;">// &lt;![CDATA[</span>
  <span style="color: #009900;">&#123;</span>lang<span style="color: #339933;">:</span> <span style="color: #3366CC;">'pt-BR'</span><span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">// ]]&gt;&lt;/script&gt;</span></pre></div></div>

<p>Inserir no Local onde quer o botão</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;g:plusone <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tall&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>g:plusone&gt;</span></pre></div></div>

<p>Maiores informações aqui &#8211; http://www.google.com/intl/en/webmasters/+1/button/index.html</p>
<p><em>Google Buzz</em></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Postar no Google Buzz&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;google-buzz-button&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.google.com/buzz/post&quot;</span> data-button-<span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;normal-count&quot;</span> data-locale<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;pt_BR&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.google.com/buzz/api/button.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores informações aqui &#8211; http://www.google.com/buzz/api/admin/configPostWidget</p>
<p><strong>Delicious</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script
src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://orkut-share.googlecode.com/svn/trunk/delicious.js&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Maiores informações aqui &#8211; http://www.delicious.com/help/savebuttons</p>
<p><strong>Digg</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #006600; font-style: italic;">// &lt;![CDATA[</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SCRIPT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> s1 <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SCRIPT'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
s.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
s.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
s.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://widgets.digg.com/buttons.js'</span><span style="color: #339933;">;</span>
s1.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> s1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// ]]&gt;&lt;/script&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;DiggThisButton DiggMedium&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>Maiores informações aqui &#8211; http://about.digg.com/downloads/button/smart</p>
<p>Para o post não ficar muito longo estarei colocando as outras mídias que encontrei no próximo post, porém as principais estão todas aqui. Espero que possa ser útil a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/botao-share-compartilhar-parte-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Share]]></series:name>
	</item>
		<item>
		<title>Magento &#8211; Obtendo Dados do Carrinho de Compra</title>
		<link>http://www.icefusion.com.br/magento-obtendo-dados-do-carrinho-de-compra-checkoutcart/</link>
		<comments>http://www.icefusion.com.br/magento-obtendo-dados-do-carrinho-de-compra-checkoutcart/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 01:55:49 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[carrinho]]></category>
		<category><![CDATA[cart]]></category>
		<category><![CDATA[chekout]]></category>
		<category><![CDATA[compra]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programação]]></category>
		<category><![CDATA[zendframework]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=412</guid>
		<description><![CDATA[Neste post estarei mostrando um código para acessar os dados do carrinho como número de itens, valor total, quantidade. Também estarei utilizando um helper para formatar o preço e a quantidade. Obter Items do Carrinho. $items = Mage::getSingleton&#40;'checkout/session'&#41;-&#62;getQuote&#40;&#41;-&#62;getAllItems&#40;&#41;; &#160; foreach&#40;$items as $item&#41; &#123; echo 'ID: '.$item-&#62;getProductId&#40;&#41;; echo 'Nome: '.$item-&#62;getName&#40;&#41;; echo 'Sku/Código: '.$item-&#62;getSku&#40;&#41;; echo 'Quantidade: '.$item-&#38;gt;getQty&#40;&#41;;]]></description>
			<content:encoded><![CDATA[<p>Neste post estarei mostrando um código para acessar os dados do carrinho como número de itens, valor total, quantidade. Também estarei utilizando um helper para formatar o preço e a quantidade.<br />
<span id="more-412"></span></p>
<p><strong>Obter Items do Carrinho.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAllItems</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'ID: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProductId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Nome: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Sku/Código: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSku</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Quantidade: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getQty<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Preço: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getPrice<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Obtendo Número total de itens e Quantidade total no carrinho.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$totalItems</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getItemsCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$totalQuantity</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getItemsQty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Obtendo o Subtotal e Total do Carrinho.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$subTotal</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSubtotal</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$grandTotal</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">getModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGrandTotal</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>&nbsp;</p>
<p><strong>Utilizando Helpers para Formatação dos Valores.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$helper</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$totalQuantity</span> <span style="color: #339933;">=</span>  Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getSummaryCount<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$grandTotal</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$helper</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>formatPrice<span style="color: #009900;">&#40;</span>Mage<span style="color: #339933;">::</span><span style="color: #004000;">getSingleton</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout/cart'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getQuote<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getGrandTotal<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/magento-obtendo-dados-do-carrinho-de-compra-checkoutcart/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>GIT &#8211; Controle de Versão</title>
		<link>http://www.icefusion.com.br/programacao-git-controle-de-versao/</link>
		<comments>http://www.icefusion.com.br/programacao-git-controle-de-versao/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 00:35:47 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[comandos]]></category>
		<category><![CDATA[controle]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[programação]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[versão]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=374</guid>
		<description><![CDATA[Neste post estarei falando comentando um pouco sobre o Controle de Versão, ou Versionamento. Mas primeiramente o que seria o Controle de Versões ou Versionamento? O controle de versões é o controle aplicado em cima do desenvolvimento de um sistema, onde você pode trabalhar em cima de uma versão paralela , tendo como versão atual,]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Neste post estarei falando comentando um pouco sobre o Controle de Versão, ou Versionamento. Mas primeiramente o que seria o Controle de Versões ou Versionamento?</p>
<p style="text-align: justify;">O controle de versões é o controle aplicado em cima do desenvolvimento de um sistema, onde você pode trabalhar em cima de uma versão paralela , tendo como versão atual, uma versão 100% estável. No GIT, que é um sistema de controle de versões, você trabalha clona, ou faz uma cópia para que você possa alterar o que é necessário ou criar novas ferramentas.  Após estar tudo OK, você sobe as alterações para o seu servidor de controle de versão, unificando as alterações com a versão estável, criando uma nova versão estável.</p>
<p><span id="more-374"></span></p>
<p style="text-align: justify;">Quais as vantagens de uso no Versionamento?</p>
<ul>
<li>Versionamento e Partilhamento do projeto;</li>
<li>Trabalhamos numa versão em paralelo a versão estável;</li>
<li>Podemos efetuar um rollback numa versão anterior, ou muitas versões anteriores atrás caso descubra-se que algo está errado;</li>
<li>É excelente para se trabalhar em equipe. Cada user pode clonar a versão principal para criar suas alterações ou novas ferramentas e depois pode subir a versão principal.</li>
<li>Melhora a qualidade e a manutenção do projeto;</li>
</ul>
<p>Hoje em dia muitas pessoas já utilizam o versionamento, principalmente no meio do software livre. Acredito que sem esse cuidado utilizado para controlar versões, o Linux talvez nunca chegasse ao patamar que está hoje. Acredito também que muitas outras tecnologias também como: Wine, Ruby, Rails, QT, Gnome, FreeBSD.</p>
<p>Alguns controladores de versão que ja ouvi falar foram o : Subversion(SVN), CVS e GIT.</p>
<p>Aqui deixarei uma lista de comandos do GIT, que é o controlador de versão que estarei adotando no meu trabalho e no meu dia à dia. Nos próximos artigos me aprofundarei no uso do GIT.</p>
<div>
<div>
<div>
<div>
<div><strong>Comandos GIT</strong></div>
<div><em>&#8211; Inicio do versionamento</em></div>
<div><em>git init</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; adicionando todos os arquivos</em></div>
<div><em>git add .</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; commitando os arquivos</em></div>
<div><em>git commit -a -m &#8220;descricao&#8221;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; enviando arquivo pro repositorio</em></div>
<div><em>git push origin master</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; carregando arquivos do repositorio</em></div>
<div><em>git pull origin master</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; criando um branch</em></div>
<div><em>git branch &lt;nome do branch&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; criando um branch setado</em></div>
<div><em>git checkout -b &lt;nome do branch&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; deletando branch</em></div>
<div><em>git branch -d &lt;nome do branch&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; mudando de branch</em></div>
<div><em>git checkout &lt;nome do branch&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; excluindo arquivo do versionamento</em></div>
<div><em>git rm &#8211;cached &lt;nome do arquivo&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; excluindo diretorio do versionamento</em></div>
<div><em>git rm -r &#8211;cached &lt;nome do diretorio&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; visualizar modo gráfico</em></div>
<div><em>gitk</em></div>
<div><em>&#8211; configurando o repositorio remoto</em></div>
<div><em>git remote add origin root@10.1.1.9:/var/www/httpdocs/&lt;diretorio&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; removendo repositorio remoto</em></div>
<div><em>git remote rm &lt;nome do repositorio remoto&gt;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; setando nome do usuario</em></div>
<div><em>git config &#8211;global <a href="http://user.name/" target="_blank">user.name</a> &#8220;&lt;nome do usuario&gt;&#8221;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; setando email do usuario</em></div>
<div><em>git config &#8211;global user.email &#8220;&lt;email do usuario&gt;&#8221;</em></div>
<div><em><br />
</em></div>
<div><em>&#8211; voltando os commits</em></div>
<div>
<div>
<div><em>git reset &#8211;hard HEAD~1 (volta ao último commit)</em></div>
<div><em>git reset &#8211;soft HEAD~1 (volta ao último commit e mantém os últimos arquivos no Stage)</em></div>
<div><em>git reset &#8211;hard XXXXXXXXXXX (Volta para o commit com a hash XXXXXXXXXXX)</em></div>
<div><em><br />
</em></div>
</div>
<div><em>&#8211; recuperando os commits</em></div>
<div><em>git reflog (Para visualizar os hashs)</em></div>
<div>
<div><em>git merge &lt;hash&gt;</em></div>
<div><em><br />
</em></div>
</div>
</div>
<div><em>&#8211; pra saber mais dos comando</em></div>
<div><em>git &lt;comando&gt; &#8211;help</em></div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/programacao-git-controle-de-versao/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Criando Campo no Checkout/Onepage/Billing</title>
		<link>http://www.icefusion.com.br/criando-campo-no-checkoutonepagebilling/</link>
		<comments>http://www.icefusion.com.br/criando-campo-no-checkoutonepagebilling/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 03:29:31 +0000</pubDate>
		<dc:creator>Icefusion</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[billing]]></category>
		<category><![CDATA[campo]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[onepage]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.icefusion.com.br/?p=367</guid>
		<description><![CDATA[Neste post estarei demonstrando passo a passo como fiz para criar um campo que estivesse no billing.phtml e fosse gravado tanto no customer como no sales. *Para Salvar no Customer - Criar Atributo na Tabela EAV_ATTRIBUTE attribute_id = gera automático entity_type_id = 1 attribute_code = nomecampo attribute_model = null backend_type = varchar / date /]]></description>
			<content:encoded><![CDATA[<p>Neste post estarei demonstrando passo a passo como fiz para criar um campo que estivesse no billing.phtml e fosse gravado tanto no customer como no sales.</p>
<p><strong>*Para Salvar no Customer</strong></p>
<p><strong><em>- Criar Atributo na Tabela EAV_ATTRIBUTE</em></strong></p>
<ul>
<li>attribute_id = gera automático</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60entity_type_id%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">entity_type_id</a> = 1</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60attribute_code%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">attribute_code</a> = nomecampo</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60attribute_model%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">attribute_model</a> = null</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60backend_type%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">backend_type</a> = varchar / date / int / text</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60frontend_input%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">frontend_input</a> = select / text / textarea</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60frontend_label%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">frontend_label</a> = label do Campo</li>
<li>a partir de is_global segue: 1 1 0 0 null 0 0 0 0 0 0 1 0 0 0 1 1 vazio 0</li>
</ul>
<p><span id="more-367"></span><br />
Cadastrar atributo nas tabelas eav_attribute_set, eav_attribute_group, e eav_entity_attribute caso seja necessário. (No meu caso utilizei para ordernar o campo dentro do admin.</p>
<p><strong>* Para Salvar no Sales_Order_Varchar</strong></p>
<p><em><strong>- Criar Atributo na Tabela EAV_ATTRIBUTE</strong></em></p>
<ul>
<li>attribute_id = gera automático</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60entity_type_id%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">entity_type_id</a> = 11</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60attribute_code%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">attribute_code</a> = nomecampo</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60attribute_model%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">attribute_model</a> = null</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60backend_type%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">backend_type</a> = varchar / date / int / text</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60frontend_input%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">frontend_input</a> = select / text / textarea</li>
<li><a href="https://l50dp80032.hospedagemdesites.ws:8443/domains/databases/phpMyAdmin/sql.php?db=zueshopsub&amp;table=eav_attribute&amp;token=c4e34c951d513813d981dca21439e742&amp;pos=510&amp;session_max_rows=30&amp;disp_direction=horizontal&amp;repeat_cells=100&amp;dontlimitchars=0&amp;sql_query=SELECT+%2AFROM+%60eav_attribute%60++ORDER+BY+%60frontend_label%60+ASC&amp;phpMyAdmin=-2gp-xFUL0hRw%2C4HZluT4Dg-Ype">frontend_label</a> = label do Campo</li>
<li>a partir de is_global segue: 1 1 0 0 null 0 0 0 0 0 0 1 0 0 0 1 1 vazio 0</li>
</ul>
<p>Criando Campos Acima:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">INSERT</span>  <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #008000;">`eav<span style="color: #008080; font-weight: bold;">_</span>attribute`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`entity<span style="color: #008080; font-weight: bold;">_</span>type<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>code`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>type`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>table`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>input`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>input<span style="color: #008080; font-weight: bold;">_</span>renderer`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>label`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>class`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`source<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>global`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>required`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>user<span style="color: #008080; font-weight: bold;">_</span>defined`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`default<span style="color: #008080; font-weight: bold;">_</span>value`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>searchable`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>filterable`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>comparable`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible<span style="color: #008080; font-weight: bold;">_</span>on<span style="color: #008080; font-weight: bold;">_</span>front`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>html<span style="color: #008080; font-weight: bold;">_</span>allowed<span style="color: #008080; font-weight: bold;">_</span>on<span style="color: #008080; font-weight: bold;">_</span>front`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>unique`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>used<span style="color: #008080; font-weight: bold;">_</span>for<span style="color: #008080; font-weight: bold;">_</span>price<span style="color: #008080; font-weight: bold;">_</span>rules`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>filterable<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>search`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`used<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>product<span style="color: #008080; font-weight: bold;">_</span>listing`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`used<span style="color: #008080; font-weight: bold;">_</span>for<span style="color: #008080; font-weight: bold;">_</span>sort<span style="color: #008080; font-weight: bold;">_</span>by`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>configurable`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`apply<span style="color: #008080; font-weight: bold;">_</span>to`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`position`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`note`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>advanced<span style="color: #008080; font-weight: bold;">_</span>search`</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">VALUES</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'inscricaoestadual'</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'varchar'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'text'</span><span style="color: #000033;">,</span>  <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">'Inscrição Estadual'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span>  <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">INSERT</span>  <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #008000;">`eav<span style="color: #008080; font-weight: bold;">_</span>attribute`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`entity<span style="color: #008080; font-weight: bold;">_</span>type<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>code`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`attribute<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>type`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`backend<span style="color: #008080; font-weight: bold;">_</span>table`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>input`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>input<span style="color: #008080; font-weight: bold;">_</span>renderer`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>label`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`frontend<span style="color: #008080; font-weight: bold;">_</span>class`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`source<span style="color: #008080; font-weight: bold;">_</span>model`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>global`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>required`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>user<span style="color: #008080; font-weight: bold;">_</span>defined`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`default<span style="color: #008080; font-weight: bold;">_</span>value`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>searchable`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>filterable`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>comparable`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible<span style="color: #008080; font-weight: bold;">_</span>on<span style="color: #008080; font-weight: bold;">_</span>front`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>html<span style="color: #008080; font-weight: bold;">_</span>allowed<span style="color: #008080; font-weight: bold;">_</span>on<span style="color: #008080; font-weight: bold;">_</span>front`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>unique`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>used<span style="color: #008080; font-weight: bold;">_</span>for<span style="color: #008080; font-weight: bold;">_</span>price<span style="color: #008080; font-weight: bold;">_</span>rules`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>filterable<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>search`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`used<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>product<span style="color: #008080; font-weight: bold;">_</span>listing`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`used<span style="color: #008080; font-weight: bold;">_</span>for<span style="color: #008080; font-weight: bold;">_</span>sort<span style="color: #008080; font-weight: bold;">_</span>by`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>configurable`</span><span style="color: #000033;">,</span>  <span style="color: #008000;">`apply<span style="color: #008080; font-weight: bold;">_</span>to`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`position`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`note`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`is<span style="color: #008080; font-weight: bold;">_</span>visible<span style="color: #008080; font-weight: bold;">_</span>in<span style="color: #008080; font-weight: bold;">_</span>advanced<span style="color: #008080; font-weight: bold;">_</span>search`</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">VALUES</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">'11'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'customer<span style="color: #008080; font-weight: bold;">_</span>inscricaoestadual'</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'varchar'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span>  <span style="color: #008000;">'text'</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008000;">'Inscrição Estadual'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>  <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'1'</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">''</span><span style="color: #000033;">,</span> <span style="color: #008000;">'0'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p><em><strong>- Criar Campo na Tabela Sales_Flat_Quote</strong></em><br />
<strong> customer_nomecampo varchar(255) </strong></p>
<p><em><strong>- app\code\core\Mage\Checkout\etc\config.xml</strong></em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checkout_onepage_billing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to_customer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>nomecampo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to_customer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/checkout_onepage_billing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><em><strong>- app\code\core\Mage\Customer\etc\config.xml</strong></em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;global<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fieldsets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_account<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;create<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/create<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;update<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/update<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_account<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fieldsets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><em><strong>- app\code\core\Mage\Sales\etc\config.xml</strong></em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sales_copy_order_billing_address<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;to_order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to_order<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sales_copy_order_billing_address<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sales_convert_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to_order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to_order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sales_convert_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sales_convert_order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sales_convert_order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;customer_account<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>customer_nomecampo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to_quote<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nomecampo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_account<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><em><strong>- app/code/core/Mage/Checkout/Model/Type/OnePage.php</strong></em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> saveBilling<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$customerAddressId</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    …
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomerId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> Mage_Sales_Model_Quote<span style="color: #339933;">::</span><span style="color: #004000;">CHECKOUT_METHOD_REGISTER</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCheckoutMethod</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
           <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_customerEmailExists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$address</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getEmail</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">app</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getWebsite</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
               <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'error'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">'message'</span> <span style="color: #339933;">=&gt;</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'There is already a customer registered using this email address'</span><span style="color: #009900;">&#41;</span>
               <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span>
           <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCustomerNomecampo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nomecampo'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>           
       <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">...</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> saveOrder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
           <span style="color: #339933;">...</span>
           <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomerNomecampo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$billing</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomerNomecampo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                     <span style="color: #000088;">$billing</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCustomerNomecampo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCustomerNomecampo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                 <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
           Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">copyFieldset</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checkout_onepage_billing'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'to_customer'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$billing</span><span style="color: #339933;">,</span> <span style="color: #000088;">$customer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            …
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><em><strong>-  app/code/core/Mage/Customer/Model/Entity/Setup.php</strong></em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'nomedocampo'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'label'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Nome do Campo'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'visible'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'required'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'position'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></pre></div></div>

<p><em><strong>-  app\design\frontend\default\default\template\onepage\</strong></em><br />
<em><strong>billing.phtml</strong></em></p>
<p><span style="text-decoration: underline;"><strong>Altere todos os nomes onde tem nomecampo para o nome de seu campo!</strong></span></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;input-box”&gt;</span></span>
                     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;billing:nomecampo&quot;</span>&gt;</span>Inscri<span style="color: #ddbb00;">&amp;ccedil;&amp;atilde;</span>o Estadual <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span>&gt;</span>*<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>
                     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;billing[nomecampo]&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;billing:nomecampo&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Inscri&amp;ccedil;&amp;atilde;o Estadual&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required-entry validate-password input-text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.icefusion.com.br/criando-campo-no-checkoutonepagebilling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

