Skip to content

Instantly share code, notes, and snippets.

View fusco's full-sized avatar
🎯
Focusing

David Demonchy fusco

🎯
Focusing
View GitHub Profile
$sql .= ($first ? "" : ", ") . "(" . (intval($category['categories_id']) + 1) . ", " . $category['parent_id'] . ", " . $category['level_depth'] . ", " . (isset($category['categories_status']) ? intval($category['categories_status']) : 1) . ", '" . $category['date_added'] . "', '" . $category['last_modified'] . "'".($ps_version >= 1.4 ? ', '.((isset($category['sort_order']) AND $category['sort_order']) ? $category['sort_order'] : '0') : '').")";
/* Debug only */
@ini_set('display_errors', 'on');
/*
define('_PS_DEBUG_SQL_', true);
*/
$start_time = microtime(true);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', true);
public function updatefile($merchant_id,$BankServer,$nom_logo){
// fonction qui va écrire/réécrire le fichier /param/pathfile et /param/parmcom........
$pathfile=dirname(__FILE__)."/param/pathfile";
$comfile =dirname(__FILE__)."/param/parmcom.".$merchant_id;
@unlink($pathfile);
$fp=fopen($pathfile, "w");
$return = true;
if($fp){
fwrite($fp,"DEBUG!NO!\n");
fwrite($fp,"D_LOGO!".__PS_BASE_URI__."modules/".$this->name."/logo/!\n");
<block type="catalog/product_list" name="home" template="catalog/product/home.phtml">
<action method="setCategoryId">
<category_id>53</category_id>
</action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName">
<name>product_list_toolbar</name>
</action>
@fusco
fusco / new_store.phtml
Created July 13, 2012 17:47
remplace dropdown store menu by flag
<?php if(count($this->getGroups())>1): ?>
<div class="store-switcher">
<?php foreach ($this->getGroups() as $_group): ?>
<a href="<?php echo $_group->getHomeUrl() ?>"><img
src="<?php echo $this->getSkinUrl('images/store/store_' . strtolower(str_replace(' ', '_',$this->htmlEscape($_group->getName()))) . '.png') ?>" width="30" height="20"
alt="<?php echo $this->htmlEscape($_group->getName()) ?>"/></a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
class Cart extends CartCore
{
public function __construct($id = NULL, $id_lang = NULL)
{
parent::__construct($id, $id_lang);
/* Oleacorner : Optimization of producst cache management in case several cart objects with same IDs are created */
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
authenticated :user do
root to: "agendas#show"
end
unauthenticated :user do
devise_scope :user do
root to: "devise/sessions#new"
end
end
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"create_window_at_startup": false,
"dictionary": "Packages/Dictionaries/French.dic",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".tags*",
"*.pyc",
@fusco
fusco / vsftp.sh
Created March 4, 2014 16:54
gestion vsftp
#!/bin/sh
# =============================================================================
#
# File .....: vsftp_am.sh - Manage virtual user accounts for vsftp
# Date .....: 23/06/2007
#
# -------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by