X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add "View All" to "Products Per Page" Dropdown (https://forum.x-cart.com/showthread.php?t=61368)

ADDISON 04-09-2012 05:12 AM

Re: Add "View All" to "Products Per Page" Dropdown
 
you can do a query for the total number of products in you X-cart db. then you can replace 2000 as value with a real one, to prevent any trouble in your website.

I agree this should be included by default in X-Cart, but QT prefers to get 30 dollars for this as an extra.

ADDISON 06-10-2012 06:57 AM

Re: Add "View All" to "Products Per Page" Dropdown
 
Instead of using a fixed value like 2000 for View All (think about the number of fake iterations) you already have all products in a category stored inside of array. Just use count function for that array to get the number of products.

I did not investigate the code, but in my option the total number of product in a category is available by default. Based on this number the pagination is created. If not you can create it inside your php and assign it as $view_all variable.

ADDISON 06-27-2013 12:23 PM

Re: Add "View All" to "Products Per Page" Dropdown
 
You can use this resource as an improvement:

http://forum.x-cart.com/showthread.php?t=65754


All times are GMT -8. The time now is 12:32 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.