This file contains hidden or 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
array.reduce((objectsByKeyValue, obj) => { | |
const value = keys.map(key => obj[key]).join(',');//to separate name and id | |
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj); | |
return objectsByKeyValue; | |
}, {}); | |
const groupByShopName = groupBy(['name','shop_id']); | |
AllMyCartElements= JSON.stringify(groupByShopName(existingEntries)); |
This file contains hidden or 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
setup(props) { | |
let products= ref(props.Product) | |
window.addEventListener('scroll',debounce((e)=>{ | |
This file contains hidden or 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
///search_bar | |
add_action( 'wp_ajax_load_search_res', 'lamacom_search_bar' ); | |
add_action( 'wp_ajax_nopriv_load_search_res', 'lamacom_search_bar' ); | |
function lamacom_search_bar() { | |
This file contains hidden or 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
private function resetAll($datas){ | |
foreach($datas as $key=>$pods){ | |
$datas[$key]=''; | |
} | |
return $datas; | |
} |
This file contains hidden or 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 | |
error_reporting(E_ALL | E_STRICT); | |
$mageFilename = 'app/Mage.php'; | |
if (!file_exists($mageFilename)) { | |
echo $mageFilename." was not found"; | |
exit; | |
} | |
require_once $mageFilename; | |
Varien_Profiler::enable(); |