Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    help question Styling sub categories display page!

    Hello Zenners,

    I'm trying to convert my old CF eCommerce site over to ZC. On my old site (http://www.nwfineartprinting.com/ind...&category_id=1) I've created a single category called "Products" with several sub categories that are actually links to information about our products (example would be "Photo Prints" or "Custom Framing"). I'm trying to style the new ZC category display similar to my old site and I'm struggling a little. Can someone tell me how to:

    1) Have a right side column that displays the sub categories for the category page I'm on (so I'd be on the "Products" category page and have a list of all the sub categories for the "Products" category displayed in that right side navigation.

    2) Have the display of all the sub categories be in a matrix format. The matrix would be in rows with 3 columns. Currently I have the sub categories displaying in groups of three, but they are all in one column.

    3) Control the size of the image that I assign to a sub Category.

    4) Control the style of the matrix being generated by Zen Cart.

    My old site: http://www.nwfineartprinting.com/ind...&category_id=1

    My new development site: http://nwfapco.com/index.php?main_page=index&cPath=65

    Warning: The new development site I've only been working on for around three hours so it's not pretty yet.

    Any help is much appreciated!

    Thanks!

    NWFAP

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Styling sub categories display page!

    1) Categories Dressing from Free Addons can give you the same display as you have on your old site. Use its "level control" to hide the top category, and CSS to style various subcategory level list item markers.

    2) Column Layout Grid from Free Addons is the tool for this. If you are using it but not getting columns ("groups of three"), you have probably changed a float: left; that affected that layout.
    Overall, you appear to have radically reshaped the core page structure, presumably for your desired styling. This will cause repercussions down the line and make it much harder for us to advise on questions; also, it is completely unnecessary to get the layout you want. That can be achieved mostly with admin controls and CSS. I would advise you to go back to the stock template files and try admin/CSS settings.

    3) Admin > Configuration > Images >
    Subcategory Image Width
    Subcategory Image Height

    4) ?Not sure what you mean here, but most styling happens in stylesheet.css. You can have special style rules that apply only in certain pages with "per-page stylesheets" (see the tutorials).

  3. #3
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: Styling sub categories display page!

    GJH42 -

    I've taken your recomendation and reinsalled my ZC and am going to start from scratch to get my site to work the way I'd like it too.

    I'd like to consolidate my navigation to be on the same level with my logo (floating right). In my "navigation" I'd like to have a single link called "Products" that will take my customers to the "Products" page.

    Next to that I'd like to have two or three EZ pages that link to different parts of my site (Resources - which is a collection of EZ pages that provide info about our company/products/services to our customers).

    Finally, I'd like to have the Home/Log in nav ONLY displaying the Log In link. I'd also like to apply the styling so the log in looks like a button.

    I know you said this can be accomplished with CSS/Admin controls. However I'm struggling on understanding how since I think I need to reorder the Div's to group the three different nav features (Cat. Top Nav., EZ Pages Top Nav. and Main Nav). I also found a post on the forum where the solution seems to change the tpl_header.php file in order to accomplish something similar.

    http://www.zen-cart.com/forum/showthread.php?t=71424

    Your advice is greatly appreciated!

    Thanks,

    NWFAP

    My old (currently CF) site: Nwfineartprinting.com

    My new (ZC - development) site: nwfapco.com

    Thanks!!!!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Styling sub categories display page!

    You might want to reorganize some parts of tpl_header.php by moving code blocks in the file. The overall page structure in tpl_main_page.php could mostly be untouched, with admin control of sidebars (left turned off). There are instructions in the comments in tpl_main_page.php for turning the right sidebar off for pages like home and about us.

    There are a couple of mods for cart in header, and possibly already one for login in header.
    The main nav could be handled entirely with the ez-pages header bar, using some "internal links".
    If pages under About Us are ez-pages, you can use the TOC for navigation in that set. If you want to include a couple of non-ez-pages in that set, the EZ-Pages Improved TOC mod can handle those; see my festival site for an example (under the Artist/Vendor link). Two of those pages are product pages, and I built static menus for them to look like the dynamic TOC.

    The trickiest part of the job will probably be handling the shift to the Professional side. It will be no problem to change color scheme and logo for these pages, though it will probably require a few conditionals in files to decide which elements to display or not. That needs more discussion before advising on the best route.

  5. #5
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: Styling sub categories display page!

    gjh -

    Thank you for that input. I'm going to tweak all that this weekend and I'll let you know how it goes.

    Actually we are changing our strategy for the Pro side of things. All we will be doing is displaying a new header when a "Pro" user logs in (they will also get a discount applied by groupings through the admin). We'd like to have some content pages (that are specifically for the Pro program) hidden unless a person logs in and is part of a customer group that is authorized to see that (essentially a regular customer wouldn't know the pages/products were even offered since they wouldn't be displayed). Do you know of an easy way to do that? for both EZ-pages and sub-categories/products in the sub-categories?

    Also - I have a custom ordering app that was written in ColdFusion (canvasapp.nwfineartprinting.com) I'd like to integrate with ZC/PHP - do you know where I can find information on passing session data back an forth between ZC and coldfusion?

    Thanks!

    NWFAP

  6. #6
    Join Date
    Dec 2011
    Posts
    20
    Plugin Contributions
    0

    Default Re: Styling sub categories display page!

    Quote Originally Posted by gjh42 View Post
    There are a couple of mods for cart in header, and possibly already one for login in header.
    The main nav could be handled entirely with the ez-pages header bar, using some "internal links".
    - We will actually be scrapping the header login and moving to a link to a login page in the header (which will actually be a button that customers click to be taken to the login page) since we will be incorporating Facebook Connect Login/Google Account OpenID login . THanks for the recommendation though - I REALLY appreciate your help!


    Quote Originally Posted by gjh42 View Post
    There are a couple of mods for cart in header, and possibly already one for login in header.
    The main nav could be handled entirely with the ez-pages header bar, using some "internal links".
    - How would this work? What do you mean internal links? I imagine you mean that I could create an EZ page called "Products" and try to put the link for the EZ page top nav for the "Products" page to the category I've called "Products" , is that what you mean? If so, how would I override the EZ page top nav default link that would link to the EZ Page rather than the Category?


    Quote Originally Posted by gjh42 View Post
    If pages under About Us are ez-pages, you can use the TOC for navigation in that set.
    -They will all be easy pages. On one of the pages I plan to run a WP blog though - do you know of any good integration for WP and ZC 1.3.9?


    If you want to include a couple of non-ez-pages in that set, the EZ-Pages Improved TOC mod can handle those; see my festival site for an example (under the Artist/Vendor link). Two of those pages are product pages, and I built static menus for them to look like the dynamic TOC.



    Quote Originally Posted by gjh42 View Post
    The trickiest part of the job will probably be handling the shift to the Professional side. It will be no problem to change color scheme and logo for these pages, though it will probably require a few conditionals in files to decide which elements to display or not. That needs more discussion before advising on the best route.
    -Since we are only going to make the Change to keep the site design exact same for PROS/NON PROS EXECPT FOR THE LOGO - how do I change it to show a Pro logo for when a pro customer is logged in (Since I will have multiple groups of "Pros" with varying discounts - and I'm also going to be using the "Invoice" module that uses customer groups to allow customers to check out and pay via invoice? I can't just have a check for one customer group)

    Thanks!

    NWFAP

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Styling sub categories display page!

    Changing output when a visitor is logged in is a very common task, handled with if ($_SESSION['customers_id']){ (or maybe 'customer_id' - don't remember which off the top of my head), which will be true if logged in and false if not. You could fetch that id value and look up whether it is in a certain customer group for Pro output purposes. Since you will likely be doing this in numerous places, you might write a function for it (put it in a new file in /includes/functions/extra_functions/pro_group.php). Then you can act based on a call like if(pro_group()){do something}.

    Integrating external code with ZC code and passing session info may be problematic from a security standpoint, but you need someone experienced in such things to advise on that. Is there something special about the existing order process that would make it hard to handle in Zen Cart?

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Styling sub categories display page!

    EZ-Pages can be either HTML pages, or links to other pages. See the tutorials for detailed info.

    You would create a page named Products, and instead of entering text you would put the relative URL in the "Internal Link" field at the bottom of the page, like index.php?main_page=index&cPath=1 (assuming the Products category has id 1). Then that link in the menu will show that as its destination, and go directly there.

    For the WP blog, there is a mod for WP on Zen, though I don't know how well it works. If that is not satisfactory, you can install WP in a subfolder and make an "external link" to it, similar to the internal links.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Styling sub categories display page!

    write a function for it (put it in a new file in /includes/functions/extra_functions/pro_group.php). Then you can act based on a call like if(pro_group()){do something}.
    A few ideas for tweaking this function:

    You could get the group id if the customer has one and it is a pro group, and return that as the function's output. If it is non-zero, it will evaluate to true, and you can also use the exact value if that would be useful in any particular case.

    If the function is used frequently, you might want to reduce db lookups for the same info. You could first check whether there is a particular constant defined, and if not, do the lookup and define the constant accordingly. If it is defined, you just pass on its value as the function's return.

 

 

Similar Threads

  1. v150 Display ALL Sub-Categories in Center of Home Page
    By Aahz in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Aug 2012, 05:00 AM
  2. Sub-categories and their Sub-categories Styling
    By imperialmusic in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Aug 2011, 05:03 AM
  3. Show sub-sub categories underneath sub-categories on the category page?
    By tomrice in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jun 2009, 03:05 AM
  4. Display Products and Sub-Categories in Top Level Category Page
    By numinix in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 27 Oct 2008, 04:04 AM
  5. Stopping the display of main page within Sub-Categories
    By rayrajan in forum Basic Configuration
    Replies: 6
    Last Post: 30 Sep 2008, 12:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg