Jump to content

lemot

Members
  • Content count

    6
  • Joined

  • Last visited

Profile Information

  • Real Name
    Juan Monedero
  • Location
    Spain
  • Website
  1. lemot

    [Contribution] CSS Buttons Everywhere

    I love this contrib. I have made a littlec change in tep_image_submit. I removed the class="cssButton" and so I get the default type="submit" buttons, which is what I really want. // BEGIN: CSS Buttons Everywhere MODIFIED function tep_image_submit($image, $value = '-AltValue-', $parameters = '') { global $language; $css_submit = '<input type="submit" value="' . tep_output_string($value) . '" />'; return $css_submit; } // END: CSS Buttons Everywhere Great for me. But...if I do the same with tep_image_button, I get plain text. I tried by using <input type"submit" ...etc. in tep_image_button, but although it works in Firefox it does not in IE. I also tried using <button>, but still didn?t worl. Reading previous post seems that these are illegal html. Out of ideas :-((, I?m pretty new to html and php. Is there any way I can get the same "button" style in "tep_image_button" ? Thanks a lot in advance.
  2. lemot

    Ajax Buy Now

    Medreces, you are absolutelty right. MY FAULT. THE ORIGINAL CSS BUTTON + AJAX BUY NOW WORK PERFECTLY OK. Sorry again for the wasted time, thank you again and regards, Juan.
  3. lemot

    Ajax Buy Now

    I?ve made a quick check, and the CSS Button original code is different, so I think it has to be my fault (my HTML knowledge is very limited). I guess I forgot I made those changes. Sorry. The original CSS Button code is: function tep_image_button($image, $alt = '', $parameters = '') { global $language; $image = '<div class="cssbutton"> ' . $alt . ' </div>'; return $image; } I?ll try with that and let you know.
  4. lemot

    Ajax Buy Now

    Thanks, medreces. I?ll check if I can change it to conform with standards and make it work. Once again thanks for your help.
  5. lemot

    Ajax Buy Now

    Thanks for your help, Medreces. I did test with your page, using both IE and Firefox, and it worked very well (btw, I love the flying product!!) My test site is: www.lemot.es/catalog I?ve been trying to troubleshoot, and I think that for whatever reason the problem is here: 1) UltraPics makes this changes in catalog/product_info.php that affects the pop-up <!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //--> <?php if ($product_info['products_image_med']!='') { $new_image = $product_info['products_image_med']; $image_width = MEDIUM_IMAGE_WIDTH; $image_height = MEDIUM_IMAGE_HEIGHT; } else { $new_image = $product_info['products_image']; $image_width = SMALL_IMAGE_WIDTH; $image_height = SMALL_IMAGE_HEIGHT;}?> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $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 . $product_info['products_image_med']) . '">' . tep_image(DIR_WS_IMAGES . $new_image . 'ℑ=0', addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?> </noscript> <!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //--> 2) "CSS Buttons" makes some changes in catalog/includes/functions/html_output.php, specifically tep_image_button //// // Output a function button in the selected language /* CSS Button changes function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); } */ function tep_image_button($image, $alt = '', $parameters = '') { global $language; $image = '<div> <input type="submit" value="' .$alt . '" ></div>'; return $image; } The combined action of 1) + 2) + Ajax screws things up. If you click in "Click to enlarge" using IE, it adds the product to the cart instead of popping up the larger image. However, works ok in firefox So far, I have been able to debug that if I do not use tep_image_button in the javascript part of the product_info.php code that I cited, it turns to work Ok again... (but I loose the "CSS button") That is: Instead of: <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>'); //--></script> Use: <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> Although I feel comfortable with C, I am very new to PHP and javascript :-( Thanks for any help! Juan.
  6. lemot

    Ajax Buy Now

    Great contribution, Medreces. It works very nice...except that I have a strange problem. If I click in "Click to enlarge", I do not get the pop up window. Instead, the product gets added to the cart! This problem only happens when I use IE. This does *not* happen when I use Firefox (If I click in "Click to enlarge", I get the pop up window...) Apart from that, everything seems ok, no matter if I use IE or Firefox. Adding to the cart works pretty well. Thanks in advance. PD I have also installed UltraPics, PWA, login ala amazon and CSS buttons.
×