Skip to content

Instantly share code, notes, and snippets.

View dangtrinhtran's full-sized avatar

Dang Trinh Tran dangtrinhtran

View GitHub Profile
@dangtrinhtran
dangtrinhtran / Add *.mp4
Last active March 2, 2017 03:03
Some of the standard configuration for Magento
<?xml version="1.0"?>
<config>
<adminhtml>
<cms>
<browser>
<extensions>
<media_allowed>
<mp4>1</mp4>
</media_allowed>
</extensions>
@dangtrinhtran
dangtrinhtran / amshopby-ajax.js
Created October 15, 2015 07:18
Add ajax loading
Amasty_Shopby Extension: js\amasty\amshopby\amshopby-ajax.js
<script type="text/javascript">
//Line 116
/*$$('div.amshopby-overlay').each(function(e){
e.show();
});*/
//Call function at here
jQuery(document).configurationAjax('createLoading');
@dangtrinhtran
dangtrinhtran / layout.xml
Last active October 14, 2015 07:34
Customer Account in Magento: Set Customer Account Link Active (even on sub pages)
To manually specify which tab that you would like highlighted in the customer
account section, you will need to specify the setActive method with reference
to the customer_account_navigation block.
<?xml version="1.0"?>
<layout version="0.1.0">
<dealers_orders_orderdetails>
<!--HERE-->
<reference name="customer_account_navigation">
<action method="setActive"><path>dealers/orders/</path></action>
@dangtrinhtran
dangtrinhtran / Amasty_Shopby_Model_Catalog_Layer_Filter_Category.php
Last active October 14, 2015 07:33
Amasty_Shopby Extension: Filter multi category
<?php
protected function addState($ids)
{
/** @var Mage_Catalog_Model_Resource_Category_Collection $categories */
$categories = Mage::getModel('catalog/category')->getCollection();
$categories->addIdFilter($ids);
$categories->addAttributeToSelect('name');
//$names = $categories->getColumnValues('name');
/**