Skip to content

Instantly share code, notes, and snippets.

<?php
ini_set('display_errors', 1);
require_once('TwitterAPIExchange.php');
$settings = array(
'oauth_access_token' => "xxx",
'oauth_access_token_secret' => "xxx",
'consumer_key' => "xxx",
'consumer_secret' => "xxx"
);
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES ('TR', '01', 'Adana');
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES ('tr_TR', LAST_INSERT_ID(), 'Adana');
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES ('TR', '02', 'Adıyaman');
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES ('tr_TR', LAST_INSERT_ID(), 'Adıyaman');
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES ('TR', '03', 'Afyon');
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES ('tr_TR', LAST_INSERT_ID(), 'Afyon');
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES ('TR', '04', 'Ağrı');
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES ('tr_TR', LAST_INSERT_ID(), 'Ağrı');
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES ('TR', '05', 'A
<?php
class MyCompanyName_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action{
public function testAction(){
$this->getRequest()->setResponse("Hello World");
}
}
?>
<?xml version="1.0"?>
<config>
<modules>
<mycompanyname_helloworld>
<version>0.1.0 </version>
</mycompanyname_helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<?xml version="1.0"?>
<config>
<modules>
<MyCompanyName_HelloWorld>
<active>true</active>
<codePool>local</codePool>
</MyCompanyName_HelloWorld>
</modules>
</config>
<?xml version="1.0"?>
<config>
<modules>
<mycompanyname_helloworld>
<version>0.1.0 </version>
</mycompanyname_helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<?php
class MyCompanyName_HelloWorld_Model_Observer
{
public function addProductToCartAfter(Varien_Object $observer)
{
$quote=$observer->getEvent()->getQuote();
$customer=Mage::getSingleton('checkout/session')->getCustomer();
/*
burada isleminizi tanımlayabilirsiniz.
*/
<?php
class Mage_Checkout_CartController extends Mage_Core_Controller_Front_Action
{
//
//
//
//
//
public function addAction()
{
<?xml version="1.0"?>
<config>
<modules>
<MyCompanyName_HelloWorld>
<version>0.1.0 </version>
</MyCompanyName_HelloWorld>
</modules>
<global>
<models>
<helloworld>
<?php
class MyCompanyName_HelloWorld_Model_Cron
{
public function job()
{
/*
burada işleminizi gerçekleştirebilirsiniz.
*/
}
}