Magento New Order Notification Widget

I created a small Magento 1 module that simulates sales activity on the site. It will loop through last 20 orders and show little popups on the bottom of the page notifying shopping customers about a purchase by another customer. You can configure duration, frequency and content of the popup.

Continue reading “Magento New Order Notification Widget”

Magento New Order Notification Widget

GO – Process channels in batches

Here a short snippet for how to process buffered channels in batches:

package main                                                                        
                                                                                    
var bsize = 4                                                                       
                                                                                    
func main() {                                                                       
    var c = make(chan int, bsize)                                                   
                                                                                    
    for i := 1; i <= 10; i++ {                                                      
        c <- i                                                                      
                                                                                    
        process(c, false)                                                           
    }                                                                               
                                                                                    
    defer process(c, true)                                                          
}                                                                                   
                                                                                    
func process(c chan int, force bool) {                                              
    if (len(c) != cap(c) && !force) || len(c) == 0 {                                                 
        return                                                                      
    }                                                                               
                                                                                    
    var cutoff int                                                                  
    if force {                                                                      
        cutoff = len(c)                                                             
    } else {                                                                        
        cutoff = cap(c)                                                             
    }                                                                               
                                                                                    
    for i := 0; i < cutoff; i++ {                                                   
        a := <-c                                                                    
        println(a)                                                                  
    }                                                                               
                                                                                    
    println("batch")                                                                
}
GO – Process channels in batches

Magento EE to CE downgrade recap

One of my clients was facing another five figure licencing fee for Magento EE when we got talking about the actual benefits of Magento EE over CE. The main reason the client was using EE was to have access to EE support. The site is a major retailer and any kind of downtime would cause substantial financial loss. In the 3 years of using EE we had contacted the support twice, both times with less than stellar results.

Continue reading “Magento EE to CE downgrade recap”

Magento EE to CE downgrade recap