full list page range is not included in V2?

I have just upgraded my site to V2- and noticed the “full list” page range capability that was in V1 has disappeared. I then submitted a ticket about getting that functionality back and was told I must pay a developer for it. This strikes me as a little crazy. That seems like such an important feature for any cart application. It gives the user a choice of looking at all products in a category if they have a fast connection, or control over one page at a time for slower connections. I can’t understand why CS-cart would remove such an important function from the new version, and then ask everyone who wants it to pay for it separately. That just seems wrong to me. Maybe someone in this forum can help?



I’m posting hoping that a more advanced developer than me might be able to post a fix for this. Most of the code probably exists in V1, and perhaps a few copy paste operations might bring it back. This kind of a fix would help the entire CS-cart community, as I can’t imagine why anyone would not want this type of basic functionality.



Hope someone can help,

~Chalz

Cs should be adding functionality, not taking it away. This feature is a must for stores with lots of products.

As well back manufacturer capability, not a filter!


[quote name=‘Chalz’]I have just upgraded my site to V2- and noticed the “full list” page range capability that was in V1 has disappeared. I then submitted a ticket about getting that functionality back and was told I must pay a developer for it. This strikes me as a little crazy. That seems like such an important feature for any cart application. It gives the user a choice of looking at all products in a category if they have a fast connection, or control over one page at a time for slower connections. I can’t understand why CS-cart would remove such an important function from the new version, and then ask everyone who wants it to pay for it separately. That just seems wrong to me. Maybe someone in this forum can help?



I’m posting hoping that a more advanced developer than me might be able to post a fix for this. Most of the code probably exists in V1, and perhaps a few copy paste operations might bring it back. This kind of a fix would help the entire CS-cart community, as I can’t imagine why anyone would not want this type of basic functionality.



Hope someone can help,

~Chalz[/QUOTE]

It might be a good option for a smaller shop but for a large one with large amount of products in category it is not such a good idea for every store to have this feature.



In 135 products were listed to some specific category, if products are listed in subcategory and you also want to see them in root category you would need to set a secondary category when setting up product.



In 2.0 it is enough to have a checkbox in setting so all products from subcategories would be shown in root. Clicking see full list would load all products to one page.



If a customer clicks search button with empty field and click to show result in one page how would look say 2000+ products in one page ?



Imaging if you click full list in ebay :smiley:







PS things like “full list” and “live help” kiked me out of shared hosting…

Hi,



I added the following line to my common_templates/pagination.tpl file:


Full List



The site I’m building does not use AJAX based sorting or pagination - I turned that off. So, I can’t say if it will work for cart’s with AJAX enabled pagination.

[quote name=‘johnjohn’]Hi,



I added the following line to my common_templates/pagination.tpl file:


Full List



The site I’m building does not use AJAX based sorting or pagination - I turned that off. So, I can’t say if it will work for cart’s with AJAX enabled pagination.[/QUOTE]

This one doesn’t work with AJAX pagination after load all the products.

[quote name=‘joe’]This one doesn’t work with AJAX pagination after load all the products.[/QUOTE]



It is working but it is needed to clear cache. It is not ideal solution - load of server is then very high. Some other solution?

Well it’s kind of there. When you select products. You will see Total items over on the right side. Just to the right of that you can click on that you will get a drop down menu giving you the option to display from 10 - 100.



I am sure this may be to help with the database load or something like that.

I put in that code but I get a DB error

```php Database error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘-18, 18’ at line 1 (1064)

Invalid query: SELECT SQL_CALC_FOUND_ROWS products.product_id, descr1.product as product, products.tracking, products.feature_comparison, products.zero_price_action, products.product_type, products.tax_ids, products.weight, GROUP_CONCAT(IF(products_categories.link_type = ‘M’, CONCAT(products_categories.category_id, ‘M’), products_categories.category_id)) as category_ids, min_qty, max_qty, products.qty_step, products.list_qty_count, products.is_edp, avail_since, buy_in_advance, popularity.total as popularity, products.product_code, products.amount, MIN(prices.price) as price, products.status, products.list_price, descr1.short_description, IF(descr1.short_description = ‘’, descr1.full_description, ‘’) as full_description, products_categories.position, products.is_oper, products.is_op, products.is_pbp, cscart_seo_names.name as seo_name FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = ‘EN’ LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 LEFT JOIN cscart_product_prices as prices_2 ON prices.product_id = prices_2.product_id AND prices_2.lower_limit = 1 AND prices_2.price < prices.price AND prices_2.usergroup_id IN (0, 0, 2, 1) INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = ‘’ OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(2, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND (products.usergroup_ids = ‘’ OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(2, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND cscart_categories.status IN (‘A’, ‘H’) AND products.status IN (‘A’) LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = products.product_id AND cscart_product_sales.category_id = products_categories.category_id LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = products.product_id AND cscart_seo_names.type = ‘p’ AND cscart_seo_names.dispatch = ‘’ AND cscart_seo_names.lang_code = ‘EN’ WHERE 1 AND cscart_categories.category_id IN (45) AND prices.usergroup_id IN (0, 0, 2, 1) AND prices_2.price IS NULL GROUP BY products.product_id ORDER BY prices.price asc LIMIT -18, 18 ```



