Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2008
    Posts
    25
    Plugin Contributions
    0

    Default Define page status and sql database

    I've edited and created all the files required to add a new page to my website and define page editor. Everything works, I can go to it and edit it...

    But it does not show in site map, it does not show in define page status, and I'm lead to believe that is because it is not on the SQL Database.




    There are SQL patches I can install... Is that what I need to do?

    Why are EZ pages not added into Sitemap?

    Chris

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

    Default Re: Define page status and sql database

    There are SQL patches I can install... Is that what I need to do?
    I have done this without sql as this is file based but others have applied a sql insert for this search this site for other posts

    Why are EZ pages not added into Sitemap?
    This is not automatic and is in a file that you can edit
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    "I have done this without SQL as this is file based but others have applied a sql insert for this"

    If you mean that you have added the new page you created into the "Define Page Status" (in Admin section), in the Site Map, and in your "Information" side box..

    Can you please tell me how, or link to a thread/"how to"

    ----

    I think a lot of people once they get passed duplicating pages, creating new ones or using other methods are still getting lost as to why they're unable to see those new pages on their site or in the Define Page Status area.

    ----

    As for EZ pages not being in the site map, thats fine. But I don't want to add or edit files EVERY time I create a new page or product. At that rate, I'd spend more time editing my site map than I would anything else.

    I think having a more suitable way for newbs (ME lol..) to create pages that will integrate with Zen Carts "Define" status would be a Godsend

    Hope I'm not bugging you too much,

    Chris



    EDIT: 7:14

    I forgot to mention, I used the "Define Page Generator" to create my new page and uploaded the creation into the appropriate folders on the web server. Like many have said in posts, the generator is just a small tool that creates the pages and directories on your local machine. For anyone reading, if you have a windows based machine, its a wonderful program.

    The only problem I'm noticing is that once you've created the pages and uploaded them to your remote server (Web server), there is nothing to connect those new pages to the rest of your site..... So they wont show up in "define page status" (Admin panel) or your site map/side boxes.
    Last edited by ChristopherDoiron; 1 Feb 2008 at 01:17 AM. Reason: Forgot something I wanted to say

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

    Default Re: Define page status and sql database

    I would attempt to follow the instructions in the about us module and this can be a bit daunting if you do not first understand the override system and Zen Cart in general but this is the "holy grail" as a guide fo what is required.

    Of note is the sequence that files are parsed - first a file in the core dir is sought - then an override is looked for and used if found.

    I state the above because unless this has changed, you need to place a file like about_us in the core dir and then one in your template override so that Zen knows to look for an override file of the same name and this is not fully clear in the instructions.

    There are about 8 files/edits required to make this function in all locations - keep good records of what you do and what you un-do and you will soon have your own guide for this.

    An alternative is to make all of these using the DB based ezpages versus the file based defines pages
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2006
    Posts
    213
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    Here is the SQL code which will insert the setting for the defined page into the admin configuration table:
    INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
    VALUES ('Define Page Name', 'DEFINE_PAGE_NAME_STATUS', '1', 'Enable the Defined Page_Name Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
    You need to replace the "Page Name", "PAGE_NAME" and "Page_Name" with the name of the page being generated.

    The SQL query should be pasted into phpMyAdmin or in the SQL Install tool in the ZenCart Admin panel (especially if you are using table prefixes in your database).

    I generated about 8 pages using the Define Pages Generator and then combined all the SQL in to a single statement. Just add the VALUES lines (the part in parentheses), separated by a comma and don't forget the ':' at the end.

    Hope this helps.

  6. #6
    Join Date
    Jul 2006
    Posts
    213
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    Chris,
    Just some followup thoughts on my last post.
    The SQL insert statement will put the Define Page into the Admin Configuration panel under "Define Page Status" so you can turn the links on and off.
    But to get the link in the side box menus, you need to add the DEFINE lines to includes/modules/sideboxes/YOUR_TEMPLATE/information.php for the Information box or to includes/modules/sideboxes/YOUR_TEMPLATE/more_information.php for the More Information box. The lines are
    if (DEFINE_CONDITIONS_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';

    }
    and you replace "CONDITIONS" with the name of your page (in CAPS).
    If you are like me and you like to name your files in lower case (a UNIX habit), but you want some other text in the NavBar, Title on the page and/or side box menu, you can change this in :
    includes/languages/english/YOUR_TEMPLATE/filename.php for the NavBar and page Title and in
    includes/languages/english/extra_definitions/YOUR_TEMPLATE/filename.php for the sideboxes.

  7. #7
    Join Date
    Feb 2005
    Posts
    6
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    Thank you both for putting this info in... I've been searching for what seems like hours for this relatively simple part!

    I'm not much of a programmer so just needed to be pushed in the right direction!!

    THANK YOU

    Kristan

  8. #8
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    Quote Originally Posted by mauryg View Post
    INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
    VALUES ('Define Page Name', 'DEFINE_PAGE_NAME_STATUS', '1', 'Enable the Defined Page_Name Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
    Didn't work for me until I changed the table name from configuration to zen_configuration. Maybe new in 1.3.8?

  9. #9
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Define page status and sql database

    Ignore my previous post.

    Even though the file is called zen_configuration, if you run the sql from within the zen cart admin, it appends zen to the front and the sql works fine.

    I must have run the sql from within cpanel, in which case the sql has to have the table name of zen_configuration.

 

 

Similar Threads

  1. Define Page Status
    By irisesweb in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 13 Nov 2012, 07:14 PM
  2. Remove Define Page x from Define Page Status
    By krazykev in forum Basic Configuration
    Replies: 1
    Last Post: 15 Feb 2009, 08:33 PM
  3. about us and define page status
    By imaginarynumber in forum Customization from the Admin
    Replies: 3
    Last Post: 19 Jan 2009, 11:44 PM
  4. Define Page Status
    By ash.whitehair in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 17 Jan 2008, 09:36 PM
  5. duplicated 'define page 2' and define page status not appearing
    By twitchtoo in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 7 May 2007, 06:03 AM

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