TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
name: 'greenwellness/wellnessbon' | |
description: 'Definitie voor Green Wellness Wellnessbon.' | |
license: 'proprietary' | |
'minimum-stability': 'dev' | |
config: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getEnableQtyIncrements() ){ ?> | |
<select class="input-text qty" name="qty" id="qty"> | |
<?php $i = (Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMinSaleQty()?Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMinSaleQty():1); ?> | |
<?php do { ?> | |
<option value="<?php echo $i?>"> | |
<?php echo $i?> | |
<?php $i+= Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQtyIncrements() ?> | |
</option> | |
<?php } while ($i <= (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMaxSaleQty()) ?> | |
</select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Author: Tegan Snyder <[email protected]> | |
Example of running a Dataflow profile via command line | |
you can change the profile_id to the one you want to | |
run and issue: | |
time php manual-dataflow-profile.php | |
note you may need to increase the memory_limit in php cli's php_cli.ini | |
RHEL linux copy /etc/php.ini to /etc/php_cli.ini and make changes there then restart Apache. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('log_errors', 1); | |
error_reporting(E_ALL); | |
require 'app/Mage.php'; | |
Mage::app('admin', 'store'); | |
/* @var $customers Mage_Customer_Model_Resource_Customer_Collection */ | |
$customers = Mage::getResourceModel('customer/customer_collection'); | |
$customers->addAttributeToSelect('*'); | |
$customers->setPageSize((isset($argv[1]) && is_numeric($argv[1]))?$argv[1]:2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG=var/log/del_unused_img.log | |
function search_db() { | |
COUNT=$(mysql -uYOURUSER -pYOURPASSWORD YOURDB --execute="SELECT count(*) FROM catalog_product_entity_media_gallery WHERE value = \"$1\"") | |
echo $(echo ${COUNT} | cut -d" " -f2) | |
} | |
echo "Start: "\n >> ${LOG} | |
echo $(date) >> ${LOG} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$backend = Mage::getResourceModel('catalog/product_attribute_backend_media'); | |
$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'media_gallery'); | |
$container = new Varien_Object(array( | |
'attribute' => new Varien_Object(array('id' => $attributeId)) | |
)); | |
$product = new Varien_Object(array( | |
'id' => 519, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original from http://activecodeline.com/git-ignore-gitignore-file-for-magento-project | |
# tested with Magento 1.4.0.1 | |
# put it into magento install dir | |
app/code/community/Phoenix/ | |
app/code/core/ | |
app/design/adminhtml/default/default/ | |
app/design/frontend/base/ |