CRE Loaded Community



Board index » CRE Loaded PCI 6.4 » CRE Loaded PCI 6.4 Support

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: How Do I Have Different Product Listing Maximums?
PostPosted: Sun Mar 21, 2010 3:45 pm 
Offline
CRE Freak

Joined: Sat Jul 11, 2009 9:21 pm
Posts: 50
I'm trying to make it so my regular category listings show 12 items per page in columns, which fits the center area nicely without going below the side column area(s), but I only want 6 items to show when people choose Shop by Price. That shows in rows, for sortability, and 12 goes way too far below the other sections.

What's the best (easiest) way to get those two sections to have different maximum display/per page numbers since they seem to share the same variable in Admin? Hardcode Shop by Price somehow?

Thanks,
Kelly :D
http://booksforallreasons.us


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 11:58 am 
Online
CRE Legend
User avatar

Joined: Fri Jan 13, 2006 1:00 am
Posts: 10881
Location: Nappanee Indiana
You are going to want to follow the logic used in your template

ie if this exists
templates/cre63_ats/includes/modules/products_listing.php
if not
includes/modules/products_listing.php
open it up
includes/languages/english/shop_by_price.php
add this to the bottom, before the
Code:
?>

Code:
define('MAX_DISPLAY_SEARCH_RESULTS_ROW', '6');

so it looks like this
Code:
define('MAX_DISPLAY_SEARCH_RESULTS_ROW', '6');
?>


Now open up
includes/modules/products_listing.php
find
Code:
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

change it to
Code:
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS_ROW, 'p.products_id');


let me know at this point if it now limits rows displaying as 6 products (although the text links may be displaying the wrong value which we will also change

_________________
Jason Miller
CRE Loaded Expert
CRE Loaded Expert Team
Home of the FIRST 100% tableless CRE Loaded template


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 8:41 pm 
Offline
CRE Freak

Joined: Sat Jul 11, 2009 9:21 pm
Posts: 50
Aha, got it!

However, one tweak is needed. If you put the code

Code:
define('MAX_DISPLAY_SEARCH_RESULTS_ROW', '6');


right before the ?> then it only shows 1 item per shop by price page. (I think my customers might think I've lost my last brain cell if they saw that.)

However, after looking at the shop_by_price code, I realized it actually needs to go before

Code:
  $content = CONTENT_SHOP_BY_PRICE;


Then it works beautifully.

Thanks as always. You've saved me hours and hours of staring at my PHP/SQL book, trying and wishing I could learn all this by osmosis, rather than my usual trial and boo-boo...
Kelly :D


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 8:49 pm 
Online
CRE Legend
User avatar

Joined: Fri Jan 13, 2006 1:00 am
Posts: 10881
Location: Nappanee Indiana
You were/are putting it in the wrong file
includes/languages/english/shop_by_price.php and the line above the ?>
it will work there.. but typically you want to keep the defines in the language file so they are less likely to be killed off on patching and/or you will recall where you need to make changes later

_________________
Jason Miller
CRE Loaded Expert
CRE Loaded Expert Team
Home of the FIRST 100% tableless CRE Loaded template


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 9:05 pm 
Offline
CRE Freak

Joined: Sat Jul 11, 2009 9:21 pm
Posts: 50
Well, what do you know? That works too. :wink: (I must have hit something funny when I tried it the first time as I couldn't find the folder/file you were talking about - probably started in the wrong subfolder to start with - and when I backtracked a few levels I saw the shop_by_price file I used and tried it there. I SOOOOO wish they wouldn't use the same file name over and over in all the various subfolders - gets confusing to see them in sooo many places.)

Thanks as always!
Kelly


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 9:17 pm 
Online
CRE Legend
User avatar

Joined: Fri Jan 13, 2006 1:00 am
Posts: 10881
Location: Nappanee Indiana
Glad it worked
the structure is such so when you want to edit text and such on a page such as shop_by_price.php
you know exactly which file to open/edit

the structure is set up as such
anything in includes/languages/
are going to be defines.. typically text
broken down further into modules
payment
shipping etc etc
so lets say you didn't like the default text that displays on the table rate shipping module

edit it at
includes/languages/english/modules/shipping/table.php

_________________
Jason Miller
CRE Loaded Expert
CRE Loaded Expert Team
Home of the FIRST 100% tableless CRE Loaded template


Top
 Profile  
 
 Post subject: Re: How Do I Have Different Product Listing Maximums?
PostPosted: Mon Mar 22, 2010 9:46 pm 
Offline
CRE Freak

Joined: Sat Jul 11, 2009 9:21 pm
Posts: 50
I would just prefer if they named them like they did with the .tpl extensions for template related files, so the text file would be something like shop_by_price_txt.php instead of shop_by_price.php. I know it's in a specific folder, but that way I'd know exactly which one I was looking at without having to constantly refer back to the whole folder tree to make sure I'm changing the right file. (That's just me - too easily confused when I've only had 4 hours sleep, which is most days, so need all the naming convention help I can get. :)

Your help is appreciated!
Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Board index » CRE Loaded PCI 6.4 » CRE Loaded PCI 6.4 Support

All times are UTC - 5 hours


Who is online

Users browsing this forum: Ask Jeeves [Bot], Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Fri Jul 30, 2010 12:00 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Credit Card with CCV
    Category: Payment Modules
    
2. CC7333_ATS
    Category: Templates
    
3. Points & Rewards PLUS!...
    Category: Add-Ons
    
4. One Page Checkout...
    Category: Fixes
    
5. Configuration Server...
    Category: Fixes
    
Show more...

Follow Us on Twitter

@likeOMGitsFEDAY we do offer a wiki and other resources at www.creloaded.org
@smellgoodslady 6.2 is old code, we are at 6.4 now. come and get the latest.
@smellgoodslady what version/release are you running?
CRE Secure in the news: Payment News Article about Hosted Payment Pages reducing PCI friction - http://is.gd/ba0CH
@smellgoodslady yes it should work for 6.2 as well. let me know of you have any issues.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy