/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
/* @var $connection Varien_Db_Adapter_Pdo_Mysql */
$connection = $installer->getConnection();
$now = Mage::getModel('core/date')->gmtDate(); // 2017-03-17 09:59:10
/* @var $helperCore Mage_Core_Helper_Data */
$helperCore = Mage::helper('core');
$full = $helperCore->formatDate(null, Mage_Core_Model_Locale::FORMAT_TYPE_FULL, true); // Friday, March 17, 2017 11:59:10 AM Europe/Helsinki
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
When you create a model in Magento that reads and writes data $model->load()
and $model->save()
to a database table, by default, Magento expects the primary key of the table to be an auto_increment field called id
.
If you want to use a primary key that is not an auto_increment field then you need to set the _isPkAutoIncrement
flag to false
.
For example:
class {Vendor}_{Extension}_Model_Resource_{Model} extends Mage_Core_Model_Resource_Db_Abstract
Previously, I used Google Feed API
. But this API is officially deprecated and will stop working after December 15th, 2016. See deprecation policy in Google [Terms of Service][terms-of-service] for details.
For example I try to retrieve [Pinterest][pinterest] RSS feed of my pinned posts.
https://pinterest.com/{usename}/feed.rss for my account link is https://pinterest.com/evgvzubkoff/feed.rss
I'm chose a [RSStoJSON][rsstojson]