Jump to content

capitalinz

Members
  • Content count

    3
  • Joined

  • Last visited

Posts posted by capitalinz


  1. Okay.

    I did a clean install of oscommerce-2.2ms2.zip

     

    I downloaded the file called "Simple Template System (STS) v2.01"

    I copied all of the files extracted from it to the includes directory.

     

    I then followed the directions from the file that is supposed to help you fix the click to enlarge bug in sts.

     

    What am I doing wrong? Everything works fine but one thing.

    When I click on the thumbnail to enlarge the images it comes up to a page but not the image.

    Any help would be appreciated. I've been trying to figure this out for a week. I'm missing something.

     

    Thanks.

    Dave.

    6/10/05

    How to use pop up or click to enlarge with the product_info.php.html file

     

    ***Special thanks to the STS man himself Brian Gallagher for his help with this,

    ***Couldn't have done it without him.

    STEP ONE

     

    In sts_product_info.php

     

    change this below:

     

    // Start the "Add to Cart" form

    $template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));

    // Add the hidden form variable for the Product_ID

    $template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);

    $template['endform'] = "</form>";

    To this:

     

    // Start the "Add to Cart" form

    $template['productid'] = $product_info['products_id'];

    $template['productsid'] = $product_info['products_id']; // Just for consistende with osC names

    $template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));

    // Add the hidden form variable for the Product_ID

    $template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);

    $template['endform'] = "</form>";

    STEP TWO

    In your product_info.php.html file (which should be in your "sts_templates" folder)

    My "click to enlarge" link worked with this below added between the <head> and </head> section:

     

    <script language="JavaScript" type="text/JavaScript">

    <!--

     

    function MM_callJS(jsStr) { //v2.0

      return eval(jsStr)

    }

    //-->

    </script>

    <noscript>

    STEP THREE

    Then elsewhere in the body of product_info.php.html for the actually link,

    I inserted the code below. 

     

    <script language="javascript"><!--

    function popupWindow(url) {

    url = url + '<?php echo $products_id ?>'

    window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

    izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

    ft=150')

    }

     

    //--></script>

     

    <a href="java script:void(0)" onClick="MM_callJS('popupWindow(\'popup_image.php?pID=$productid\')')">                       

    $imagesmall</a><a href="java script:void(0)" onClick="MM_callJS('popupWindow(\'popup_image.php?pID=$productid\')')">

    See Bigger Image</a>

     

    ----------------------


  2. Hello

     

    I have installed STS and am spending some time getting my site to look the way I want. It is an awesome tool. One thing I would like to be able to do is to have the "click to enlarge" function which is standard in OSCom. I can't see where it can be added in the STS product_info.php.html page. Am I looking in the wrong place. I am a newbie to PHP.

     

    Thanks for your help

     

    Paul

×