Skip to content

Instantly share code, notes, and snippets.

<!--<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>-->
public function getAddUrl($product)
{
//return $this->_getUrl("catalog/product_compare/add", $this->_getUrlParams($product));
}
<?php
class MyCompanyName_HelloWorld_Model_Cron
{
public function job()
{
/*
burada işleminizi gerçekleştirebilirsiniz.
*/
}
}
<?xml version="1.0"?>
<config>
<modules>
<MyCompanyName_HelloWorld>
<version>0.1.0 </version>
</MyCompanyName_HelloWorld>
</modules>
<global>
<models>
<helloworld>
<?php
class Mage_Checkout_CartController extends Mage_Core_Controller_Front_Action
{
//
//
//
//
//
public function addAction()
{
<?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.
*/
<?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_IndexController extends Mage_Core_Controller_Front_Action{
public function testAction(){
$this->getRequest()->setResponse("Hello World");
}
}
?>