Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2008
    Posts
    220
    Plugin Contributions
    0

    Default Simpe question about overriding

    Hi everyone.

    I am new to zen. So please be gentle

    Today i noticed that i have to follow the override rules and ive been reading all articles about it the whole day. Now i need some help.

    But this is my description and question. Please correct me if i am wrong (or right) ;)

    Lets say i want to change some text in "define_main_page.php".

    this file in my directory is located in both includes/languages/norwegian/html_includes/define_main_page.php
    and
    includes/languages/norwegian/html includes/classic

    the last path i mentioned is the file i must NOT change.

    However. If i want to change some text in "define_main_page.php", this is what i do, described in details:

    1."making a folder in "html_includes", for example "myFiles". The path is now: "html_includes/myFiles".

    2. I copy the file "define_main_page.php" from "includes/languages/norwegian/html_includes/define_main_page.php" to "html_includes/myFiles".

    3. I edit the text ("define_main_page.php" in "html_includes/myFiles")

    4. I upload the folder with the file up to my server.

    Ok..and now my question.

    Is there any settings i have to do in admin? Because in "Define pages editor" it points to my file under Norwegian folder and not to "myFiles" folder. So the change will not be available in admin.

    I am just confused over this. May be i have misunderstood something.

    Hope someone can clear this up.

    Thanks

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Simpe question about overriding

    have you created a new template? and have you turned it on in the zc admin under tools

    and the correct path for your new file would be

    includes/languages/norwegian/html_includes/{{your template name}}/define_main_page.php
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Sep 2008
    Posts
    220
    Plugin Contributions
    0

    Default Re: Simpe question about overriding

    Quote Originally Posted by Merlinpa1969 View Post
    have you created a new template? and have you turned it on in the zc admin under tools

    and the correct path for your new file would be

    includes/languages/norwegian/html_includes/{{your template name}}/define_main_page.php
    Thanks for answering.

    Yes i have created my own template, and it is turned on. The template i created is under includes/templates/mytemplate and not under the path you wrote..

    hmm

  4. #4
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Simpe question about overriding

    the language file is what I was refering to,
    Zen cart PCI compliant Hosting

  5. #5
    Join Date
    Sep 2008
    Posts
    220
    Plugin Contributions
    0

    Default Re: Simpe question about overriding

    Quote Originally Posted by Merlinpa1969 View Post
    the language file is what I was refering to,
    Hmm, i dont know if i understand you right.

    But what i did now is to have exactly same name on the folder ("myFiles") so that it looks like:

    /languages/norwegian/html_includes/myFiles/define_main_page.php

    and in: includes/templates/myFiles. Inside this path i have my sites.

    And now it works. Is this the right way?

    If so, does this mean that everywhere i want to edit, which has a "classic" folder, i have to make a folder with the name "myFiles" at the same category level? Under the condition that i use the same template.

  6. #6
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Simpe question about overriding

    Yes, you got it
    Zen cart PCI compliant Hosting

 

 

Similar Threads

  1. v150 Question about Attributes
    By dwsmithab in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2012, 07:27 AM
  2. Replies: 0
    Last Post: 23 Feb 2010, 08:47 AM
  3. remove search button and change to simpe text
    By GraniteMan44 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Feb 2008, 10:19 PM
  4. question about PP
    By thecatinthetree in forum PayPal Express Checkout support
    Replies: 3
    Last Post: 6 Jun 2007, 07:13 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR