Page 3 of 37 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 361
  1. #21
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Easy embed template

    Created a generic.html file. Add the embed tags
    unzipped the ############## embedded template and edited the 1 line to point to my generic.html file
    Used the ZenCart admin to install the ############## template.
    Now I navigate to the homepage and see that the stuff from the Generic.html is being used as a warapper. VERY cool!
    Did all that and get the following message at top of cart
    Warning: filesize(): Stat failed for http://localhost/generic.html (errno=2 - No such file or directory) in C:\sokkit\site\zen13\includes\templates\sangembed\common\embed_config.php on line 15
    Did I miss something out?

  2. #22
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Easy embed template

    I got the same thing. What you have to do is figure out where your PHP root directory is. It goes from there. For example, my generic template path that I put in the php file was something like:

    ../../../../htdocs/storename/store/generic/generic.html

    where the ../ backed me up 1 directory. The php root directory turned out to be something like

    xampp/php/bin/php or something like that (I can't remember).

    Look for the file php.ini.

    For example lets say that your generic.html file is located in

    /mysite/store/includes/templates/generic/gerneric.html
    and lets say the php.ini file is located in
    /mysite/store/php4/bin/php/

    OK, now the script (rather the embed_config.php file) needs to know the path from the PHP root directory.

    Look at the embed_config.php file where it says MY_TEMPALTE (it's supposed to say MY_TEMPLATE but there is a typo). You'll see that it is in single quotes. Within those quotes is where you need to put the path FROM the php root directory TO the generic.html file

    OK, so php.ini is in the /php/ directory. We start off with a

    ../

    that moves us from /mysite/store/php4/bin/php/ to /mysite/store/php4/bin/

    OK, now we add one more ../ so it looks like

    ../../

    that moves us from /mysite/store/php4/bin/ to /mysite/store/php4/

    Now we add another & get

    ../../../

    that moves us from /mysite/store/php4/ to /mysite/store/

    OK, now store is a common directory for both files, so instead of backing out of the php directory like we did by using "../" we can now move forward.

    we have

    ../../../

    and that puts us in /store/

    Now the generic.html file is located in

    /mysite/store/includes/templates/generic/gerneric.html

    We are already in the store directory, so now we just need to add the rest of the path, which is includes/templates/generic/generic.html (remember we are pointing to the html file so that's what we need).

    add the two together and you get

    ../../../includes/templates/generic/gerneric.html

    Now, put that between the single quotes in the embed_config.php file. Save the file. Go into your ZenCart Template stuff and click on edit and then update. Refresh your page.

    Now those errors should be gone.

    Brain21

  3. #23
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Easy embed template

    Now those errors should be gone.
    Thanks brain21.. sorted..after your excellent explanation..

  4. #24
    Join Date
    May 2005
    Location
    Western MA, USA
    Posts
    604
    Plugin Contributions
    6

    Default Re: Easy embed template

    To every one sorry about the delayed response. Developing web sites and hosting is my full time job. and when I am spending time answering questions, does some times fall to the side, when a bill needs to get payed.
    as for your questions I will do my best to answerer them although there are are quite a few. Brian since you have become help full to others I will be helpful to you first.
    Quote Originally Posted by brain21
    ...OK, now what files got edited? IOW, how is this working?...
    ...So what file got changed and where?...
    Brain21
    No files was permanently changed. what this program does is on the fly:
    • reads the template file it pointed to and put in in to memory as a var.
    • It first scans the template variable, and looks for redundant parts that the zen cart already has (like doc type)
    • it then goes through and looks for links ands images located in the same directory or child directory's (./) and makes it look one directory back (../)
    • then it looks for other patterns, like <head> tags <body> tags and the EMBED comments and splits up the directories in to a number of variables.
    • in the tpl_main_page.php file thees variables are echoed in the right places.

    this is all done using what are known as Regular expressions
    if you wanted to use the sang embed file else where, on different Php written programs you can. I have used it on both Gallery2 and Phourm. you just have to include the sang embed at the top of the template and echo you vars. (Note this can be trick in various template engines like Smarty. I don not plan of providing my support for this.)

    As for styles, the CSS that I have modified w/ this template file comes w/ a few things pre set. the main template banner is set to not show up. Some of the other tags (like <a>) that have been changed over all been deleted, so that you main style sheet will be more able to control the ZC. you will still need to tweak this to make it perfect.

    Quote Originally Posted by brain21
    How would I say, create a product_info.php page
    the old fashioned (zen) way.
    you will make a copy of the template_default/templates/tpl_product_info.php, to sang_embed/templates/ and mod ify it manually.
    this program dose very little for the inside of the zen cart.
    but it does a lot for the out side. it still takes me about 4-5 hours all together to tweak the styles sheet and all the internal mods.
    JOsh
    PS there is more to come but I got to get to work.

  5. #25
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Easy embed template

    Some weirdness:

    My page is basically organized like so:

    <head>run scripts & stuff</head>
    <body>

    Here is the top navigation part of the page, backgrounds, etc.

    <!--Start embed -->
    ZenCart stuff goes here
    <!-- end embed -->

    Here is the footer stuff, i.e. my nav links at the bottom of the page.
    </body>

    After loading up the ############## template I see the page as described above with the following exception:

    <body>
    footer stuff
    top nav stuff
    <!-- embed -->
    zencart stuff
    <!-- end embed -->
    footer stuff
    </body>


    So why is my fo0ter stuff appearing at the top of the page as well?

    It may be worth noting that basically the entire body of the page is in a centered table to keep the contents in the center of the page. I looks like the "extra" footer stuff is being place BETWEEN the initial <body> tag and the initial opening <table> tag.

    Weird.

    Thanks,

    Brain21

  6. #26
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Easy embed template

    The only problem I still have is also with footer.. certain links are placed
    on top of other links, and in incorrect order to normal zencart 1.3* template

  7. #27
    Join Date
    May 2005
    Location
    Western MA, USA
    Posts
    604
    Plugin Contributions
    6

    Default Re: Easy embed template

    Quote Originally Posted by misty
    The only problem I still have is also with footer.. certain links are placed
    on top of other links, and in incorrect order to normal zencart 1.3* template
    can you give me a link so that I can look at the problem?

  8. #28
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Easy embed template

    can you give me a link so that I can look at the problem?
    Currently on localhost, would a screenshot suffice or your wish to view source
    code?

  9. #29
    Join Date
    May 2005
    Location
    Western MA, USA
    Posts
    604
    Plugin Contributions
    6

    Default Re: Easy embed template

    Quote Originally Posted by misty
    Currently on localhost, would a screenshot suffice or your wish to view source
    code?
    a little of both actuly
    could youmake a zip for me?
    JOsh

  10. #30
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Easy embed template

    a little of both actuly
    could youmake a zip for me?
    JOsh
    Late here in UK, tomorrow will add to test site and send you
    url via pm.. further testing earlier this evening reveals works
    very well viewed in Internet Explorer, but not via Firefox.
    Now must get some

    before attempting to work out tomorrow, path to php
    on paid linux server

 

 
Page 3 of 37 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Embed php template within another php template based on drop-down menu selection?
    By mcqueeneycoins in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Jan 2012, 06:44 PM
  2. Embed cart button to old site is easy! if no atributes
    By medragon in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 9 Jun 2009, 06:21 AM
  3. How easy is it to install a zen-cart template?
    By ssbeats in forum Addon Templates
    Replies: 1
    Last Post: 22 Nov 2007, 09:43 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