This file contains 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
+++ b/app/code/core/Mage/Index/Model/Resource/Abstract.php | |
@@ -176,6 +176,7 @@ abstract class Mage_Index_Model_Resource_Abstract extends Mage_Core_Model_Resour | |
if ($from === $to) { | |
$query = $select->insertFromSelect($destTable, $columns); | |
+ $query = str_replace("INSERT INTO", "INSERT IGNORE INTO", $query); |
This file contains 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 | |
$store_id = 5; | |
$csv_filepath = "newsletter.csv"; | |
$email_csv_column_index = 2; | |
$csv_delimiter = ','; | |
$csv_enclosure = '"'; | |
$magento_path = __DIR__; | |
require "{$magento_path}/app/Mage.php"; |
This file contains 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 | |
$store_id = Mage::app()->getStore()->getId(); | |
$collection = Mage::getModel("catalog/product")->getCollection(); | |
$collection->setStoreId($store_id); | |
$collection->addStoreFilter($store_id); | |
//$collection->addAttributeToSelect("*"); | |
$collection->addAttributeToFilter('status', array('in' => array(Mage_Catalog_Model_Product_Status::STATUS_ENABLED))); | |
$collection->addAttributeToFilter('visibility', array('in '=> array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH))); | |
Mage::getSingleton("cataloginventory/stock")->addInStockFilterToCollection($collection); |
This file contains 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
diff --git a/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Category.php b/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Category.php | |
index 5c82f40..63ecf21 100644 | |
--- a/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Category.php | |
+++ b/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Category.php | |
@@ -102,7 +102,22 @@ class Mage_Sitemap_Model_Resource_Catalog_Category extends Mage_Sitemap_Model_Re | |
*/ | |
protected function _getEntityUrl($row, $entity) | |
{ | |
- return !empty($row['request_path']) ? $row['request_path'] : 'catalog/category/view/id/' . $entity->getId(); | |
+ $suffix = Mage::helper('catalog/category')->getCategoryUrlSuffix(); |
This file contains 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 | |
require_once "app/Mage.php"; | |
umask(0); | |
Mage::app(); | |
Mage::singleton("core/session", array("name"=>"frontend")); | |
$session = Mage::getSingleton("customer/session"); | |
if ($session->isLoggedIn()) { | |
} else { |
This file contains 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
public function indexAction() | |
{ | |
$this->loadLayout(); | |
$this->_initLayoutMessages("customer/session"); | |
$this->_initLayoutMessages("catalog/session"); | |
$this->renderLayout(); | |
} |
This file contains 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 | |
require_once 'app/Mage.php'; | |
ini_set('display_errors', 1); | |
Mage::setIsDeveloperMode(true); | |
umask(0); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
try { | |
Mage::getModel('catalogrule/rule')->applyAll(); | |
Mage::getModel('catalogrule/flag')->loadSelf() |
This file contains 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 | |
# user: ubuntu pass: just hit ENTER | |
apt-get install vim ubuntu-defaults-builder live-build uck syslinux-utils coreutils | |
# open /usr/share/livecd-rootfs/live-build/auto/config and add PROJECT=base where there are all the variables | |
ubuntu-defaults-template ubuntu-defaults-umr | |
ubuntu-defaults-image --package ubuntu-defaults-umr_0.1_all.deb | |
mv binary.hybrid.iso ubuntu-mini-remix-15.10-amd64.iso | |
md5sum ubuntu-mini-remix-15.10-amd64.iso>ubuntu-mini-remix-15.10-amd64.iso.md5 | |
mv ubuntu-mini-remix-15.10-amd64.iso* 15.10/ |
This file contains 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 | |
require_once 'abstract.php'; | |
class Shell_Delete_Old_Enterprise_Staging_Backups extends Mage_Shell_Abstract | |
{ | |
public function run() | |
{ | |
$actions = Mage::getModel("enterprise_staging/staging_action")->getCollection() | |
->addFieldToFilter("type", "backup") |
This file contains 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
93c93,106 | |
< $taxClassAmount = array_merge($taxClassAmount, $shippingTax); | |
--- | |
> $_weees = Mage::helper('tax')->getAllWeee($this->getOrder()); | |
> $wees = array(); | |
> foreach ($_weees as $name => $value) { | |
> $wees[] = array( | |
> "tax_amount" => $value, | |
> "base_tax_amount" => $value, | |
> "title" => $name, |
OlderNewer