X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Show All Products in Catagory (https://forum.x-cart.com/showthread.php?t=23796)

lachild 05-15-2007 03:47 PM

Re: Show All Products in Catagory
 
Quote:

Originally Posted by Scott DeToffol
Can someone point me to an example of this on a working site?


Sure this is working on http://www.beachbums.com

Also this should work with 4.1.6. We are currently using this on 4.1.4 and I cant imagine that the code base would have been completely altered.

funkymonkey 05-27-2007 02:45 PM

Re: Show All Products in Catagory
 
Looks like a great mod but it didn't work for me (4.0.13). The following error is generated:

Fatal error: Smarty error: [in customer/main/navigation.tpl line 6]: syntax error: unidentified token '.php'' (Smarty_Compiler.class.php, line 1372) in home/toroleat/public_html/Smarty-2.6.3/Smarty.class.php on line 1082

I don't have init.php but made the first code change in config.php as it all reads the same.

Any suggestions?

hoosierglass 06-01-2007 03:26 PM

Re: Show All Products in Catagory
 
Trying to get this to work in 4.1.7 and have yet to get anything to fly. If anyone knows this mod and would like to point me in the right direction feel free to do so.
Here is my naviagtion.tpl
Code:

{* $Id: navigation.tpl,v 1.16.2.1 2006/06/16 10:47:41 max Exp $ *}
{assign var="navigation_script" value=$navigation_script|amp}
{if $total_pages gt 2}
<table cellpadding="0">
<tr>
        <td class="NavigationTitle">{$lng.lbl_result_pages}:</td>
{if $current_super_page gt 1}
        <td><a href="{$navigation_script}&amp;page={math equation="page-1" page=$start_page}"><img src="{$ImagesDir}/larrow_2.gif" class="NavigationArrow" alt="{$lng.lbl_prev_group_pages|escape}" /></a></td>
{/if}
{section name=page loop=$total_pages start=$start_page}
{if %page.first%}
{if $navigation_page gt 1}
        <td valign="middle"><a href="{$navigation_script}&amp;page={math equation="page-1" page=$navigation_page}"><img src="{$ImagesDir}/larrow.gif" class="NavigationArrow" alt="{$lng.lbl_prev_page|escape}" /></a>&nbsp;</td>
{** View All Add on **}
{if $smarty.server.PHP_SELF ne '/manufacturers.php' && $smarty.server.PHP_SELF ne '/admin/orders.php' && $smarty.server.PHP_SELF ne '/orders.php' }
<td><a href="{$navigation_script}&amp;show=all">View All</a> |</td>
{/if}
{** End View All**}
{/if}
{/if}
{if %page.index% eq $navigation_page}
        <td class="NavigationCellSel" title="{$lng.lbl_current_page|escape}: #{%page.index%}">{%page.index%}</td>
{else}
{if %page.index% ge 100}
{assign var="suffix" value="Wide"}
{else}
{assign var="suffix" value=""}
{/if}


And my init.php
Code:

#
# Read config variables from Database
# This variables are used inside php scripts, not in smarty templates
#
$c_result = db_query("SELECT name, value, category FROM $sql_tbl[config] WHERE type != 'separator'");
$config = array();
if ($c_result) {
        while ($row = db_fetch_row($c_result)) {
                if (!empty($row[2]))
                        $config[$row[2]][$row[0]] = $row[1];
                else
                        $config[$row[0]] = $row[1];
        }
}
#
# Show All Mod By Westin Shafer for Beach Bums Inc.
#
if ($_GET['show'] == 'all'){
        $config['Appearance']['products_per_page'] = 500;
}
#
db_free_result($c_result);

$config["Sessions"]["session_length"] = $use_session_length;

#
# Include data cache functionality
#
include_once($xcart_dir."/include/data_cache.php");


Not real sure why it won't work as this is exactly as posted.

jeanne 07-08-2007 02:53 PM

Re: Show All Products in Catagory
 
When used with XCSEO (4.1.8 store) it does not work. The link that is created when you click on View All does not have the right information.

Just an FYI. I might try and figure it out, but it's probably beyond me.

Jeanne
------------
4.0.18 live
4.1.8 in development

hrothbeorht 07-13-2007 12:49 PM

Re: Show All Products in Catagory
 
I'm also very interested in getting this mod to run in 4.1.7
Perhaps I've missed something. If anyone has it working in 4.1.7 please post!
-hroth

gb2world 10-11-2007 05:25 PM

Re: Show All Products in Catagory
 
The code from post #9 works fine in 4.1.8 - thanks!

boxerbay 05-21-2008 02:59 PM

Re: Show All Products in Catagory
 
does not work for my 4.1.7 site? :(

balinor 05-21-2008 03:26 PM

Re: Show All Products in Catagory
 
It is odd...on some servers I can't get this to work...on most it is fine. Haven't been able to figure out what the common denominator is.

WhiteDoveGifts 05-29-2008 02:32 AM

Re: Show All Products in Catagory
 
Has anyone tested this mod in 4.1.10 yet?

EN4U 05-31-2008 08:07 PM

Re: Show All Products in Catagory
 
Quote:

Originally Posted by WhiteDoveGifts
Has anyone tested this mod in 4.1.10 yet?


^^^ Nice mod..... If anyone can figure this out for the newest version that would be great.


All times are GMT -8. The time now is 09:16 AM.

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