Skip to content

Instantly share code, notes, and snippets.

Benito Gutierrez benytocarlo

Block or report user

Report or block benytocarlo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@benytocarlo
benytocarlo / detalle_productos_prestashop.sql
Last active Oct 17, 2016
Productos activados en Prestashop
View detalle_productos_prestashop.sql
SELECT
p.id_product AS ID,
p.reference AS REFERENCIA,
pl.name AS NOMBRE ,
pm.name AS FABRICANTE,
p.price AS PRECIO ,
pl.link_rewrite as LINK,
pa.reference,
pa.upc,
pa.price,
@benytocarlo
benytocarlo / getallcombinations.sql
Created Feb 19, 2016
get all combinations prestashop
View getallcombinations.sql
SELECT
p.id_product,
pa.reference,
pa.upc,
pa.price,
pai.id_image,
pl.name,
GROUP_CONCAT(DISTINCT(pal.name) SEPARATOR ", ") as combination,
pq.quantity
FROM ps_product p
View imagenes_productos_magento.sql
SELECT *
FROM `catalog_product_entity` AS a
INNER JOIN `eav_attribute` AS `attribute` ON `attribute`.attribute_code = 'image'
AND `attribute`.frontend_input = 'media_image'
LEFT JOIN `catalog_product_entity_varchar` AS b ON a.entity_id = b.entity_id
AND b.attribute_id = attribute.attribute_id
WHERE `type_id` = 'simple' AND (b.value = ''
OR b.value IS NOT NULL
OR b.value != 'no_selection')
@benytocarlo
benytocarlo / carros_abondanados
Last active Aug 29, 2015
Carros abandonados Magento
View carros_abondanados
SELECT `main_table`.*, GROUP_CONCAT(item.sku) AS `skus`, (main_table.base_subtotal_with_discount*main_table.base_to_global_rate) AS `subtotal`, `cust_email`.`email`, `cust_fname`.`value` AS `firstname`, `cust_lname`.`value` AS `lastname`, CONCAT_WS(' ', cust_fname.value, cust_lname.value) AS `customer_name` FROM `sales_flat_quote` AS `main_table`
INNER JOIN `sales_flat_quote_item` AS `item` ON item.quote_id = main_table.entity_id
INNER JOIN `customer_entity` AS `cust_email` ON cust_email.entity_id = main_table.customer_id
INNER JOIN `customer_entity_varchar` AS `cust_fname` ON cust_fname.entity_id = main_table.customer_id AND cust_fname.attribute_id = 5
INNER JOIN `customer_entity_varchar` AS `cust_lname` ON cust_lname.entity_id = main_table.customer_id AND cust_lname.attribute_id = 7 WHERE (items_count != '0') AND (main_table.is_active = '1') GROUP BY `item`.`quote_id` ORDER BY updated_at DESC
// Agrupado por fecha
SELECT `main_table`.*, (main_table.base_subtotal_with_discount*main_table.base_to_
@benytocarlo
benytocarlo / robots.txt
Created Jun 25, 2015
Robots.txt for Magento
View robots.txt
User-agent: *
Disallow: /index.php/
Disallow: /*?
Disallow: /*.js$
Disallow: /*.css$
Disallow: /customer/
Disallow: /checkout/
Disallow: /js/
Disallow: /lib/
Disallow: /media/
@benytocarlo
benytocarlo / gist:9a8182bd616c8472362e
Created Jun 23, 2015
Listado de Usuarios en magento
View gist:9a8182bd616c8472362e
SELECT DISTINCT ce.entity_id AS b, email, 'default_password', (
SELECT value
FROM customer_entity_varchar
WHERE attribute_id =7
AND customer_entity_varchar.entity_id = b
) AS l_name, (
SELECT value
FROM customer_entity_varchar
View bootstrap_pagination_helper.rb
module BootstrapPaginationHelper
class LinkRenderer < WillPaginate::ActionView::LinkRenderer
protected
def page_number(page)
unless page == current_page
link(page, page, :rel => rel_value(page))
else
link(page, "#", :class => 'active')
end
@benytocarlo
benytocarlo / .htaccess
Last active Aug 29, 2015
seguridad htaccess
View .htaccess
#activar charset utf8 cuando servidor no lo reconoce
AddDefaultCharset UTF-8
#Ocultar Listado Directorios
Options All -Indexes
#Hotlink
#RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
@benytocarlo
benytocarlo / server_route.php
Created Jul 4, 2014
Ruta absoluta del servidor
View server_route.php
<?php
echo dirname(__FILE__);
?>
@benytocarlo
benytocarlo / mediamath.html
Created Jun 23, 2014
Tag event con MediaMath
View mediamath.html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
You can’t perform that action at this time.