Skip to content

Instantly share code, notes, and snippets.

View jrruiz's full-sized avatar

Jose Ramón Ruiz Sánchez jrruiz

View GitHub Profile
@jrruiz
jrruiz / fullwidth.js
Last active May 18, 2016 11:24
Force full width for elements inside an element without full width
function setFullWidth(elements) {
var $window = $(window);
if (!Array.isArray(elements)) {
elements = [elements];
}
elements = elements.map(function(element) {
element.position = element.position || 'relative';
return element;
@jrruiz
jrruiz / FrontController.php
Created April 21, 2015 13:02
Prestashop canonical URL
<?php
class FrontController extends FrontControllerCore
{
public function init()
{
parent::init();
$this->context->smarty->assign('canonical_url', $this->getCanonicalUrl());
}
@jrruiz
jrruiz / AdminCartRulesController.php
Created October 31, 2014 13:07
Prestashop sql improvements
<?php
class AdminCartRulesController extends AdminCartRulesControllerCore
{
protected function afterAdd($currentObject)
{
/*
* Omitted code...
*/