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
DELETE FROM `core_config_data` WHERE `path` LIKE '%quoteadv%'; | |
DELETE FROM `core_config_data` WHERE `path` LIKE '%carriers/qquoteshiprate%'; | |
DELETE FROM `core_resource` WHERE `code` LIKE '%quoteadv%' ; | |
DELETE FROM `eav_attribute` WHERE `attribute_code` LIKE '%allowed_to_quote%' | |
DELETE FROM `eav_attribute` WHERE `attribute_code` LIKE '%group_allow_quote%' | |
DROP TABLE `quoteadv_crmaddon_messages`; | |
DROP TABLE `quoteadv_crmaddon_templates`; | |
DROP TABLE `quoteadv_extraoptions`; |
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 | |
/** | |
* Optimized version of attribute source options model | |
* | |
* That allows to preload options once and reuse them instead of doing calls to db all the time | |
* | |
*/ | |
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table | |
extends Mage_Eav_Model_Entity_Attribute_Source_Table |
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 | |
class EcomDev_Optimization_Model_Rule_Observer extends Mage_CatalogRule_Model_Observer | |
{ | |
protected $_preloadedPrices = array(); | |
public function beforeCollectTotals(Varien_Event_Observer $observer) | |
{ | |
$quote = $observer->getQuote(); | |
$date = Mage::app()->getLocale()->storeTimeStamp($quote->getStoreId()); |
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
INSERT INTO catalog_category_product | |
SELECT {{NEWCATEGORY}} as category_id, tablea.product_id, 999 as position | |
FROM `catalog_category_product` tablea | |
LEFT OUTER JOIN `catalog_category_product` tableb | |
ON tablea.product_id = tableb.product_id | |
AND tableb.category_id = {{NEWCATEGORY}} | |
WHERE tablea.`category_id` = {{OLDCATEGORY}} AND tableb.position is NULL |
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
private function csvAction(){ | |
$this->disableLayout(); | |
$this->disableViewAutoRender(); | |
$obj_list = new YourObject_List(); | |
$obj_list->load(); | |
/* @var $obj Object_YourObject */ | |
$out = array(); | |
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
# HAProxy config | |
mkdir /etc/haproxy | |
cat > /etc/haproxy/haproxy.cfg << EOF | |
global | |
maxconn 4096 | |
defaults | |
mode http | |
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
level street_address | |
city 3ème Arrondissement Paris | |
state Île-de-France | |
sw_lat 48.86710531970849 | |
parent_hash[city] 3rd arrondissement of Paris | |
accuracy 8 | |
sw_lng 2.354801119708498 | |
parent_hash[accuracy] 5 | |
parent_hash[ne_lat] 48.8711592 | |
parent_hash[sw_lat] 48.8564786 |
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'; | |
Mage::app('default'); | |
$productIds = array(100, 101, 102); | |
$option = array( | |
'title' => 'Test Option', | |
'type' => 'file', | |
'is_require' => 1, |
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 | |
//STEP 1: Save the below file as Cron_Import.php on the Magento base folder. | |
//STEP 3: Test this on your SSH login to check if this works on command line. Use the below command | |
//wget -T0 -t1 -O - http://<www.example.com>/Cron_Import.php/?files=3XSEEEE.csv | |
//uncommentwhen moved to server - to ensure this page is not accessed from anywhere else | |
//if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { | |
// die("You are not a cron job!"); | |
//} |
OlderNewer