My Cart

You have no items in your shopping cart. Buy products from our webshop

Kleine bug in Magento 1.6.2.0 - Problemen bij gebruiken van custom variables in nieuwsbrief template

De afgelopen dagen liep ik tegen een probleem aan waar ik in eerste instantie Aheadworks' Advanced Newsletter de schuld voor gaf. Ik probeerde Magento custom variabelen te gebruiken in emailtemplates, maar bij het previewen in advanced newsletter kreeg ik een blanke pagina voorgeschoteld en bij het verzenden van testemails ontving ik lege mailtjes.

Het probleem bleek echter niet afkomstig te zijn van deze third-party module, maar een foutje te zijn in Magento. Wanneer je namelijk een tweede store view (winkelaanzicht) aanmaakt, is het probleem - dat overigens ook voorkomt in de standaard nieuwsbrief module - per direct opgelost. Dit is eenvoudig te testen met de newsletter template preview functionaliteit; als die werkt, werkt je email ook. In ons geval is een tweede winkelaanzicht niet echt een oplossing, maar mocht dit geen bezwaar voor je zijn dan is dit een prima fix. Ik heb de bug inmiddels bij Magent gerapporteerd, dus hij zal in de volgende versie waarschijnlijk opgelost zijn!

Update [FIX]: Heb het probleem en een betere oplossing gevonden. Maak een kopie van   /app/code/mage/Mage/Newsletter/Model/Template.php naar /app/code/local/Mage/Newsletter/Model/Template.php en zoek de method getProcessedTemplate op. Verwijder of commend regel 206:

There is a small bug in Magento 1.6.2.0 when using custom variables (system > custom variables) in newsletter templates. When you use them, you'll discover that emails are send completely empty and when you preview the template from the queue, you'll see that the preview also gives a blank page. I don't know exactly where the problem lies, but I discovered that when I add an extra store view, the problem is solved instantly. I've already reported the bug, so hopefully it will be fixed in the next release. In the meanwhile, use the fix stated above.

 

Erwin Otten

Erwin Otten is a Web Designer / Graphic Designer from Oude Wetering (The Netherlands) and co-founder of Hachmang & Otten. With an education in communication & multimedia design, he is passionate about web design at all levels including (information) architecture, interaction, code, and graphic design. Contact Erwin Otten

Comment and contribute