Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default creating new templates for CSS/PHP virgin

    I am a complete noob. I am helping my friend with his website which until now has been entirely very basic html editing. Neither of us has ever done anything with PHP or CSS except that which is automatically generated for us by programs such as dreamweaver. I've been trying to pick it up as I'm going along.

    I was trying to follow the instructions in the zen-cart.com wiki for creating a new store template... all seemed to be going well, i created a new as yet unmodified template - first thing I noticed is that all the colours changed and the logo.gif and header_bg.jpg vanished.
    I worked out where I could edit all the colours in the includes/templates/MY_TEMPLATE/css/stylesheet.css and got my custom logo.gif to appear in the header... but for the life of me, I cannot work out how, where or what to modify in order to get the background image header_bg.jpg to show up in my template. I have a background I made which I would like to display behind the logo in the same way that the classic template Zen-Cart logo does.

    Do I need to add something like...

    TABLE.header {
    background-image: url(../images/header_bg.jpg);
    background-repeat: repeat-x;
    background-color: #ffffff;
    border-right: 1px solid #9a9a9a;
    border-left: 1px solid #9a9a9a;
    border-bottom: 1px solid #9a9a9a;

    ...into my stylesheet.css file in my template's css directory? I tried pasting this into my template's stylesheet.css file but it made no difference - maybe I didn't put it into the correct place in the file??? The url path in the example above is correct for my custom header_bg.jpg - I have uploaded my image to /MY_TEMPLATE/images/ directory

    Where have I gone wrong?
    Please don't kill me.

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: creating new templates for CSS/PHP virgin

    You're on the right track, but add that style for the #logoWrapper id, rather than TABLE.header, so you have:
    Code:
    #logoWrapper {
    background-image: url(../images/header_bg.jpg);
    background-repeat: repeat-x;
    background-color: #ffffff;
    border-right: 1px solid #9a9a9a;
    border-left: 1px solid #9a9a9a;
    border-bottom: 1px solid #9a9a9a
    }
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: creating new templates for CSS/PHP virgin

    Quote Originally Posted by bunyip
    You're on the right track, but add that style for the #logoWrapper id, rather than TABLE.header, so you have:
    Code:
    #logoWrapper {
    background-image: url(../images/header_bg.jpg);
    background-repeat: repeat-x;
    background-color: #ffffff;
    border-right: 1px solid #9a9a9a;
    border-left: 1px solid #9a9a9a;
    border-bottom: 1px solid #9a9a9a
    }
    hmm... ok, I must still be doing something wrong cos it's still not showing.

    After further investigation I think I may be onto something - If I right-click the logo.gif image in firefox and get properties, it tells me the image is being loaded from /zencart/includes/templates/template_default/images/logo.gif instead of /zencart/includes/templates/MY_TEMPLATE/images/logo.gif like I thought it was.

    What is this telling me?

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

    Default Re: creating new templates for CSS/PHP virgin

    Are you sure you've activated your template in Admin? If you view the stylesheet for the page being displayed, is it your template or template_default?

  5. #5
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: creating new templates for CSS/PHP virgin

    do you have a URL for the store?

    From Admin > Tools > Template Selection, what does it show as the template directory for the current template?
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  6. #6
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: creating new templates for CSS/PHP virgin

    I see this in the Template selection page...

    http://i7.photobucket.com/albums/y26.../screencap.jpg

  7. #7
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: creating new templates for CSS/PHP virgin

    Quote Originally Posted by bunyip
    do you have a URL for the store?
    http://johngordon.com.au/zencart

  8. #8
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: creating new templates for CSS/PHP virgin

    it's entireley possible I may have cocked up somewhere during creation of the new template, fooling about with files I shouldn't be. It may be easier if I uninstall everything from the server and start again from scratch... or do you think there is a chance I can still resurrect something from this mess I've made?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: creating new templates for CSS/PHP virgin

    It seems you haven't created a folder for
    includes/templates/shop_template/images ... and stuck your image files in there
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: creating new templates for CSS/PHP virgin

    Have to agree with the Doc there - there is no file /includes/templates/shop_template/images/logo.gif
    Neville
    An assumption is what you arrive at when you get tired of thinking...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 13
    Last Post: 15 May 2015, 05:18 PM
  2. CSS 'virgin' modifying Product Category text
    By DesignbyDemeter in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 3 Aug 2006, 07:11 AM
  3. creating new templates
    By sveetcouture in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 2 Jul 2006, 02:32 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