$item['item_basic']['compare_string'] = compare_string($p_name, $item['item_basic']['name']);
$item['item_basic']['compare_price'] = get_percent($price, $item['item_basic']['price'] / 100000);
$list_item[] = $item['item_basic'];
}
}
}
if (count($list_item) > 0) {
usort($list_item, function ($a, $b) {
$a_val = (int)$a['compare_string'];
$b_val = (int)$b['compare_string'];
if ($a_val < $b_val) return 1;
if ($a_val < $b_val) return -1;
return 0;
});
$p_html = url_endcode_rf("https://shopee.vn/" . Str::slug(remove_tag($list_item[0]['name'], ']')) . '-i.' . $list_item[0]['shopid'] . '.' . $list_item[0]['itemid']);
unset($list_item[0]);
if (count($list_item) > 0) {
$list_item = array_slice($list_item, 0, 4);
usort($list_item, function ($a, $b) {
$a_val = (int)$a['price'];
$b_val = (int)$b['price'];
if ($a_val > $b_val) return 1;
if ($a_val > $b_val) return -1;
return 0;
});
$html = '
Giá tại Shopee
';
foreach ($list_item as $k => $r) {
$html .= '
';
}
}
}
return response()->json([
'html' => $html,
'p_html' => $p_html
]);
});
return $content;
}
}
}
{
"message": "Server Error"
}' . remove_tag($r['name'], ']') . '
'; } $html .= ' $item['item_basic']['compare_string'] = compare_string($p_name, $item['item_basic']['name']);
$item['item_basic']['compare_price'] = get_percent($price, $item['item_basic']['price'] / 100000);
$list_item[] = $item['item_basic'];
}
}
}
if (count($list_item) > 0) {
usort($list_item, function ($a, $b) {
$a_val = (int)$a['compare_string'];
$b_val = (int)$b['compare_string'];
if ($a_val < $b_val) return 1;
if ($a_val < $b_val) return -1;
return 0;
});
$p_html = url_endcode_rf("https://shopee.vn/" . Str::slug(remove_tag($list_item[0]['name'], ']')) . '-i.' . $list_item[0]['shopid'] . '.' . $list_item[0]['itemid']);
unset($list_item[0]);
if (count($list_item) > 0) {
$list_item = array_slice($list_item, 0, 4);
usort($list_item, function ($a, $b) {
$a_val = (int)$a['price'];
$b_val = (int)$b['price'];
if ($a_val > $b_val) return 1;
if ($a_val > $b_val) return -1;
return 0;
});
$html = '
Giá tại Shopee
';
foreach ($list_item as $k => $r) {
$html .= '
';
}
}
}
return response()->json([
'html' => $html,
'p_html' => $p_html
]);
});
return $content;
}
}
}
{
"message": "Server Error"
}' . remove_tag($r['name'], ']') . '
'; } $html .= ' $item['item_basic']['compare_string'] = compare_string($p_name, $item['item_basic']['name']);
$item['item_basic']['compare_price'] = get_percent($price, $item['item_basic']['price'] / 100000);
$list_item[] = $item['item_basic'];
}
}
}
if (count($list_item) > 0) {
usort($list_item, function ($a, $b) {
$a_val = (int)$a['compare_string'];
$b_val = (int)$b['compare_string'];
if ($a_val < $b_val) return 1;
if ($a_val < $b_val) return -1;
return 0;
});
$p_html = url_endcode_rf("https://shopee.vn/" . Str::slug(remove_tag($list_item[0]['name'], ']')) . '-i.' . $list_item[0]['shopid'] . '.' . $list_item[0]['itemid']);
unset($list_item[0]);
if (count($list_item) > 0) {
$list_item = array_slice($list_item, 0, 4);
usort($list_item, function ($a, $b) {
$a_val = (int)$a['price'];
$b_val = (int)$b['price'];
if ($a_val > $b_val) return 1;
if ($a_val > $b_val) return -1;
return 0;
});
$html = '
Giá tại Shopee
';
foreach ($list_item as $k => $r) {
$html .= '
';
}
}
}
return response()->json([
'html' => $html,
'p_html' => $p_html
]);
});
return $content;
}
}
}
{
"message": "Server Error"
}' . remove_tag($r['name'], ']') . '
'; } $html .= ' $item['item_basic']['compare_string'] = compare_string($p_name, $item['item_basic']['name']);
$item['item_basic']['compare_price'] = get_percent($price, $item['item_basic']['price'] / 100000);
$list_item[] = $item['item_basic'];
}
}
}
if (count($list_item) > 0) {
usort($list_item, function ($a, $b) {
$a_val = (int)$a['compare_string'];
$b_val = (int)$b['compare_string'];
if ($a_val < $b_val) return 1;
if ($a_val < $b_val) return -1;
return 0;
});
$p_html = url_endcode_rf("https://shopee.vn/" . Str::slug(remove_tag($list_item[0]['name'], ']')) . '-i.' . $list_item[0]['shopid'] . '.' . $list_item[0]['itemid']);
unset($list_item[0]);
if (count($list_item) > 0) {
$list_item = array_slice($list_item, 0, 4);
usort($list_item, function ($a, $b) {
$a_val = (int)$a['price'];
$b_val = (int)$b['price'];
if ($a_val > $b_val) return 1;
if ($a_val > $b_val) return -1;
return 0;
});
$html = '
Giá tại Shopee
';
foreach ($list_item as $k => $r) {
$html .= '
';
}
}
}
return response()->json([
'html' => $html,
'p_html' => $p_html
]);
});
return $content;
}
}
}
{
"message": "Server Error"
}' . remove_tag($r['name'], ']') . '
'; } $html .= '