<?= $form->field($productForm, 'category_parent_id')->dropDownList($productForm->categories->parentCategoriesList(), [
'prompt' => 'Select',
'onchange' => '
$.ajax({
url: "' . Url::to(['/admin/products/categories/item-list']) . '",
type: "POST",
data: {id: $(this).val()},
success: function(response){
$("#categories_id").html(response).attr("disabled", false)
}
})
'
]) ?>
<?= $form->field($productForm, 'category_id')->dropDownList($productForm->categories->categoriesList(), [
'id' => 'categories_id',
'prompt' => 'Select',
'disabled' => false
]) ?>
'useFileTransport' => false,
setcookie("visit_count", $visit_count, strtotime("+30 days"));
$xml = simplexml_load_file('protected/data/list.xml');