Results 1 to 10 of 20

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    149
    Plugin Contributions
    0

    Default iFrame - Forbidden error

    Hi everybody,

    I have created a custom page, which contains another zen page in its iframe:

    the fragment of the custom page:

    <iframe width="100%" scrolling="no" frameborder="0" src="includes/templates/template_default/templates/tpl_page_3_default.php" ></iframe>

    The problem is that the iframe cannot open the page and generates a forbidden error: You don't have permission to access /includes/templates/template_default/templates/tpl_page_3_default.php

    I cannot figure out what makes this restriction. Please, help

    Thanks

    Andy

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

    Default Re: iFrame - Forbidden error

    the issue is you are trying to call this outside ZC,

    why are you trying to insert zc in an iframe,
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Oct 2006
    Posts
    149
    Plugin Contributions
    0

    Default Re: iFrame - Forbidden error

    I have fixed the FORBIDDEN error by changing the .htaccess file, but still cannot figure out what is the root page file for zc to call within an iframe.

    Obviously, the iframe should contain the includes/application_top.php file

    The reason why i need iframe is simple: I have to pass POST (or GET) variables to the truncated zc product page (only the page - no sidebar and the headers). I do not see any other ways how to do this.

    What I need is to open the product category page within the iframe, while I assign the product IDs from my custom page containing the iframe.

    What is the correct way of doing this?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: iFrame - Forbidden error

    Well, Zen Cart isn't designed to operate from within an iframe.

    The root file to call for Zen Cart is /index.php

    Attempting to access any *.php file under the /includes folder directly from a browser will result in the 403-forbidden error (due to the .htaccess directives).


    You've decided that using an iframe is a solution to some particular problem you're trying to solve, or business need you're trying to meet. What is the root need/problem? Perhaps an iframe may not be the "best" solution, and perhaps we can offer some other ideas ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2006
    Posts
    149
    Plugin Contributions
    0

    Default Re: iFrame - Forbidden error

    The reason why I need the iframe structure is as follows:

    1) I need to incorporate a Google API map on my custom page, while the markers are linked to the zc products and categories

    2) when the user clicks on the "marker details" on the map, the linked product/category should open below the map

    3) I cannot redraw the map - it has to stay untill another set of markers need to be displayed

    I would appreciate, if you suggest a better solution than iframes, but so far i could not find anything else to make it work. Right now I have finished the mapping application, it opens on a custom pages with all the coorrect markers linked to products. Next, I need a link from the marker - like index.php?main_page=index&cPath=66 to open the assosiated product category below the map.

    In other words, I need the product category page to open alone without zc sideboxes and headers.

    I would appreciate your help.

    Thanks

    Andy

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: iFrame - Forbidden error

    Here's one method you could try ... keeping your existing iframe approach:

    1. set all your GM url's to have another parameter on them, such as: &dmode=inline
    ie: index.php?main_page=index&cPath=66&dmode=inline

    2. edit your custom template's tpl_main_page.php file:
    Find this section:
    Code:
    // the following IF statement can be duplicated/modified as needed to set additional flags
      if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
        $flag_disable_right = true;
      }
    Add this below it:
    Code:
      if (isset($_GET['dmode']) && $_GET['dmode'] == 'inline') {
        $flag_disable_left = true;
        $flag_disable_right = true;
        $flag_disable_header = true;
        $flag_disable_footer = true;
      }

    That'll cause only the links generated from the map to display without any header, footer, left, or right sidebox data.
    Last edited by DrByte; 5 Apr 2007 at 06:33 AM. Reason: changed from "mode" to "dmode" just in case of clashes
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Help me. Error 403. Forbidden Error
    By thelostknight in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 4 Jun 2011, 04:15 AM
  2. Forbidden error
    By CDTroyes in forum General Questions
    Replies: 2
    Last Post: 20 Feb 2011, 09:53 PM

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