fix(shop): flatten widget products REST payload for ajax-list
success() already nests fields; drop extra data wrapper so normalizeJson/tab lazy-load read html/paginate_html directly.
This commit is contained in:
@@ -532,14 +532,12 @@ trait ShopControllerFrontendFlowOperations {
|
||||
$payload = \AKSRT\Widgets\WidgetProductList::query_payload($instance, $page);
|
||||
|
||||
return $this->success([
|
||||
'data' => [
|
||||
'html' => (string) ($payload['html'] ?? ''),
|
||||
'paginate_html' => (string) ($payload['paginate_html'] ?? ''),
|
||||
'has_more' => !empty($payload['has_more']),
|
||||
'page' => (int) ($payload['page'] ?? $page),
|
||||
'max_pages' => (int) ($payload['max_pages'] ?? 1),
|
||||
'total' => (int) ($payload['total'] ?? 0),
|
||||
],
|
||||
'html' => (string) ($payload['html'] ?? ''),
|
||||
'paginate_html' => (string) ($payload['paginate_html'] ?? ''),
|
||||
'has_more' => !empty($payload['has_more']),
|
||||
'page' => (int) ($payload['page'] ?? $page),
|
||||
'max_pages' => (int) ($payload['max_pages'] ?? 1),
|
||||
'total' => (int) ($payload['total'] ?? 0),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user