Soporte Wifi BCM4313 [14e4:4727] en linux 3.6

Llevaba dándole vueltas para conseguir activar el soporte para la tarjeta wifi dando palos de ciego, pero el camino bueno es este :

http://linuxwireless.org/en/users/Drivers/brcm80211

usando make menuconfig activamos las siguientes opciones del kernel

 

Location: -> Device Drivers

  • -> Network device support
    • -> Wireless LAN
      • -> < m> Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
      • -> < m> Broadcom IEEE802.11n embedded FullMAC WLAN driver
        • -> [*] SDIO bus interface support for FullMAC driver
        • -> [*] USB bus interface support for FullMAC driver

For the PCIe SoftMAC WLAN driver (brcmsmac) you need to enable select the BCMA bus driver as well:

Location: -> Device Drivers

-> Broadcom specific AMBA

-> BCMA support

-> [*] Support for BCMA on PCI-host bus

 

 

recompilar , instalar el kernel nuevo y a correr

Soporte teclado usb en boot bajo linux 3.6

Compilando las nuevas ramas de kernel 3.6 con mi Debian Squeeze y usando particiones cifradas, al arrancar el sistema , en el boot salta el prompt para solicitar la password y poder desencriptar los discos. Pues bien, en ese momento con el kernel de Debian config-2.6.32-5-amd64 puedo usar el teclado perfectamente , pero con la rama 3.6 no.
Como hace tiempo que no recompilaba kernels me ha costado un poco localizado, pero el resultado es este: falta agregar el módulo hid_generic al initrd.

Para solucionarlo ? ,pues sencillo, desde la misma versión 3.6 arrancada se puede generar un nuevo initrd. Lo que hay que hacer es indicarle los módulos que queremos que agrege, para ello se mete el listado de modulos en el fichero /etc/initramfs-tools/modules, en nuestro caso todo esto
[shell]
usb_common
usbcore
usbhid
ehci_hcd
ohci_hcd
uhci_hcd
hid
hid_generic
[/shell]

Una vez hecho esto generamos el initrd:
[shell]
mkinitramfs -o /boot/initrd.img-$(uname -r)
update-grub
[/shell]

y reiniciamos

prestashop fix empty cart cookie overwritted

Hi guys

I found a way to fix this issue.

After many hours of trace code I found that cookie is being overwrited when ajax cart is enabled.

This is the cause that the order was lost and cart appears empty and this is the explaination :

– Supose the first time you visit the shop, no cookies are on your browser yet.

– When you add a product using ajax cart ( using a ajax_add_to_cart_button class button ) you are using this piece of code :
[shell]$(‘.ajax_add_to_cart_button’).unbind(‘click’).click(function(){
var idProduct =  $(this).attr(‘rel’).replace(‘ajax_id_product_’, ”);
if ($(this).attr(‘disabled’) != ‘disabled’)
ajaxCart.add(idProduct, null, false, this);
return false;
});[/shell]
So you call ajaxCart.add() when you add a product.

Inside ajaxCart.add() there are two significant actions that modify your cookie:

first one is expand the cartblock. Basically open the cart box and send an ajax petition to include ‘expand’ parameter into your cookie
[shell]if ($(‘#cart_block #cart_block_list’).hasClass(‘collapsed’))
this.expand();[/shell]
and inside expand() the expand action the visual box slidedown :
[shell]$(‘#’+parentId+’ #cart_block #cart_block_summary’).slideUp(200, function(){
$(this).addClass(‘collapsed’).removeClass(‘expanded’);
$(‘#’+parentId+’ #cart_block #cart_block_list’).slideDown({
duration: 600,
complete: function(){$(this).addClass(‘expanded’).removeClass(‘collapsed’);}
});
});[/shell]
and store cookie value  :
[shell]$.ajax({
type: ‘GET’,
url: baseDir + ‘modules/blockcart/blockcart-set-collapse.php’,
async: true,
data: ‘ajax_blockcart_display=expand’ + ‘&rand=’ + new Date().getTime()
});[/shell]
Second one, adds the product in your cart.
[shell]$.ajax({
type: ‘POST’,
url: baseDir + ‘cart.php’,
async: true,
cache: false,
dataType : “json”,
data: ‘add=1&ajax=true&qty=’ + ((quantity && quantity != null) ? quantity : ‘1’) + ‘&id_product=’ + idProduct + ‘&token=’ + static_token + ( (parseInt(idCombination) && idCombination != null) ? ‘&ipa=’ + parseInt(idCombination): ”),
success: function(jsonData,textStatus,jqXHR)
{
….
….
….

});[/shell]
Well, tracing the code using phpfire I could see that requests are sent in this order :

1.- blockcart-set-collapse.php

2.- cart.php

In cases that works fine I got the return of the request in same order, but when cart gets empty, I reicived cart.php firt and then blockcart-set-collapse.php

This means that blockcart-set-collapse.php is requested without id_cart cookie value, so return a cookie without id_cart.

So id_cart is generated in cart.php call, and blockcart-set-collapse.php returns the cookie after cart.php, so the id_cart is not preserved because is being overwritted.

There are few ways to fix this :

1.- At ajaxCart.add() disable this.expand() , avoid to made ajax call

2.- at ajaxCart.expand() put ajax request before slideDown() call

3.- The second point and made ajaxcall syncronious setting async : false

[shell]$.ajax({
type: ‘GET’,
url: baseDir + ‘modules/blockcart/blockcart-set-collapse.php’,
async: false,
data: ‘ajax_blockcart_display=expand’ + ‘&rand=’ + new Date().getTime()
});[/shell]
Another way to fix this, is to have ever a id_cart at cookie.

I’m not sure but I think at previous prestashop ( 1.3.x) id_cart was stored at cookie in the first request.

At Prestashop 1.4.x cart is generated at FrontControllerCore::init() but not saved even asigned to the cookie.

Reviewing the code quickly, I see that the id_cart is asigned when a product is added to the cart.

So another solution could be to store a cart in cookies ever.

I hope this could help you to fix your shops !

I continue investigating this issue

PounStudio Team !

prestashop / paypal : Uncaught ReferenceError: $ is not defined

Existe un problema con Chrome , prestashop y paypal. Al ir a hacer un pago con paypal se redirige previamente a una web en blanco que genera un formulario para enviar a paypal. Pues chrome bloquea el fichero javascript de jquery. Esto es debido a que tu tienda tiene activado ssl y la url del javascript de jquery no, generando este error en la consola de chrome :

[shell]
Uncaught ReferenceError: $ is not defined
[/shell]

Para solucionarlo edita el fichero modules/paypal/standard/redirect.php y sustituye la linea de url por esta

[shell]
‘url’ => PayPal::getShopDomainSsl(true, true).__PS_BASE_URI__
[/shell]

Hay que usar la funcion PayPal::getShopDomainSsl()