Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show All Products in Catagory

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 06-26-2009, 10:05 AM
 
royng royng is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 85
 

Default Re: Show All Products in Catagory

I guess this is not one of the feature that X-cart can have. Try other shopping cart that might be a better chance.
__________________
X-Cart DB Version: 4.1.11 GOLD
Reply With Quote
  #52  
Old 04-14-2010, 01:50 AM
 
tacdesign tacdesign is offline
 

Newbie
  
Join Date: Jan 2010
Posts: 4
 

Default Re: Show All Products in Catagory

Has anyone managed to get the "View all products" function working on version 4.3?

Cheers
__________________
xcart v4.3.1
Reply With Quote
  #53  
Old 05-04-2010, 11:28 PM
 
cosy cosy is offline
 

Advanced Member
  
Join Date: Mar 2009
Posts: 79
 

Default Re: Show All Products in Catagory

Hi,

Anyone got it working or share the code pls?

Thanks,
__________________
Version 4.2.0
Testing v 4.4
Reply With Quote
  #54  
Old 06-07-2010, 12:22 PM
 
jlrentertainment jlrentertainment is offline
 

Newbie
  
Join Date: Mar 2010
Posts: 6
 

Default Re: Show All Products in Catagory

I got this working in 4.3.2 like this;

after init.php (approx. line 471)
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]; } }

