products = $products; $this->listTitle = $listTitle; $this->wrapperClass = $wrapperClass; $columns = Arr::get($config, 'columns', 4); $this->columns = max(1, min(6, intval($columns))); $this->hideExcerpt = Arr::get($config, 'hide_excerpt', false); if($products instanceof \FluentCart\Framework\Pagination\CursorPaginator){ $this->cursor = wp_parse_args(wp_parse_url($products->nextPageUrl(), PHP_URL_QUERY)); $this->cursor = Arr::get($this->cursor, 'cursor', ''); } } public function render() { if ( (is_array($this->products) && empty($this->products)) || ($this->products instanceof \FluentCart\Framework\Pagination\CursorPaginator && $this->products->count() === 0) ) { return ''; } $columns = $this->columns ? 'style="--fct-product-list-columns: ' . $this->columns . ';"' : ''; ?>
renderTitle(); ?>
> renderProductList(); ?>
products as $index => $product) { $config = ['hide_excerpt' => $this->hideExcerpt]; if($index == 0 && $this->cursor){ $config['cursor'] = $this->cursor; } ?>
render(); ?>
listTitle)) : ?>

listTitle); ?>