Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Feb 2010
    Posts
    140
    Plugin Contributions
    0

    Default editing front shop page

    I need to call an external script into the main page, what and where would I need to edit to to able to do this if I put the file in the root
    directory of the zen cart installation. The script only needs to appear on the front page.

    Any help would be great.
    Thanks

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

    Default Re: editing front shop page

    If to be displayed in the center of only the front page...
    paste the code in the define_main_page.php file through the admin > tools > defines page editor

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

    Default Re: editing front shop page

    thankyou that worked exactly as I needed.

    Is there anyway I can change the query the search performs
    as I do not need to search the description etc..

    I have all the products we sell in the correct tables but
    as the script I have written selects information from extra tables
    and I want it to pass an id to the search.

    Example

    my own script has select options:
    car manufacturer -> car model -> car description and year->

    This will give an id for the exact car I then intend to pass this id
    to the search so that it will pull out any products with a matching
    id

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

    Default Re: editing front shop page

    Sounds like your search issue will require a total re-write of the search function - - Way too much to be coered in a few posts here

    You can write this or can post in the commercial help wanted section

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

    Default Re: editing front shop page

    I just need to know which file contains the search function and I may be able to rewrite it myself.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: editing front shop page

    Suggest you use the template override system as one should not edit the corefiles
    Start by getting a copy of /includes/templates/template_default/sideboxes/tpl_search.php

  7. #7
    Join Date
    Feb 2010
    Posts
    140
    Plugin Contributions
    0

    Default Re: editing front shop page

    I have located that file but it has no sql in it.

    If this is basically going to be difficult or not recommended
    would it be better for me to pull the products out from my own script
    and try to add the add to cart button and quantity options to those.

    This would remove the need for me to touch the core serach files
    and I would remove the default search box from showing.

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: editing front shop page

    I have located that file but it has no sql in it.
    Others to check

    /includes/classes/db/mysql/query_factory.php
    /includes/modules/pages/advanced_search/jscript_main.php

    If this is basically going to be difficult or not recommended
    would it be better for me to pull the products out from my own script
    and try to add the add to cart button and quantity options to those.
    That would be even more difficult as ZenCart is not designed to be used in pieces

  9. #9
    Join Date
    Feb 2010
    Posts
    140
    Plugin Contributions
    0

    Default Re: editing front shop page

    I think I found the file that I may need to edit.

    /includes/modules/pages/advanced_search_result/header_php.php

    As it has all the error checking for the search form

    I will make a backup of it before I start playing around with it.
    Last edited by neit; 15 Feb 2010 at 09:31 AM.

  10. #10
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: editing front shop page

    Is there anyway I can change the query the search performs
    as I do not need to search the description etc..

    As it has all the error checking for the search form
    No sql either

    But hopeful you are on a correct track for what you want

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Editing text on front page.
    By CraftStudio in forum General Questions
    Replies: 1
    Last Post: 2 Oct 2013, 06:54 AM
  2. Editing Front Page
    By ojhernandez in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 18 Sep 2010, 10:55 PM
  3. Editing CSS on Front Page?
    By robertandenith in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 30 Jul 2010, 12:13 AM
  4. Front Page Editing
    By grandprix in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Jun 2007, 02:21 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