osCmax v2.5 User Manual
Results 1 to 3 of 3

problem with javascript and pop-up

This is a discussion on problem with javascript and pop-up within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hello, I tried to installed on my webshop the contrib MVS Shipping Cost Estimator v1.1b I would like this estimator ...

      
  1. #1
    New Member
    Join Date
    Dec 2007
    Posts
    20
    Rep Power
    0


    Default problem with javascript and pop-up

    Hello,

    I tried to installed on my webshop the contrib MVS Shipping Cost Estimator v1.1b
    I would like this estimator to be in an infobox, not during the checkout. The box appears normally but no pop-up when I click on it, even if my pop-up blocker is switched off.
    Here is the file for the infobox includes/boxes/estimate_shipping.php:

    <?php
    /*
    $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
    osCommerce, Open Source E-Commerce Solutions
    osCommerce, Open Source Online Shop E-Commerce Solutions
    Copyright (c) 2003 osCommerce
    Released under the GNU General Public License
    */
    ?>
    <!-- information //-->
    <tr>
    <td>
    <?php
    $info_box_contents = array();
    $info_box_contents[] = array('text' => 'Estimate Shipping');
    new infoBoxHeading($info_box_contents, false, false);
    $info_box_contents = array();
    $info_box_contents[] = array('text' =>
    '<center><a href="javascript:estimatorpopupWindow(\''. tep_href_link('ship_estimator.php', '', 'SSL') .'\')"><img src="/shop/includes/languages/english/images/buttons/button_estimate_shipping.gif" border="0"></a></center>'
    );
    new infoBox($info_box_contents);
    ?>
    </td>
    </tr>
    <!-- information_eof //-->
    It looks that this piece of code has to added but I don't know where:
    <!-- added for pop-up ship estimator //-->
    <SCRIPT LANGUAGE="JavaScript">
    function estimatorpopupWindow(URL) {window.open(URL,'shippingestimator','toolbar=0,sc rollbars=1,location=0,statusbar=0,menubar=0,resiza ble=1,width=800,height=600')}
    </script>
    <!-- added for pop-up ship estimator end //-->
    Thank you for your help!
    Last edited by antoinebp; 01-28-2008 at 08:21 AM.

  2. #2
    Member
    Join Date
    Sep 2007
    Posts
    30
    Rep Power
    0


    Default Re: problem with javascript and pop-up

    First I want to preface this with I am not an expert... but I just added a popup window on my products page to run a swf file and here is what I did.

    You need to add the script code to your main_page.tpl.php . This file is located in catalog/templates/(whatever the folder name is for your site template). When you open that file you will see a section that has all the javascript code. Add your script code there in between the <script an /script> from the function....}. Then save and hope it works. It worked for me.

    Cherie

  3. #3
    Member
    Join Date
    Sep 2007
    Posts
    30
    Rep Power
    0


    Default Re: problem with javascript and pop-up

    By the way, my site has a shipping estimator built in after items are added to the cart but before checking out. It is not a popup window though. You can see it at Baby Bottle Holder: Bebe Bottle Sling : Unique Baby Feeding Products and Multiples Clothing . Just add something to the cart and you will see the estimate shipping area. You can view the source for the page to get some ideas. I did not write the code for it but I specifically required it for my shopping cart when it was installed.

Similar Threads

  1. javascript
    By yaoi in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 03-27-2007, 11:41 AM
  2. Javascript & BTS
    By gamerigs in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 11-06-2005, 11:20 AM
  3. Javascript and separate price per customer problem.
    By gobayview in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 11-24-2003, 09:51 PM
  4. Javascript Error
    By jgkiefer in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 09-23-2003, 05:55 AM
  5. javascript integration
    By bushman in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 09-16-2003, 10:12 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
  •