I am not sure how to fix it. I tried turning AJAX off and also clearing cache, but no luck. Does anyone have any ideas?

I would also love this to be back in the cart. It is a must.



Some customers do have decent internet connections and would rather see a list of all products than trawling through page 1 of 8 for example.



Surely it is about giving the customer the option of browsing products however they feel is best?



I have tried the code in the above post (non AJAX) and I am also getting the same database error.



Has anyone managed to figure this one out?



Many thanks

The issue is also related to the load cs-cart places on the underlying server (filesystem and database). Note that servers that support almost exclusively cs-cart (like some of us stupid people who thought we could make a profit doing this) can only support a small number of active sites that utilize cs-cart on a pretty beefy server platform.



It’s the classic “push the problem somewhere else”.



If all products in a category are displayed then all images are read, all product data is retrieved from the DB and all the html has to be transmitted to the browser. It really is a waste of all resources all the way around.

Has anyone figured out a fix for the View All button? I came up with this:


View All



I just chose a really large number since my site has less than 200 products in each category.



This works, however, for some reason the site remembers the 200 on all the pages. So even if you go to another category, you will still see all products instead of the number set in the Admin section.

items_per_page is stored in the session. The thinking is that the user will want to see the same number of products on the pages they view.

Thanks, that makes sense. Do you know of any other variable I can use that would work?

Not without custom modification.



A quick look indicates that “items_per_page” is used in fn.common.php in the function ‘fn_paginate’. My guess is that this is used pretty much globally for pagenation so you can probably do the adjustements there.



Remember also that each of these AJAX requests spawns an entirely separate instance of the cart on your server and that if not done correctly will cause huge performance/cache issues when robots walk your site. I.e. if you have 1000 pages, you’ll probably end up doing the work of reading 3000 pages for every robot that walks your site.



AJAX should be used ONLY when a user initiates an action (clicks a link, changes a drop-down, etc.), NEVER automatically to set some value or reconstruct the layout like setting “items_per_page”.



My two cents after spending hours looking at server performance issues, cache corruption, etc…

Thanks for your input tbirnseth!

If done properly AJAX should save resources. It doesn’t have to transfer an entire page of data, only the central content. If it wasn’t ajax, going to the next page would take an entire page load. An AJAX call or a page refresh both need a php/apache thread. But the AJAX call transfers less data so saves bandwidth.



The problem is when AJAX starts doing lots of little requests on a page that wouldn’t necessarily require a page load if it can be accomplished in a simpler manner.

We just upgraded a store from 1.3.5 to 2.0.15, and the store administrator immediately noticed that the “view all” option was gone. Still no fix without paying CS-Cart for custom modifications?

I have some code that I used last September, but I can’t remember where I found it. If anyone recognizes it, let me know. I need to fix the search results page to make the “View All” link work correctly.



In /controllers/customer/categories.php, add this:

```php if($params[‘page’]==‘9999’){

$view->assign(‘all_page’, ‘Y’);

} ```Around line 82 after this:

```php $view->assign(‘category_data’, $category_data); ```In /core/fn.catalog.php, change this line:

```php if (!empty($items_per_page)) { ```To this around line 3175:

```php if (!empty($items_per_page) && $params[‘page’]!=‘9999’) { ```In skins/basic/customer/common_templates/pagination.tpl, change this:

```php {if $pagination.prev_range}



{/if}



{foreach from=$pagination.navi_pages item=“pg”}

{if $pg != $pagination.current_page}

{$pg}

{else}

{$pg}

{/if}

{/foreach}

```To this:

```php {assign var=“all” value=“9999”}

{if $pagination.prev_range}



{/if}



{foreach from=$pagination.navi_pages item=“pg”}

{if $pg != $pagination.current_page || $all_page}

{$pg}

{elseif !$all_page}

{$pg}

{/if}

{/foreach}



| {if !$all_page}

{$lang.view_all}

{else}

{$lang.view_all}

{/if} ```

This code isn't working with 2.2.3. Anyone know of a way to view all products in a category without setting the products per page really high?