Created
February 10, 2020 12:45
-
-
Save maagmirror/db4dba611571572f1793afc14f7a3dfa to your computer and use it in GitHub Desktop.
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
function importchildcat($cat) { | |
$mainData = ''; | |
$params = ['jsondata' => '{"filter":{"padre":' . $cat . ',"soloProductosEncontrados":false},"pageSize":500,"absolutePage":0}']; | |
$mainData = postRequest('http://www.alquimicossancristobal.com/fronttienda/obtenercategorias/', $params); | |
$parsedData = json_decode($mainData, true); | |
$catobj = $parsedData; | |
for($i = 0; $i < count($catobj['result']['arbol']); $i++){ | |
//obtenemos el nombre de la categoria | |
$data = $catobj['result']['arbol'][$i]['nombre']; | |
addnewcategory($data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment