Back-End

7 mar, 2012

Trabalhando com Magento – dicas e orientações

Publicidade

Recentemente eu comecei a trabalhar com o Magento. A primeira coisa que eu tenho que compartilhar é que ele não é feito em Zend Framework, ele usa bibliotecas do Zend Framework – acredite, isso tem uma grande diferença. 

Eu ainda estou apanhando do Magento, até por que achei muito ruim fazer coisas simples como “adicionar um campo no cadastro de cliente”, “adicionar um novo block no design”. Quem sempre trabalhou com ferramentas como WordPress e Drupal vai sentir a diferença quando for trabalhar com isso no Magento, pois é uma burocracia (XML) enorme. 

Mas verdade seja dita, é uma baita ferramenta para projetos que não precisam de um alto grau de customização, se você quer um ecommerce para vender via PayPal, PagSeguro etc, ele é uma senhora mão na roda.

Para quem está totalmente perdido recomendo a leitura dos seguintes artigos:

Dicas de módulos (plugins):  por enquanto tenho apenas essas:

  • CushyBoleto, módulo para inserir a opção de geração de boletos na sua loja, a grande sacada desse módulo é a integração com o projeto BoletoPHP.
  • MultiKomerci, integra o seu ecommerce com a RedeCard via webservice Komerci e você pode disponibilizar as bandeiras Visa, Master e Diners.

Só duas, porque, como disse, também estou iniciando no Magento. 

Agora vou compartilhar com vocês uma lista de artigos que de alguma forma salvaram a minha vida! Espero que isso ajude vocês a poupar um pouco de tempo pesquisando  

  • Creating Magento Products On-The-Fly! “Sometimes it’s necessary to create products on-the-fly, typically in situations where there are so many product possibilities that even a configurable product isn’t flexible enough! In such situations the need arises to create products dynamically…”
  • Creating Magento products from a script “Magento allows several different ways to add products to the catalog, including manual editing, upload via spreadsheet and the web services Magento Core API. For developers who want to add products through PHP however, there are a few caveats to be aware of for the product to be displayed on the frontend.” 
  • Programatically create customer and order in Magento with full blown One Page Checkout process under the hood – “…Recently I was working on a task that, among other things, required an order to be created programatically alongside with the customer and its billing and shipping address…”
  •  Dynamically Add Customer Data “..Hi there folks, filling in for Ben McManus today and funnily enough I’ve drafted in some help of my own from a certain James Kemp. James has been looking into some dynamic import methods for Magento, most notably customer import…”
  • Adicionando campos customizados ao Customer no Magento “Basicamente o que gostaria de fazer era adicionar um campo customizado ao customer do Magento e exibi-lo tanto no admin, quanto na página de registro e na página de informações do usuário o “Minha conta” (my account).”
  • Magento: Não consigo fazer login de administrador após instalação – “…Se após a instalação do Magento você não conseguir realizar o login de administrador, essa dica pode resolver seu problema…”
  • How to create Magento invoice from order “Maybe you want to create an invoice from some custom script or through cron script. Here is one very useful example of code…”
  • Quick script to batch create Magento categories “A site we administer with a reasonable amount of SKUs (far in excess of 100,000), needed some quick category manipulation for a series of new data to be dropped in. The new information had a desired category tree that had to be built up quick, but with over 600 categories to be created, human effort wouldn’t be suitable.” 
  • Programmatically create order in Magento “Surprisingly one of the trickiest parts of “under the hood” Magento is how to create order programmatically. At least for me, this was/is the most complex area of Magento development.”
  • Custom order creation | Magento create order on fly “Custom order creation using script is one of the tricky part of the magento development but some tweaks on magento will allow you to place order programmaticaly, its something like a custom checkout in single fil..”
  • Genearate order programatically magento , along with sales quotes, sales items and sales address “Complete code with customer registered , genearate order programatically, along with sales quotes, sales items and sales address..”
  • Update Completed Order Details in Magento “Recently I faced a very tough challenge because of stupid mistake made by one of my team member. We were importing orders in Magento through custom script. While importing orders, one supposed to add parent configurable product and a product option…”
  • Automatically cancel pending orders older than 90 minutes There are situations where you might with to automatically cancel orders older than 90 minutes. They stay in “pending_payment” state. This usually happen when the customer didn’t complete the checkout due any reason.
  • Solve 500 Internal Server Error on Magento Installation “If you are installing Magento directly on your server, then you may get some errors while opening the installation wizard on your browser, i.e, 500 INTERNAL SERVER ERROR. Its mainly because of the wrong FILE PERMISSIONS…”

Outra coisa que aprendi sobre Magento é que por mais burocrático que ele seja, você vai sempre poder contar com a sua organização (MVC) e fazer as coisas de um jeito sem parecer tão POG. A classe Mage salva!

Se tu quiser ficar sabendo mais dicas sobre Magento, estou no twitter @porkaria.