Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

arkitekt

Members
  • Content count

    18
  • Joined

  • Last visited

Posts posted by arkitekt


  1. To change select submit buttons in this contribution to (or back to) graphical images, for example the "search" button in the Search Info Box or the "tell a friend" button in the Tell a Friend Info Box.

     

    In catalog/includes/functions/html_output.php

     

     

    After this:

     

    // The HTML form submit button wrapper function
    // Outputs a button in the selected language
    // BEGIN: CSS Buttons Everywhere
    function tep_image_submit($image, $value = '-AltValue-', $parameters = '') {
    global $language;
    $css_submit = '<input type="submit" class="cssButton" value="' . tep_output_string($value) . '" />';
    return $css_submit;
    }
    // END: CSS Buttons Everywhere

     

    Add this:

     

    // BEGIN: Graphical Submit Button
    function tep_image_submit_graphical($image, $value = '-AltValue-', $parameters = '') {
    global $language;
    
    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
    
    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
    
    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
    
    $image_submit .= '>';
    
    return $image_submit;
    }
    // END: Graphical Submit Button

     

    In your file, for example - catalog/includes/boxes/tell_a_friend.php

     

     

    Find this:

     

    $info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),
    						   'align' => 'center',
    						   'text' => tep_draw_input_field('to_email_address', '', 'size="10"') . '?' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $myProductId) . tep_hide_session_id() . '<br>' . $tellFriendWhat);

     

     

    Change this:

     
    tep_image_submit

     

     

    To this:

     
    tep_image_submit_graphical

     

     

    This worked for me! Thanks Toyicebear for giving me the working example for the regular buttons! What I love about this is that it doesn't change all the submit buttons back but only select ones... if you prefer to change them all you can just make the change to your tep_image_submit coding in html_output.php rather than creating the seperate tep_image_submit_graphical


  2. Oops... now I know why you were saying we need to do something different in html_output.php --- they are graphical buttons but not "submit" buttons so they can't click and perform their functions... my bad :(

     

    TOYICEBEAR!! to the rescue :)

     

    Thanks again for this it's great... I'll keep trying, you've already helped a lot just by providing the contribution I hate to keep asking you for stuff


  3. Ahhh... I figured it out at least for the Tell A friend option I just changed the tep_image_submit to tep_image_button_graphical and it used the image in that folder.

     

    I didn't need to add anything additional to the html_output.php file or any additional code changes except for that.


  4. 1. In includes/functions/html_output.php look for this code section:

    Right under this you then add this:

    tep_image_button

    Practical example from product_info.php and the reviews button....

     

    change:

    To:

    Att..this only works for buttons called by the function, tep_image_button .

    The form buttons , tep_image_submit , can also be changed using a simular metode in modifying that section of html_output.php too.

     

     

    This is excellent... thanks so much toyicebear! I think this makes an excellent addition to this contribution and is very useful! I'd like to do the submit button images too --- I'll have a look at the code but right now I'm a bit confused how to make it work with those type of buttons :(

     

    If you get a moment to give some pointers with those it would be greatly appreciated... hopefully the tips benefit others using the contribution.

     

    Thanks so much again -- I'll try these changes tomorrow and get back to you if I get it working or not.


  5. Try this and let me know if it works....

     

     

    Hi Toyicebear,

     

    I know I asked about this a long time ago... but I never was able to get it working. Any chance you've found the solution more recently -- I'd really like to revert the "click to enlarge" button back to a graphic and possibly the search and "tell a friend" buttons too. If you could show me a working princible for one of them -- I think that I can apply that to the others.

     

    Sorry for the delay in responding... if you can modify the code for an existing "click to enlarge" button from the osc code -- that would be great -- I've tested the code you sent twice before but it's not working for me.

     

    Thanks again

     

    Arkitekt


  6. Man, i'm sorry guys for multiple posts but I am discovering things as I go along... I didn't think I needed Gift Vouchers in the order total since I was planning on just using discounts but apparently that was the problem... when I install the Gift Vouchers in Order Total I get the checkout_payment.php page loading...

     

    now my next issue will just be checking out why I'm getting this info in the payment area:

     

    MODULE_PAYMENT_PAYPAL_CC_TEXT

    MODULE_PAYMENT_PAYPAL_CC_DESCRIPTION MODULE_PAYMENT_PAYPAL_CC_URL_TEXT


  7. Some additional information... the "blank page" that I receive has a fatal error in the view source that might help someone give us some insight on the problem.

     

    Here is the code of that page

     

    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="LTR" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Welcome in your Family Support Network Store shop</title>
    <base href="http://familysupport.net/store/">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <script language="javascript"><!--
    var selected;
    var submitter = null;
    function submitFunction() {
      submitter = 1;
      }
    function selectRowEffect(object, buttonSelect) {
    
     // #################### Begin Added CGV JONYO ######################
     if (!document.checkout_payment.payment[0].disabled){
     // #################### End Added CGV JONYO ######################
    if (!selected) {
    
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
     }
    
     if (selected) selected.className = 'moduleRow';
     object.className = 'moduleRowSelected';
     selected = object;
    
    // one button is not an array
     if (document.checkout_payment.payment[0]) {
    document.checkout_payment.payment[buttonSelect].checked=true;
     } else {
    document.checkout_payment.payment.checked=true;
     }
    // #################### Begin Added CGV JONYO ######################
     }
    // #################### End Added CGV JONYO ######################
    }
    
    function rowOverEffect(object) {
    
     if (object.className == 'moduleRow') object.className = 'moduleRowOver';
    }
    
    function rowOutEffect(object) {
     if (object.className == 'moduleRowOver') object.className = 'moduleRow';
    }
    
    
    <br />
    <b>Fatal error</b>:  Call to a member function on a non-object in <b>/home/susanl/public_html/store/checkout_payment.php</b> on line <b>174</b><br />

     

    It appears this is the line 174 in checkout_payment.php

    $testing=$GLOBALS['ot_gv']->mod_process();


  8. Hi Toyicebear,

     

    The change from tep_image_button to tep_image sounds easy enough but I couldn't seem to pull it off... could you suggest the changes necessary to this portion of the code --- so I can understand it? I attempted what I thought was right - but ended up losing all the product info except the title of the page. So I had to change it back.

     

    Thanks for your help!

     

     

     

    <script language="javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $Qproduct->valueInt('products_id')) . '\\\')">' . tep_image(DIR_WS_IMAGES . $Qproduct->value('products_image'), addslashes($Qproduct->value('products_name')), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
    //--></script>
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $Qproduct->value('products_image')) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $Qproduct->value('products_image'), $Qproduct->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>


  9. Hi Toyicebear,

     

    I love your basic design pack it makes things quite quick and easy - I just had one question... is there anyway to use the basic design pack but keep the "image_enlarge.gif" --- I'd really like to keep the small magnifying glass image (or create an icon) for the enlargment of the image but I love the css for everything else.

     

     

    Thanks for your help and a great contribution!

     

    Nathan

×