I added (based on Westin Shafer's mod):

Code:
# # Show All Mod By Westin Shafer for Beach Bums Inc. # if ($_GET['show'] == 'all'){ $config['Appearance']['products_per_page'] = 999; } # # Show Less Mod JLR Entertainment LLC. # if ($_GET['show'] == 'less'){ $config['Appearance']['products_per_page'] = 6; } if ($_GET['show'] == '12'){ $config['Appearance']['products_per_page'] = 12; } if ($_GET['show'] == '24'){ $config['Appearance']['products_per_page'] = 24; } if ($_GET['show'] == '36'){ $config['Appearance']['products_per_page'] = 36; }

Then in customer/main/navigation.tpl I changed it to look like this (thanks to pcparts #35 entry):

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} <div id="navigation"> <ul class="navigation_pages"> <li class="NavigationTitle">{$lng.lbl_result_pages}:</li> {** 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' } <li><a href="{$navigation_script}&amp;show=all">View All</a> </li> {/if} {** End View All**} {if $current_super_page gt 1} <li><a class="larrow2" href="{$navigation_script}&amp;page={math equation="page-1" page=$start_page}" title="First Page"></a></li> {/if} {section name=page loop=$total_pages start=$start_page} {if %page.first%} {if $navigation_page gt 1} <li><a class="larrow" href="{$navigation_script}&amp;page={math equation="page-1" page=$navigation_page}" title="Previous Page"></a></li> {/if} {/if} {if %page.index% eq $navigation_page} <li class="NavigationLinkSel" title="{$lng.lbl_current_page|escape}: #{%page.index%}">{%page.index%}</li> {else} {if %page.index% ge 100} {assign var="suffix" value="Wide"} {else} {assign var="suffix" value=""} {/if} <li class="NavigationLink{$suffix}"><a href="{$navigation_script}&amp;page={%page.index%}" title="{$lng.lbl_page|escape} #{%page.index%}">{%page.index%}</a><img src="{$ImagesDir}/spacer.gif" alt="" /></li> {/if} {if %page.last%} {math equation="pages-1" pages=$total_pages assign="total_pages_minus"} {if $navigation_page lt $total_super_pages*$config.Appearance.max_nav_pages} <li><a class="rarrow" href="{$navigation_script}&amp;page={math equation="page+1" page=$navigation_page}" title="Next Page"></a></li> {/if} {/if} {/section} {if $current_super_page lt $total_super_pages} <li><a class="rarrow2"href="{$navigation_script}&amp;page={math equation="page+1" page=$total_pages_minus}" title="Last Page"></a></li> {/if} </ul> </div> {if $usertype ne "C"}<p />{/if} {else} <div id="navigation"> <ul class="navigation_pages"> <li class="NavigationTitle">{$lng.lbl_result_pages}:</li> {** View Less 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' } <li><a href="{$navigation_script}&amp;show=less">&nbsp;6 items / page&nbsp;&nbsp;|</a></li> <li><a href="{$navigation_script}&amp;show=12">&nbsp;12 items / Page&nbsp;&nbsp;|</a></li> <li><a href="{$navigation_script}&amp;show=24">&nbsp;24 items / Page&nbsp;&nbsp;|</a></li> {/if} {** End View less**} </ul> </div> {if $usertype ne "C"}<p />{/if} {/if}

It's basically #35 codes as a list (not a table) and I added an else statement that will allow the user to change page back to 6,12,24 once they are in the 'view all' state. (I wanted to add the 36 as is prepped in the init.php file but my client thought it was too many options.) I changed it to a list instead of table, so I had more leeway styling the arrows as css backgrounds with hover states. So FYI, this has to be styled with CSS and background images.

my code for that is:
Code:
#navigation { width: 100%; height: 40px; } ul.navigation_pages { clear: both; width: 100%; padding-left: 10px; text-transform: uppercase; font: bold 80% Times, "Times New Roman", Georgia, s } li.NavigationTitle, li.NavigationLinkSel { color: #ff007e; } ul.navigation_pages li a.rarrow, ul.navigation_pages li a.rarrow:visited { display: block; width: 10px; height: 15px; text-align: center; background: transparent url(images/rarrow.gif) no-repeat 0 2px; } ul.navigation_pages li a.rarrow:hover { background: transparent url(images/rarrowov.gif) no-repeat 0 2px; } ul.navigation_pages li a.larrow, ul.navigation_pages li a.larrow:visited { display: block; width: 10px; height: 15px; text-align: center; background: transparent url(images/larrow.gif) no-repeat 0 2px; } ul.navigation_pages li a.larrow:hover { background: transparent url(images/larrowov.gif) no-repeat 0 2px; } ul.navigation_pages li a.rarrow2, ul.navigation_pages li a.rarrow2:visited { display: block; width: 10px; height: 15px; text-align: center; background: transparent url(images/rarrow_2.gif) no-repeat 0 2px; } ul.navigation_pages li a.rarrow2:hover { background: transparent url(images/rarrow_2ov.gif) no-repeat 0 2px; } ul.navigation_pages li a.larrow2, ul.navigation_pages li a.larrow2:visited { display: block; width: 10px; height: 15px; margin-right: 10px; text-align: center; background: transparent url(images/larrow_2.gif) no-repeat 0 2px; } ul.navigation_pages li a.larrow2:hover { background: transparent url(images/larrow_2ov.gif) no-repeat 0 2px; } #navigation ul.navigation_pages li a { font-size: 100%; } ul.navigation_pages li { float: left; margin-right: 10px; height: 20px; }

This should be different for everyone...

Ultimately, it would be nice if the view all status could be in a dropdown menu and if the products per page could be configured from the admin side instead of being hardcoded in like that, but... I'll save that for rainier days.
__________________
X-Cart v4.3.1
Reply With Quote

The following user thanks jlrentertainment for this useful post:
hoosierglass (06-07-2010)
  #55  
Old 06-07-2010, 02:20 PM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Show All Products in Catagory

If you do not want to go with the View All in the stock navigation.tpl file add this to the the file just before the final {/strip}

Code:
{if $smarty.server.PHP_SELF ne '/manufacturers.php' && $smarty.server.PHP_SELF ne '/admin/orders.php' && $smarty.server.PHP_SELF ne '/orders.php' } &nbsp;&nbsp;&nbsp;<a href="{$navigation_script}&amp;show=all">View All</a> {/if}

This will put the "View All" three spaces to the right of the next arrow.

Result pages: 1 2 3 4 5 > View All

Dont forget the code in the init.php file from post before this post.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #56  
Old 10-22-2010, 02:50 AM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

Advanced Member
  
Join Date: Feb 2010
Location: Portugal
Posts: 38
 

Default Re: Show All Products in Catagory

Works Great thanks!!!
__________________
PHP 5.2.11
MYSQL 5.0.45

WESH UK hosting

--- Add-ons -----
X-RMA
X-AOM
X-FancyCategories
X-Feature comparison

BCSE Request a Quote
BCSE Customer Testimonials
BCSE Advanced ratings and reviews
BCSE Customer reward points
BCSE Reward points refferal
BCSE Customer polls

Cart Labs - Tabs
Reply With Quote
  #57  
Old 01-25-2011, 11:00 AM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default Re: Show All Products in Catagory

Quote:
Originally Posted by hoosierglass
If you do not want to go with the View All in the stock navigation.tpl file add this to the the file just before the final {/strip}

Code:
{if $smarty.server.PHP_SELF ne '/manufacturers.php' && $smarty.server.PHP_SELF ne '/admin/orders.php' && $smarty.server.PHP_SELF ne '/orders.php' } &nbsp;&nbsp;&nbsp;<a href="{$navigation_script}&amp;show=all">View All</a> {/if}

This will put the "View All" three spaces to the right of the next arrow.

Result pages: 1 2 3 4 5 > View All

Dont forget the code in the init.php file from post before this post.


I am a little confused... which file does the above code go? Also, I am working on 4.3.2, the init.php file has 874 lines... does the init.php code still need to be placed around line 471?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #58  
Old 01-26-2011, 07:26 AM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default Re: Show All Products in Catagory

BCSE has a free View All mod.. I downloaded it yesterday and the instructions for v4.3 installation were actually the v4.1 instructions.. I emailed them and they promptly provided me with the correct instructions. So I am not sure if they have also, since, updated the zip file for the mod or not. But it was super easy to install and works wonderfully!


http://www.bcsengineering.com/store/view-all-mod-for-x-cart.html
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote

The following user thanks ScrapOrchard for this useful post:
Phoenix Tech (10-31-2011)
  #59  
Old 06-28-2013, 02:38 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

Default Re: Show All Products in Catagory

This is great quick mod that even works with 4.5.4


Quote:
Originally Posted by ScrapOrchard
BCSE has a free View All mod.. I downloaded it yesterday and the instructions for v4.3 installation were actually the v4.1 instructions.. I emailed them and they promptly provided me with the correct instructions. So I am not sure if they have also, since, updated the zip file for the mod or not. But it was super easy to install and works wonderfully!


http://www.bcsengineering.com/store/view-all-mod-for-x-cart.html

BCSE have upgraded this freebee to 4.5.x and is very easy to install, however I took a dislike to the URLs that it creates so went with the mod described in this thread.
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:05 AM.

   

 
X-Cart forums © 2001-2020