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 | |
$resource = Mage::getModel('core/resource'); | |
$write = $resource->getConnection('core_write'); | |
$tablename = $resource->getTableName('cataloginventory/stock_item'); | |
$query = "UPDATE {$tablename} SET `is_in_stock` = 1"; | |
$write->query($query); |
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 | |
$_collection = $this->getCustomerRegistries(); | |
$helper = Mage::helper('mdg_giftregistry'); | |
?> |
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
Server { | |
Port = 8082 | |
SourceRoot = /srv/www/snuggle.demacmedia.com/public_html | |
DefaultDocument = index.php | |
EnableStaticContentCache = 0 | |
EanbleStaticContentFromDisk = true | |
} | |
AdminServer { | |
Port = 8282 | |
Password = admin |
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
Server { | |
Port = 8080 | |
SourceRoot = /srv/www/clean_ce_1702/public_html/ | |
DefaultDocument = index.php | |
EnableStaticContentCache = 0 | |
EnableStaticContentFromDisk = true | |
} | |
AdminServer { | |
Port = 8181 | |
Password = admin |
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
/** | |
* Create Registry Type Table | |
*/ | |
$tableName = $installer->getTable('mdg_giftregistry/type'); | |
// Check if the table already exists | |
if ($installer->getConnection()->isTableExists($tableName) != true) { | |
$table = $installer->getConnection() | |
->newTable($installer->getTable('mdg_giftregistry/type')) | |
->addColumn('type_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( |
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
/** | |
* Create Registry Item Table | |
*/ | |
$tableName = $installer->getTable('mdg_giftregistry/item'); | |
// Check if the table already exists | |
if ($installer->getConnection()->isTableExists($tableName) != true) { | |
$table = $installer->getConnection() | |
->newTable($installer->getTable('mdg_giftregistry/item')) | |
->addColumn('item_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( | |
'identity' => true, |
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 | |
$installer = $this; | |
$installer->startSetup(); | |
/** | |
* Create Registry Type Table | |
* |
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 | |
.... | |
public function newPostAction() | |
{ | |
try { | |
$data = $this->getRequest()->getParams(); | |
$registry = Mage::getModel('mdg_giftregistry/entity'); | |
$customer = Mage::getSingleton('customer/session')->getCustomer(); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "base" |
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 | |
... | |
public function _initModel($param = 'id') | |
{ | |
$model = Mage::getModel('mdg_giftregistry/entity'); | |
$model->setStoreId($this->getRequest()->getParam('store', 0)); | |
if( $modelId = $this->getRequest()->getParam($param)) | |
{ |