Skip to content

Ansyori's Blog Posts

Magento : Execute Custom Module Cron Manually

let say we have cron setup on config.xml, like this

and then a functions ready to execute

we can execute manually by run…

Leave a Comment

Magento : Custom Email Template on Custom Module

here the XML guide

 

 

Leave a Comment

Magento : Get All Customer Wishlist Items

here you go

  the results will be like this  

   

Leave a Comment

Magento : Manggil data produk ngangge SKU

sederhana sih, ngan sok poho wae…jadi mending di catet weh,   mangga   $product = Mage::getModel(‘catalog/product’); print_r($product->load($product->getIdBySku(‘SKU_DI_DIEU’))->getData());

Leave a Comment

Magento : Munculkeun Daftar Nilai Attribute ti Spesifik Attribute

jaga2 bisi poho..soalna sering dipake,….ieu carana keur munculkeun attribute value, mangga ah..haha   $name=’size’;  /*kode attribute na di dieu*/ $attributeInfo = Mage::getResourceModel(‘eav/entity_attribute_collection’)->setCodeFilter($name)->getFirstItem(); $attributeId = $attributeInfo->getAttributeId();…

Leave a Comment

Magento : Fix Fatal error Call to a member function getName() on a non-object in ImportExport/Model/Export/Entity/Product.php on line 172

this is a dirty way to fix this issue, go to Fatal error: Call to a member function getName() on a non-object in app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line…

Leave a Comment

Magento : List All Magento Cronjobs

here you go! echo ‘<pre>’; $kron = Mage::app()->getConfig()->getNode(‘crontab/jobs’); print_r($kron); here the example results

Leave a Comment

Magento: How to Find Rewrite Class?

use this simple script to locate rewrite class   print_r(Mage::getConfig()->getNode()->xpath(‘//global//rewrite’));   example result :

 

Leave a Comment

Magento: Reopen Canceled or Complete Order

this is magento hack how to re-open or uncancel the order, use following script, here we go  

Leave a Comment

CSS: Opacity for All Browser

this is sholud be working on All browser, except the legend IE6 .share-action a:hover{ opacity:0.8; -moz-opacity:0.8; -khtml-opacity: 0.8; -ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=80)”; }

Leave a Comment

Magento: Get Recently Viewed Products

here you go $rcv = Mage::getSingleton(‘Mage_Reports_Block_Product_Viewed’)->getItemsCollection(); foreach ($rcv as $item) { $_product = Mage::getModel(‘catalog/product’)->load($item->getProductId()); var_dump($_product->getData()); } mantap gan!!  

Leave a Comment

Magento: Get All Product Attributes

it took me 2 days to figure this out man!! hopes it help please:   $productAttrs = Mage::getResourceModel(‘catalog/product_attribute_collection’); print_r($productAttrs->toArray());   /* sample print out

Leave a Comment

Magento: Directive Review Form & Review List

ok guys, here the directive syntax: <?php echo Mage::app() ->getLayout() ->createBlock(‘review/product_view_list’) ->setTemplate(‘review/product/view/list.phtml’) ->toHtml();   echo Mage::app() ->getLayout() ->createBlock(‘review/form’) ->setTemplate(‘review/form.phtml’) ->toHtml(); ?>

Leave a Comment