Skip to content

Instantly share code, notes, and snippets.

View sr-expert's full-sized avatar

SAID RAJAFALLAH sr-expert

View GitHub Profile
@sr-expert
sr-expert / clean-prestashop-db.sql
Created September 12, 2020 21:21 — forked from julienbourdeau/clean-prestashop-db.sql
Clean PrestaShop database - Drop old and unless data
# Delete all logs
TRUNCATE ps_log;
# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';
@sr-expert
sr-expert / magento2-clear.sql
Created August 7, 2019 23:52 — forked from sergiojovanig/magento2-clear.sql
Magento 2 Clear Database
##########################################################
# PRODUCTS
##########################################################
DELETE FROM `catalog_product_bundle_option`;
DELETE FROM `catalog_product_bundle_option_value`;
DELETE FROM `catalog_product_bundle_selection`;
DELETE FROM `catalog_product_entity_datetime`;
DELETE FROM `catalog_product_entity_decimal`;
DELETE FROM `catalog_product_entity_gallery`;
DELETE FROM `catalog_product_entity_int`;
@sr-expert
sr-expert / Interview back-end developer
Created July 24, 2019 10:28 — forked from jpchateau/Interview back-end developer
Entretien développeur back : PHP / Symfony / MySQL
Cible : Développeur PHP / Symfony / MySQL
Niveau : Senior
Ce document propose des questions classiques, sans piège, à poser lorsque vous désirez valider un candidat pour un poste de développeur back.
J'utilise personnellement cette trame de questions, libre à vous de vous en inspirer, d'ajouter vos propres questions, et de déterminer lesquelles sont éliminatoires à vos yeux.
Veille technologique
Quelle est la version actuelle de PHP ?
> http://php.net/supported-versions.php
@sr-expert
sr-expert / CmsBlockInstaller.php
Created April 9, 2019 15:42 — forked from 0-Sony/CmsBlockInstaller.php
Magento 2 : Create Cms Block Programmatically
<?php
namespace Namespace\Cms\Setup;
use Magento\Cms\Api\BlockRepositoryInterface;
use Magento\Cms\Api\Data\BlockInterface;
use Magento\Cms\Api\Data\BlockInterfaceFactory;
use Magento\Framework\App\State;
use Magento\Framework\App\Area;
use Magento\Framework\Setup\InstallDataInterface;
@sr-expert
sr-expert / magento.php
Created May 30, 2018 16:06 — forked from rintoug/magento.php
Creating Magento simple products programmatically
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
require_once('../app/Mage.php'); //magento bootstrapper
umask(0);
Mage::app('default');
Mage::app ()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //set the magento store id as admin
@sr-expert
sr-expert / Meteorify_Checkout.xml
Created May 29, 2018 16:16 — forked from ashsmith/Meteorify_Checkout.xml
[Not Finished] Override Shipping Method and Payment Steps on Magento Checkout.
<?xml version="1.0"?>
<!-- app/etc/modules/Meteorify_Checkout.xml -->
<config>
<modules>
<Meteorify_Checkout>
<active>true</active>
<codePool>local</codePool>
</Meteorify_Checkout>
</modules>
</config>