The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
SET FOREIGN_KEY_CHECKS=0; | |
-- Customers | |
TRUNCATE `customer_address_entity`; | |
TRUNCATE `customer_address_entity_datetime`; | |
TRUNCATE `customer_address_entity_decimal`; | |
TRUNCATE `customer_address_entity_int`; | |
TRUNCATE `customer_address_entity_text`; | |
TRUNCATE `customer_address_entity_varchar`; | |
TRUNCATE `customer_entity`; |
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_price_index`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_bundle_selection_price`; | |
TRUNCATE TABLE `catalog_product_bundle_stock_index`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; |
This guide will help with install ioncube loader on an Nginx web server http://www.ioncube.com/loaders.php
** In this guide there are some specific directories that might not be the same for all environments
This is needed to know which ioncube extension you will need to use. For example, if you are running php 5.5 you will need the ioncube_loader_lin_5.5.so file
Just replace the VERSION Number for the version you want. | |
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz | |
tar -zxvf magento-1.7.0.2.tar.gz | |
mv magento/* magento/.htaccess . | |
chmod -R o+w media var | |
chmod o+w app/etc |
IMPORTANT NOTE: To have this work you cannot have Flat Catalog enabled | |
// ORIGINAL ----------------------- | |
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
// Load Up Magento Core | |
define('MAGENTO', realpath('')); |
Look in the file: | |
app/Mage.php | |
in Mage.php look for the dispatchEvent() function | |
public static function dispatchEvent($name, array $data = array()) | |
inside the dispatchEvent() function add a Mage::log() | |
Mage::log('events: '.$name); | |
Truncate Text
truncate($STRING, $LENGTH); ?>Ways to print attributes
Create a branch:
$ git branch <name_of_your_new_branch>
Push the branch on github :
$ git push origin <name_of_your_new_branch>
Switch to your new branch :
UPDATE wp_options SET option_value = Replace(option_value, 'current-staging-domain', 'primary-domain-name'); | |
UPDATE wp_posts SET post_content = Replace(post_content, 'current-staging-domain', 'primary-domain-name'); | |
UPDATE wp_posts SET guid = Replace(guid, 'current-staging-domain', 'primary-domain-name'); |