Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2007
    Posts
    6
    Plugin Contributions
    0

    help question Override Question

    First of all, hello, first post. I have been using Zen Cart for almost a week now, after not being able to find decent ecommerce software for drupal (which i've used a few times). So I'm not a complete newbie to php based content management systems, but I am fairly new to Zen Cart.

    Anyway, I have been making modifications to the default template, and understand the override system. But some of the changes I make are to 'system' files that don't have a "classic" directory in them. Is there a way to safely override these files, or will I have to make the changes again when I upgrade ZC?

    EDIT: Example of something I changed: I removed the [more] that follows the link in the sidebox header for featured products. Aso, I removed the <label> tag from around the search's sidebox header, which was causing it to have larger margins than other sidebox headers. Ooh that reminds me: anyone know how to get rid of the blank line above the sidebox search's input field? I looked in search.php but couldn't figure it out. Still not too comfortable with php.

    Also, here's the site I'm working on: http://crtiv.com/wpcart

    I am working on it locally then uploading to the server every so often. So far I've removed the tables from the header, I plan on converting the whole site over to divs. I'm working from the default template, but incorporating some things from future zen. Let me know what you guys think, criticism is more than welcome
    Last edited by chipt4; 30 Nov 2007 at 08:56 AM.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Override Question

    You're certainly heading in the right direction by removing that label tags. It shouldn't really be there.

    Your comment about replacing tables in the header with divs is a bit more puzzling though. There aren't any tables in the header of either default Zen Cart or the Future Zen template, and the place that you have put the divs isn't really allowed (you're putting block element DIVs into inline LIs) and is creating validation errors on your site.

    The search box error is quite subtle and arises because your search box form overflows the space available to it and so drops by a line. Adding the following to your stylesheet will hopefully resolve this, though I haven't tested it
    #searchContent form {margin:0}
    It's not clear what you mean by "system" files. Most of the files that you would want to over-ride on the catalog side of the site can be over-ridden, though there are a few exceptions such as page modules and classes.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Override Question

    If you are changing files where there is no /classic/ folder, your changes will be overwritten with the next upgrade/update. To keep track of your changes, create a custom folder anyway and copy your changed files to it. They won't be used by Zen Cart, but they won't be overwritten by an update/upgrade either, so you can use them to copy your modifications to the new versions (which you should then copy into the folder so you always have the latest version of the file WITH your modifications).

    To create a very basic custom template (you can build from there), you need:
    • includes/languages/YOUR_TEMPLATE/english.php
    • includes/languages/english/YOUR_TEMPLATE/index.php
    • includes/languages/english/YOUR_TEMPLATE/meta_tags.php
    • includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo)
    • includes/templates/YOUR_TEMPLATE/template_info.php
    • includes/templates/YOUR_TEMPLATE/common/tpl_header.php
    • includes/templates/YOUR_TEMPLATE/common/tpl_footer.php
    • includes/templates/YOUR_TEMPLATE/images/logo.gif
    • includes/templates/YOUR_TEMPLATE/css/stylesheet.css


    Anywhere you see a /classic/ folder, you can create a folder for your custom template. You can copy the necessary files from either the /classic/ folder, the /template_default/ folder or the parent folder.

    Edit includes/templates/YOUR_TEMPLATE/template_info.php to give your template identifying information so you'll recognize it in the admin under tools->template selection.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  4. #4
    Join Date
    Nov 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Override Question

    Awesome, that did the trick (the search margin). Thanks

    I don't know what I was thinking of about the removing of tables. Long night

    About the divs inside the li.. I thought it was ok, as long as the li was set to display: block? How else do I get the link to fill the entire nav bar (instead of the link being only the text)? I tried setting a to block & entering dimensions that would fill up the box, which worked, but then my text sat near the top & padding wouldn't adjust it. How can I accomplish this but make it validate?

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Override Question

    Go back to setting the a tags to display:block, but use line-height instead of height
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Override Question

    Quote Originally Posted by kuroi View Post
    You're certainly heading in the right direction by removing that label tags. It shouldn't really be there.
    It's a shame you feel that way and support others to remove them as well.

    It's nice to see default Accessibility coding for such as the Blind already included within Zen Cart and we can expect more in future releases. To remove Accessibility coding and/or not use it all, can only mean losing potential buyers.

  7. #7
    Join Date
    Nov 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Override Question

    OOH I never thought of that. Line-height! (a lightbulb just flickered on above my head)

    It's a shame you feel that way and support others to remove them as well.
    While I agree that accessibility is important, the tag wasn't properly implemented. The search header was the only one (that i've found so far; i haven't used all the sideboxes) that had the <label> tag. If ALL the sidebox headers were wrapped in a <label>, then the offsets would match and I could live with it.

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Override Question

    Quote Originally Posted by Website Rob View Post
    It's a shame you feel that way and support others to remove them as well.

    It's nice to see default Accessibility coding for such as the Blind already included within Zen Cart and we can expect more in future releases. To remove Accessibility coding and/or not use it all, can only mean losing potential buyers.
    Website Rob

    I understand where you're coming from, but these label tags aren't properly implemented. They neither wrap around a control element allowing it to be toggled by clicking on the label. Nor do they carry carry the "for" attribute to link them to an input field. So their accessibility value is close to zero and may even be negative due to the confusion that could be caused by label tags with not explicit linkage to anything.

    However, if you were to argue that a better approach would be to add "for" attributes and deal with the visual issues by setting their font-size to 1em (instead of 1.1em), I would probably agree, though with a small lingering doubt about the advisability of nesting label tags inside headers.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Override Question

    Although true that some Accessibility coding could be done better, it is a start; which is more than most other Open Source / eCommerce scripts are providing.

    Glad we're on the same page though and recommend every Coder brush up on their Accessibility coding. Situations like Target being sued on behalf of the Blind and the USA already requiring Government sites to meet Section 508 Standards, I think much work is available on the horizon -- for those Coders that are ready.

 

 

Similar Threads

  1. override question
    By Trees2wood in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Feb 2015, 09:43 PM
  2. override question
    By OrcaSoul in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Feb 2011, 06:40 AM
  3. modules override question
    By RobWUK in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 May 2009, 04:03 PM
  4. Override Question
    By cypack in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Dec 2006, 09:25 PM

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