Tips of wisdom

January 18th, 2010

I’ve learned that I like my teacher because she cries when we sings “Silent Night”.
Age 5

I’ve learned that our dog doesn’t want to eat my broccoli either.
Age 7

I’ve learned that when I wave to people in the country, they stop what they are doing and wave back.
Age 9

I’ve learned that just when I get my room the way I like it, Mom makes me clean it up again.
Age 12

I’ve learned that if you want to cheer yourself up, you should try cheering someone else up.
Age 14

I’ve learned that although it’s hard to admit it, I’m secretly glad my parents are strict with me.
Age 15

I’ve learned that silent company is often more healing than words of advice.
Age 24

I’ve learned that brushing my child’s hair is one of life’s great pleasures.
Age 26

I’ve learned that wherever I go, the world’s worst drivers have followed me there.
Age 29

I’ve learned that if someone says something unkind about me, I must live so that no one will believe it.
Age 30

I’ve learned that there are people who love you dearly but just don’t know how to show it.
Age 42

I’ve learned that you can make some one’s day by simply sending them a little note.
Age 44

I’ve learned that the greater a person’s sense of guilt, the greater his or her need to cast blame on others.
Age 46

I’ve learned that children and grandparents are natural allies.
Age 47

I’ve learned that no matter what happens, or how bad it seems today, life does go on, and it will be better tomorrow.
Age 48

I’ve learned that singing “Amazing Grace” can lift my spirits for hours.
Age 49

I’ve learned that motel mattresses are better on the side away from the phone.
Age 50

I’ve learned that you can tell a lot about a man by the way he handles these three things: a rainy day, lost luggage, and tangled Christmas tree lights.
Age 51

I’ve learned that keeping a vegetable garden is worth a medicine cabinet full of pills.
Age 52

I’ve learned that regardless of your relationship with your parents, you miss them terribly after they die.
Age 53

I’ve learned that making a living is not the same thing as making a life.
Age 58

I’ve learned that if you want to do something positive for your children, work to improve your marriage.
Age 61

I’ve learned that life sometimes gives you a second chance.
Age 62

I’ve learned that you shouldn’t go through life with a catchers mitt on both hands. You need to be able to throw something back.
Age 64

I’ve learned that if you pursue happiness, it will elude you. But if you focus on your family, the needs of others, your work, meeting new people, and doing the very best you can, happiness will find you.
Age 65

I’ve learned that whenever I decide something with kindness, I usually make the right decision.
Age 66

I’ve learned that everyone can use a prayer.
Age 72

I’ve learned that even when I have pains, I don’t have to be one.
Age 82

I’ve learned that every day you should reach out and touch someone. People love that human touch-holding hands, a warm hug, or just a friendly pat on the back.
Age 90

I’ve learned that I still have a lot to learn.
Age 92

Bookmark and Share

módulo Pagseguro para osCommerce 3

October 26th, 2009

Aproveitando que escrevi sobre um erro muito comum do módulo escrito por mim para a Pagseguro, resolvi colocar algumas considerações sobre o futuro desse módulo.

A loja osCommerce 3 está em forma de release candidate (RC5, se não me engano agora), o que faz algumas pessoas estarem tentando testá-la.
O módulo existente do Pagseguro não funcionará com essa versão, pois as classes necessárias para isso foram modificadas, o que faz o módulo antigo simplesmente não se comunicar com os servidores da Pagseguro.
Não há previsão nossa para desenvolvermos um modulo gratuitamente para o osCommerce. Caso alguma empresa se interesse em patrocinar o desenvolvimento / atualização do módulo, estamos abertos a propostas.

Além disso, sobre os módulos existentes:

O módulo desenvolvido pela empresa Visie modifica o core da loja, fazendo com que os métodos de cálculo de frete da loja sejam ignorados em favor do cálculo de frete para Pagseguro (apenas Sedex e PAC). Toda loja que precisa de outras formas de frete (como transportadora, frete fixo, internacional, etc) não funcionam com esse módulo corretamente.

O módulo que está com minha assinatura e é distribuído hoje não tem suporte para a atualização automática do pedido, coisa que para algumas lojas é muito importante, como as lojas de venda de produtos digitais (scrapbooking / apostilas / livros / músicas / outros downloads). Esse suporte existe hoje em nossas lojas ecartgt e mais algumas outras lojas.
(Infelizmente, uma empresa teve acesso a nosso módulo em uma loja de scrapbooking e passou a vender o módulo modificado para o ZenCart. Não temos nenhum vínculo com essa empresa e portanto não respondemos nenhum pedido de suporte para esse módulo)

Atualizarei este post no futuro com mais informações. Se você tiver outras perguntas, por favor coloque-as nos comentários.

Bookmark and Share

pagseguro: “O campo ITEM_VALOR_0 deve ser numérico”

October 26th, 2009

Recebo dezenas de perguntas sobre isso, e não há uma solução de terceiros para esse erro, o que é MUITO estranho.

Esse erro ocorreo simplesmente porque o módulo foi projetado para funcionar com múltiplas moedas, enquanto o Pagseguro só funciona com uma (Reais por enquanto).

A solução é simples: acesse a configuração do MÖDULO e modifique o campo “moeda usada no Brasil” para o código usado pelo real em sua loja. Pode ser qualquer código, desde que seja exatamente igual o que você já usa.

Com isso, o módulo vai funcionar corretamente de imediato.

Aproveite e veja meu site: www.ecartgt.com.br

Bookmark and Share

Antivírus (Avast4Home) novo serial

October 25th, 2009

Para os usuários do Avast que têm preguiça de efetuar o registro no site do Avast, o serial abaixo foi registrado este mês (out/2009):

W2275589H1400A0911-WTXY9SBD

O procedimento é clicar com botão direito no ícone do Avast > “Sobre o Avast” > “Chave de licença” > cole o serial.
Clique em OK e já poderá atualizar o programa por mais algum tempo. :-)

Bookmark and Share

DIMENSÕES DE CADA UM

October 6th, 2009

Ontem, minha esposa e eu estávamos sentados na sala, falando das muitas coisas da vida.
Estávamos falando de viver ou morrer.
Eu lhe disse:
– Nunca me deixe viver em estado vegetativo, dependendo de uma máquina e líquidos. Se você me vir nesse estado, desliga tudo o que me mantém vivo, por favor !!!
Ela se levantou, desligou a televisão e jogou minha cerveja fora.

Bookmark and Share

Como abraçar um bebê

August 31st, 2009

1. Primeiro, ah… encontre um bebê :)

Encontre o bebê

Encontre o bebê

2. Segundo, tenha certeza que o objeto encontrado seja mesmo um bebê, utilize a técnica do faro.

tenha certeza que o objeto encontrado seja mesmo um bebê, utilize a técnica do faro.

tenha certeza que o objeto encontrado seja mesmo um bebê, utilize a técnica do faro.

3. A seguir amacie o bebê antes de começar o processo do abraço.

amacie o bebê antes de começar o processo do abraço.

amacie o bebê antes de começar o processo do abraço.

4. ‘A técnica do deslize de patas’: Deslize as patas em volta do bebe e se prepare para o close.

Deslize as patas em volta do bebe e se prepare para o close.

Deslize as patas em volta do bebe e se prepare para o close.

5.. Finalmente, pegue a câmera fotográfica, e execute a difícil arte de abraçar, sorrir e inclinar ao mesmo tempo, para conseguir a melhor foto!

Finalmente, pegue a câmera fotográfica, e execute a difícil arte de abraçar, sorrir e inclinar ao mesmo tempo, para conseguir a melhor foto!

Finalmente, pegue a câmera fotográfica, e execute a difícil arte de abraçar, sorrir e inclinar ao mesmo tempo, para conseguir a melhor foto!

Bookmark and Share

oscommerce SEO URLs x shared SSL

August 4th, 2009

Today I faced a weird problem with some stores using SEO URLs and also using shared SSL.

Background: shared SSLs are popular among hosting providers, where the users can use both http://www.mydomain/myfile.html AND https://ssl.myhosting.com/users/mydomain/myfile.html

This situation is quite useful for ecommerce sites, because you won’t have to purchase a SSL certificate (at least, not while you’re trying to setup your store) and still benefit from using encrypted transmission of data to/from your server.

osCommerce has the ability of jumping back and forth from both URL formats, e.g. in a moment you are in the home of the store, in http://www.mydomain.com/index.php and in the other, you click in my account and move to https://sss.myhosting.com/users/mydomain/account.php, all transparently to the user, besides the info in the address bar.

That’s good for users of the standard osCommerce script, but I’d say that many the stores use a contribution named SEO URLs, which rewrites the standard url of a product (example: product_info.php?product_id=XX) into a more readable format: my_products_title-p-XX.html), which helps a LOT in Search Engine Optimization (hence SEO URLs ;-) ).

All the problem arises from two facts:

  • SEO URLs relies upon using mod_rewrite in Apache servers, which need a statement in .htaccess like
    “rewritebase /mystore/” to work, along with some rewrite rules.
  • The RewriteBase statement is not conditional, i.e., it cannot be differently for SSL or nonssl addresses.

It’s not a really big deal, since all rewritten urls *should*  be pointing to http addresses, and so any https addresses are not rewritten.

In other words: the links to products in your store are all pointing to http://www.mydomain.com/myproduct-p-xx.html and the a “rewrite base /” will suffice.

BUT, you cannot underestimate Murphy’s law. If a user sees https://sss.myhosting.com/users/mydomain/account.php, there’s a good chance that they can try to append the product’s URL in the address, just to check if they’re not being fouled into a phishing website. Something like:

https://sss.myhosting.com/users/mydomain/my_products_title-p-XX.html.

As the .htaccess file is set by the standard configuration, the above URL will return a 404 error, and your visitor may think it’s not the same website. So, what can we do?

I modified my .htaccess to create 2 sets of rewrite rules, one for http and other for https accesses, like these:

RewriteCond %{HTTP_HOST} ^ssl\.myhost\.com$ [NC]
RewriteRule ^(.*)-p-([0-9]+).html$ users/mydomain.com/product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9_]+).html$ users/mydomain.com/index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ users/mydomain.com/index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ users/mydomain.com/popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ users/mydomain.com/product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ users/mydomain.com/product_reviews_info.php?products_id=$2&%{QUERY_STRING} [L]

RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} [L]

What are we doing here?
Those RewriteCond statements will limit the scope of each rewriterule block, so that one will work for https and the other will be OK for http accesses. Pretty straightforward, huh?

Bookmark and Share

Neuroscience: How to explain music for the masses :)

August 1st, 2009
Bookmark and Share

oscommerce’s paypal module problem with downloads

May 31st, 2009

I struggled a lapse of time today because my new customer’s store was delivering downloadable products for pending orders, using the standard_ipn module made for oscommerce rc1.

The whole problem is that the original Paypal_ipn module for oscommerce (since version 2.2 MS2 as far as I could track) DOES NOT  have an option to changes statuses when an order was approved (completed).

It simply have two statuses: Preparing (before the customer went to the Paypal gateway) and Acknowledged (after the customer returned from the gateway). So, this customer’s module was set to change the order’s status to “download available” when the module was just saying “Acknowledged”.

The fix: add a new setting to the module and edit the file ext/modules/payment/paypal/standard_ipn.php to account this new order status.

(if you don’t know what I mean, hire a good programmer to do it for you or contact me and I can help you for a small fee.)

Bookmark and Share

“esta página pode conter um risco de segurança não especificado. deseja continuar?”

May 17th, 2009

O erro do título aparece frequentemente quando preciso dar um clique direito, copiar arquivos ou outras ações em uma pasta de rede. A solução está no link abaixo:

http://www.howtogeek.com/howto/windows-vista/disable-the-annoying-this-page-has-an-unspecified-potential-security-risk-when-using-files-on-a-network-share/

Bookmark and Share

WordPress Loves AJAX