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

Ask A Qusetion Contrib??

This is a discussion on Ask A Qusetion Contrib?? within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; Tell me if I'm understanding this? I think if I follow the instructions I will lose my click to enlarge ...

      
  1. #1
    Active Member
    Join Date
    Feb 2004
    Posts
    174
    Rep Power
    9


    Default Ask A Qusetion Contrib??

    Tell me if I'm understanding this? I think if I follow the instructions I will lose my click to enlarge and my pop-up window, see step 2 below??
    Code:
    ---------------------------------------------------
    
    Only the OSC Milestone MS2 - update for MS1
    Released 20th January 2004
    mail : loic.richard1@free.fr
    http://www.bleu-lavande.com
    
        Allow now the Multilanguage
        Include an image
        Include the french language
    
     I have changed only the file Product_info.php, see the step 2.
    
    --------------------------------------------------
    Contribution name: Ask a Product Question
    Released 11th January 2004
    Released under the GNU General Public License
    Copyright (c) 2004 osCommerce
      by Marg Davison
      email: marg@marg-art.com
      url  : http://www.marg-art.com
      -------------------------------------------------
    Description:
    
    Customers often will not refer to a model number or a correct
    product name when asking about a product. This add-on will guarantee the
    correct product info and question are sent to the appropriate person.
    
    This is a modified "Tell a Friend", but works just fine for the above needs.
    
    ================= IMPORTANT =====================
    FILES INCLUDED IN PACKAGE:
    /catalog/ask_a_question.php
    /catalog/includes/languages/english/ask_a_question.php
    
    FILES YOU HAVE TO PERFORM SOMETHING ON:
    /catalog/product_info.php
    /catalog/includes/filenames.php
    /catalog/includes/languages/english/ask_a_question.php
      
    BACKUP ALL CHANGED FILES BEFORE STARTING - I AM NOT RESPONSIBLE FOR ANY PROBLEMS CAUSED.
    
    ********-BACKUP FIRST-*********
    
    1.) Upload files to their appropriate folders.
    
    2.)/catalog/product_info.php
    ---- Find:
    
                  <td align="center" class="smallText">
    <script language="javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
    //--></script>
    
              
    -------- Replace with:
                <tr>
                <td align="center" class="smalltext">
    <?php // ################### Ask a question ############## ?>    
     	  <img src="<?php tep_image ('button_ask_a_question.gif', IMAGE_BUTTON_ASK_A_QUESTION); ?>">
    	  <a href="ask_a_question.php?products_id=<?php echo $product_info['products_id']; ?>" ONMOUSEOVER="window.status='.<?php echo TEXT_QUESTION ; ?> .' ; return true">
    	  <?php echo TEXT_QUESTION ; ?> <b><?php echo $product_info['products_name']; ?></b></a>
    <?php // ################ end added ask a question ############ ?>
    
    
    3.) Open /catalog/includes/filenames.php (or application_top.php)
    Add:
      define('FILENAME_ASK_QUESTION', 'ask_a_question.php');
    Save
    
    
    4.) /catalog/inlcudes/languages/english/product_info.php
    Add
    DEFINE('TEXT_QUESTION','Ask a question about ');

  2. #2
    Active Member neil's Avatar
    Join Date
    Nov 2002
    Posts
    248
    Rep Power
    10


    Default

    1. The file you would be changing in MAX would be templates/content/product_info.tpl.php as MAX is based on an excellent template mod.
    2. Removing those lines in 2 removes the javascript function to pop up a new resized window however the lines directly after that allow for a similar function/behaviour in non javascript enabled browsers: IE:
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
    </noscript>
    If you leave that in - your pop up should still work although it may be in a larger - full sized window.
    HTH
    Neil
    www.12website.com

    "You can have everything in life that you want if you will just help enough other people get what they want."
    Zig Ziglar

Similar Threads

  1. installing GPG contrib
    By kerrydax in forum osCommerce 2.2 Modification Help
    Replies: 27
    Last Post: 08-20-2006, 01:01 PM
  2. Multi Stores contrib in OsC Max-Is it possible?
    By InaFlap in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 08-05-2006, 03:11 PM
  3. Linkpoint - Which contrib to use? Please help!
    By giyer in forum osCommerce 2.2 Modification Help
    Replies: 13
    Last Post: 02-13-2006, 08:14 AM
  4. Ultimate SEO URLs v1.3 Contrib
    By apexdog in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-24-2005, 08:25 AM
  5. help with pwa contrib
    By dmiles in forum osCmax v1.7 Discussion
    Replies: 8
    Last Post: 05-15-2004, 02:50 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
  •