This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# βββββββ ββββββββββββ ββββ βββββββ βββ βββββββββββ βββ ββββββββββ | |
# βββββββββββββββββββββ βββββββββββββββββ βββββββββββ βββ βββββββββββ | |
# ββββββββββββββ ββββββββββββββ ββββββ βββββββββ ββββββββββββββββ | |
# ββββββββββββββ ββββββββββββββ βββββββ ββββββββββ βββββββββββββββ | |
# βββ ββββββββββββββ βββ ββββββββββββ βββββββ ββββββββ βββ ββββββ | |
# βββ ββββββββββββββ βββ βββββββ βββββ ββββββββ βββ ββββββ | |
# | |
# βββββββ βββ βββββββ ββββββ ββββββββββββ βββ ββββββ βββββββ ββββββββ | |
# βββββββββββ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ | |
# βββββββββββ βββ βββββββββββ βββ βββ ββ βββββββββββββββββββββββββ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function loadZendeskChat(callback) { | |
var zdscript = document.createElement('script'); | |
zdscript.setAttribute('id','ze-snippet'); | |
zdscript.src = 'https://static.zdassets.com/ekr/snippet.js?key=XXX-XXX-XXX-XXX'; | |
(document.getElementsByTagName('body')[0]).appendChild(zdscript); | |
window.zdonload = setInterval(function(){ | |
if(typeof zE !== "undefined" && typeof zE.activate !== "undefined") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Optimized version of attribute source options model | |
* | |
* That allows to preload options once and reuse them instead of doing calls to db all the time | |
* | |
*/ | |
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table | |
extends Mage_Eav_Model_Entity_Attribute_Source_Table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$attributeId = Mage::getResourceModel('eav/entity_attribute') | |
->getIdByCode('catalog_product', 'color'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* From: http://www.php.net/manual/en/function.str-getcsv.php#88773 and http://www.php.net/manual/en/function.str-getcsv.php#91170 */ | |
if(!function_exists('str_putcsv')) | |
{ | |
function str_putcsv($input, $delimiter = ',', $enclosure = '"') | |
{ | |
// Open a memory "file" for read/write... | |
$fp = fopen('php://temp', 'r+'); | |
// ... write the $input array to the "file" using fputcsv()... | |
fputcsv($fp, $input, $delimiter, $enclosure); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
0346745008178 | |
Should fail - checksum should be 9 | |
5060096384137 | |
Should pass | |
5020650002112 |