Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2010
    Posts
    28
    Plugin Contributions
    0

    Default editing index.php

    latest version zencart. 1.3.8

    I'm new at code, and made an error while editing the index.php.

    The page shows blank, when i click from the admin area to the shop, the link is below, though if you place a 1 after the equal sign, it will open the site, and one can read the home page is missing.

    http://www.vitalichealth.com/index.php?main_page=

    http://www.vitalichealth.com/index.php?main_page=1 it takes you in the site.

    I think it maybe just a sintax error, that stops the home page showing,

    The error is in this part of the code:

    define('TEXT_MAIN','Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.');
    }
    english when no template defined file exists. It is located in: <strong>/includes/languages/english/index.php</strong>');

    *Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
    define('HEADING_TITLE', 'VITALIC Singapore for all drinking vinegar beverages');
    } elseif ($category_depth == 'nested') {


    I have only changed these two parts of the text. and one part in the header which i changed back to normal.

    added defines for header alt and text
    define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
    define('HEADER_SALES_TEXT', 'TagLine Here');
    define('HEADER_LOGO_WIDTH', '192px');
    define('HEADER_LOGO_HEIGHT', '64px');
    define('HEADER_LOGO_IMAGE', 'logo.gif');


    It appears the link to the home page is missing or probably more like a syntax error, in the top text.

    Searched FAQ but no luck!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: editing index.php

    Can't tell what you changed???
    Post file name & original tex then what you changed it to

    Use the code tag <>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: editing index.php

    Quote Originally Posted by kobra View Post
    Can't tell what you changed???
    Post file name & original tex then what you changed it to

    Use the code tag <>
    Apologies before i explain I'm not a coder, I have only altered this define text, I deleted the "congradualtions string of text and i believe i deleted something more just before it reads english when no template defined file exisits.

    I have the classic template and I am just feeling my way around the zen cart

    define('TEXT_MAIN',<'Congratulations! You have successfully installed your Zen Cart&trade; E-Commerce Solution.');
    }
    english when no template defined file exists.> It is located in: <strong>/includes/languages/english/index.php</strong>');


    Hope you understand, I think there may have been some code before the english when no template. because the default classic file exist, it just looks odd that there is a character alone after ');

    I don't have the original text, if i did, I could solve the problem, the cart is on my server, it came with my control panel, and i haven't yet downloaded it to my computer....my intention was just to add some text, where the text was, though i deleted too much i guess.

    I guess this is how one learns the hard way!
    Last edited by ksl1; 8 Feb 2010 at 08:40 AM.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: editing index.php

    Like most of us, you learn the rules the hard way...

    Always have a BACKUP of a file, before you edit it.

    Most important thing for you to do now, is download a full fileset of the software. go to zencart home page and click download link. You will want version 1.3.8a.

    Then... REPLACE the includes/languages/english/index.php file on your server with an original copy from the software you just downloaded.

    Then..., try your edit again.

    DEFINE STATEMENTS must be edited very carefully. You remove only the variable. Leave the single quotes intact.

    PHP Code:
      define('HEADING_TITLE''Congratulations! You have successfully installed your Zen Cart&trade; E-Commerce Solution.'); 
    PHP Code:
      define('HEADING_TITLE'''); 
    20 years a Zencart User

  5. #5
    Join Date
    Feb 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: editing index.php

    Thank you very much! I managed to correct it, by checking the code on my other website, it was the text error, i guessed i had deleted to much text, which i had, because i just cut and pasted the part below, which i suspected was to blame. The words missing was "This is the main define statement for the page for" english

    define('TEXT_MAIN','This is the main define statement for the page for english when no template defined file exists. It is located in: <strong>/includes/languages/english/index.php</strong>');

    Up and running again, thanks!

 

 

Similar Threads

  1. index.php editing
    By DC Offroad in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 26 Oct 2012, 02:13 AM
  2. Replies: 2
    Last Post: 25 Sep 2011, 12:18 PM
  3. Editing index.php
    By taichifu in forum General Questions
    Replies: 6
    Last Post: 24 Jan 2011, 10:39 PM
  4. Error when editing index.php
    By gotalkaboutit in forum Basic Configuration
    Replies: 2
    Last Post: 6 Aug 2007, 04:07 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