Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

LoLoL

Archived
  • Posts

    34
  • Joined

  • Last visited

Posts posted by LoLoL

  1. Hello,

    make sure the thumbnails folder is chmod 777

    then, unzip the html_output file to restore the original file of imagemagic

    It may work. It worked for me.

     

    Hi guys, i've installed the contribution as explained in the readme file and everything seems fine, except that the images are not showing now. The url however shows "imagemagic.php" in it, but no image. If I turn Imagemagic OFF, the images work.

     

    Did I miss something while installing? I've checked the readme files again, but don't see anything wrong.....

     

    I'd appreciate any help. I've seen this work on other sites and think it's a super cool contribution.

     

    Thankx,

     

    Rusty

  2. Sorry,

    I think it was the Ultima SEO URLS messing up

     

    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="LTR" lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Retrovisione Clarion CJ981E</title>
    <base href="http://xxx.xxxx.xxx/">
    
    <script language="JavaScript">
    <!--
    
    function SymError()
    {
     return true;
    }
    
    window.onerror = SymError;
    
    var SymRealWinOpen = window.open;
    
    function SymWinOpen(url, name, attributes)
    {
     return (new Object());
    }
    
    window.open = SymWinOpen;
    
    //-->
    </script>
    
    <script language="javascript"><!--
    var i=0;
    function resize() {
     if (navigator.appName == 'Netscape') i=40;
     if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
     self.focus();
    }
    //--></script>
    </head>
    <body onload="resize();">
    <img src="imagemagic.php?img=n9rMz8%2Fcl9PO0Mzloahll6LO3dHZ15eys6OjoXpioKSd&w=250&h=250&page=popup" width="250" height="250" border="0" alt="Retrovisione Clarion CJ981E" title="Retrovisione Clarion CJ981E"></body>
    </html>
    
    <script language="JavaScript">
    <!--
    var SymRealOnLoad;
    var SymRealOnUnload;
    
    function SymOnUnload()
    {
     window.open = SymWinOpen;
     if(SymRealOnUnload != null)
     SymRealOnUnload();
    }
    
    function SymOnLoad()
    {
     if(SymRealOnLoad != null)
     SymRealOnLoad();
     window.open = SymRealWinOpen;
     SymRealOnUnload = window.onunload;
     window.onunload = SymOnUnload;
    }
    
    SymRealOnLoad = window.onload;
    window.onload = SymOnLoad;
    
    //-->
    </script>

     

    Hello, I have a problem. My popup images won't show up. I have the imagemagic.php as source but nothing.

    Everything works fine when I switch the contrib off. But no images when it's on. Any idea?

    Thanks

  3. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="LTR" lang="it">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Retrovisione Clarion CJ981E</title>
    <base href="http://www.onoff-hifi.com/">
    
    <script language="JavaScript">
    <!--
    
    function SymError()
    {
     return true;
    }
    
    window.onerror = SymError;
    
    var SymRealWinOpen = window.open;
    
    function SymWinOpen(url, name, attributes)
    {
     return (new Object());
    }
    
    window.open = SymWinOpen;
    
    //-->
    </script>
    
    <script language="javascript"><!--
    var i=0;
    function resize() {
     if (navigator.appName == 'Netscape') i=40;
     if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
     self.focus();
    }
    //--></script>
    </head>
    <body onload="resize();">
    <img src="imagemagic.php?img=n9rMz8%2Fcl9PO0Mzloahll6LO3dHZ15eys6OjoXpioKSd&w=250&h=250&page=popup" width="250" height="250" border="0" alt="Retrovisione Clarion CJ981E" title="Retrovisione Clarion CJ981E"></body>
    </html>
    
    <script language="JavaScript">
    <!--
    var SymRealOnLoad;
    var SymRealOnUnload;
    
    function SymOnUnload()
    {
     window.open = SymWinOpen;
     if(SymRealOnUnload != null)
     SymRealOnUnload();
    }
    
    function SymOnLoad()
    {
     if(SymRealOnLoad != null)
     SymRealOnLoad();
     window.open = SymRealWinOpen;
     SymRealOnUnload = window.onunload;
     window.onunload = SymOnUnload;
    }
    
    SymRealOnLoad = window.onload;
    window.onload = SymOnLoad;
    
    //-->
    </script>

     

    Hello, I have a problem. My popup images won't show up. I have the imagemagic.php as source but nothing.

    Everything works fine when I switch the contrib off. But no images when it's on. Any idea?

    Thanks

  4. that code is for displaying images and is used for all tep_image calls.

     

    show you shopping_cart.php

     

    Here is the beast:

    <?php

    /*

    $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

     

    osCommerce, Open Source E-Commerce Solutions

    http://www.oscommerce.com

     

    Copyright © 2003 osCommerce

     

    Released under the GNU General Public License

    */

     

    require("includes/application_top.php");

     

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_2GETHER); // Added 2gether (contribution 3929)

     

    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));

    ?>

    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html <?php echo HTML_PARAMS; ?>>

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

    <title><?php echo TITLE; ?></title>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

    <link rel="stylesheet" type="text/css" href="stylesheet.css">

    <script type="text/javascript">

    <!--

    function advisecustomer()

    {

    warn_string = <?php echo '"<b><span class=\"errorText\">'.TEXT_UPDATE_WARNING.'</span></b>"'; ?>;

     

    if (document.getElementById && document.getElementById("update_warning")) {

    document.getElementById("update_warning").innerHTML = warn_string;

    } else if (document.all && document.all["update_warning"]) {

    document.all["update_warning"].innerHTML = warn_string;

    }

    }

    //-->

    </script>

    </head>

    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

    <!-- header //-->

    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>

    <!-- header_eof //-->

     

    <!-- body //-->

    <table border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr>

    <td width="<?php echo BOX_WIDTH; ?>" valign="top" class="bar_left"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">

    <!-- left_navigation //-->

    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

    <!-- left_navigation_eof //-->

    </table></td>

    <!-- body_text //-->

    <td width="100%" valign="top" class="centercolor"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="95%" cellspacing="0" cellpadding="0" align="center">

    <tr>

    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr>

    <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

    </tr>

    </table></td>

    </tr>

    <tr>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

    </tr>

    <?php

    if ($cart->count_contents() > 0) {

    ?>

    <tr>

    <td>

    <?php

    $info_box_contents = array();

    $info_box_contents[0][] = array('align' => 'center',

    'params' => 'class="productListing-heading"',

    'text' => TABLE_HEADING_REMOVE);

     

    $info_box_contents[0][] = array('params' => 'class="productListing-heading"',

    'text' => TABLE_HEADING_PRODUCTS);

     

    $info_box_contents[0][] = array('align' => 'center',

    'params' => 'class="productListing-heading"',

    'text' => TABLE_HEADING_QUANTITY);

     

    $info_box_contents[0][] = array('align' => 'right',

    'params' => 'class="productListing-heading"',

    'text' => TABLE_HEADING_TOTAL);

     

    $any_out_of_stock = 0;

    $products = $cart->get_products();

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {

    // Push all attributes information in an array

    if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

    while (list($option, $value) = each($products[$i]['attributes'])) {

    echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

    $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

    from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

    where pa.products_id = '" . $products[$i]['id'] . "'

    and pa.options_id = '" . $option . "'

    and pa.options_id = popt.products_options_id

    and pa.options_values_id = '" . $value . "'

    and pa.options_values_id = poval.products_options_values_id

    and popt.language_id = '" . $languages_id . "'

    and poval.language_id = '" . $languages_id . "'");

    $attributes_values = tep_db_fetch_array($attributes);

     

    $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

    $products[$i][$option]['options_values_id'] = $value;

    $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

    $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

    $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

    }

    }

    }

     

    $together_offer_ok = false; // Added 2gether (contribution 3929)

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {

    //// bof: Added 2gether (contribution 3929)

    $together_offer = false;

    $together_this_done = false;

    $together_recommend = false;

    $together_products_query = tep_db_query("select product_1_id, product_2_id, discount, type from " . TABLE_2GETHER . " where status = 1 ");

    while ($together_products = tep_db_fetch_array($together_products_query)) {

    if ($together_products['product_1_id'] == $products[$i]['id']) {

    if (!$cart->in_cart($together_products['product_2_id'])) {

    $together_pid = $together_products['product_2_id'];

    if ($together_products['discount'] > 0) {

    $together_offer = true;

    } else {

    $together_recommend = true;

    }

    } elseif ($together_products['discount'] > 0) {

    $together_offer_ok = true;

    $together_this_done = true;

    }

    } elseif ($together_products['product_2_id'] == $products[$i]['id']) {

    if (!$cart->in_cart($together_products['product_1_id'])) {

    $together_pid = $together_products['product_1_id'];

    if ($together_products['discount'] > 0) {

    $together_offer = true;

    } else {

    $together_recommend = true;

    }

    } elseif ($together_products['discount'] > 0) {

    $together_offer_ok = true;

    $together_this_done = true;

    }

    }

    }

    //// eof: Added 2gether

     

    if (($i/2) == floor($i/2)) {

    $info_box_contents[] = array('params' => 'class="productListing-even"');

    } else {

    $info_box_contents[] = array('params' => 'class="productListing-odd"');

    }

     

    $cur_row = sizeof($info_box_contents) - 1;

     

    $info_box_contents[$cur_row][] = array('align' => 'center',

    'params' => 'class="productListing-data" valign="top"',

    'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false,'onFocus="advisecustomer();"'));

     

    $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .

    ' <tr>' .

    ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .

    ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

     

    if (STOCK_CHECK == 'true') {

    $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

    if (tep_not_null($stock_check)) {

    $any_out_of_stock = 1;

     

    $products_name .= $stock_check;

    }

    }

    //// bof: Added 2gether (contribution 3929)

    //// here the box will show show

    if ($together_offer) {

    $together_pid_query = tep_db_query("select p.products_image,

    pd.products_name

    from " . TABLE_PRODUCTS . " p,

    " . TABLE_PRODUCTS_DESCRIPTION . " pd

    where p.products_id = '" . $together_pid . "' and

    p.products_id = pd.products_id and

    pd.language_id = '" . $languages_id . "' and

    p.products_status = '1'");

    $together = tep_db_fetch_array($together_pid_query);

     

    $products_name .= '<br><table class="borderGray" cellpadding="2" bgcolor="#ffffff"><tr><td class="smalltext" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $together_pid) . '#b2"><img src="images/save-icon_sm.gif" border="0" style="vertical-align:middle" alt="2gether" title="2gether"> ' . '2<i>gether</i> ' . SPECIALS . ' <img src="images/save-icon_sm.gif" border="0" style="vertical-align:middle" alt="2gether" title="2gether"><br>' .tep_image(DIR_WS_IMAGES . $together['products_image'], $together['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HIGHT).'<br</a><br><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . $together_pid) . '"><img src="includes/languages/' . $language . '/images/buttons/button_buy_now.gif" alt="'.IMAGE_BUTTON_BUY_NOW.'" border="0"></a></td></tr></table>';

    } elseif ($together_recommend) {

    $together_pid_query = tep_db_query("select p.products_image,

    pd.products_name

    from " . TABLE_PRODUCTS . " p,

    " . TABLE_PRODUCTS_DESCRIPTION . " pd

    where p.products_id = '" . $together_pid . "' and

    p.products_id = pd.products_id and

    pd.language_id = '" . $languages_id . "' and

    p.products_status = '1'");

    $together = tep_db_fetch_array($together_pid_query);

     

    $products_name .= '<br><table cellpadding="2" bgcolor="#ffffff"><tr><td class="smalltext" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $together_pid) . '#b2">'.BUY_TWO_HEADING_TEXT_SUGGESTION.'<br>' .tep_image(DIR_WS_IMAGES . $together['products_image'], $together['products_name']).'<br><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . $together_pid) . '"><img src="includes/languages/' . $language . '/images/buttons/button_buy_now.gif" alt="'.IMAGE_BUTTON_BUY_NOW.'" border="0"></a></td></tr></table>';

    } elseif ($together_this_done) {

    $products_name .= '<br><img src="images/save-icon_sm.gif" border="0" style="vertical-align:middle" alt="2gether discount" title="2gether discount">';

    }

     

    //// eof: Added 2gether

     

    if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

    reset($products[$i]['attributes']);

    while (list($option, $value) = each($products[$i]['attributes'])) {

    $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';

    }

    }

     

    $products_name .= ' </td>' .

    ' </tr>' .

    '</table>';

     

    $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',

    'text' => $products_name);

     

    $info_box_contents[$cur_row][] = array('align' => 'center',

    'params' => 'class="productListing-data" valign="top"',

    'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onFocus="advisecustomer();"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

    //TotalB2B start

    $info_box_contents[$cur_row][] = array('align' => 'right',

    'params' => 'class="productListing-data" valign="top"',

    'text' => '<b>' . $currencies->display_price_nodiscount($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');

    //TotalB2B end

     

    }

     

    new productListingBox($info_box_contents);

    ?>

    </td>

    </tr>

    <tr>

    <!-- start Customer Update Cart Reminder 2.0 -->

    <td class="main">

    <table width="100%" cellpadding="1" cellspacing="0" border="0">

    <tr>

    <td class="main">

    <script type="text/javascript">

    <!--

    if (!(document.getElementById) && !(document.all)) {

    document.write("<b><span class=\"errorText\"><?php echo TEXT_UPDATE_WARNING; ?></span>");

    }

    else {

    document.write("<span id=\"update_warning\" class=\"errorText\">?</span>");

    }

    //-->

    </script>

    <noscript>

    <b><span class="errorText"><?php echo TEXT_UPDATE_WARNING; ?></span></b>

    </noscript>

    </td>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

    <td align="right" class="main" valign="top" nowrap><b>

    <?php echo SUB_TITLE_SUB_TOTAL; ?> <?php

     

    //TotalB2B start

    global $customer_id;

    $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'");

    $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest);

    if ((($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) || ((tep_session_is_registered('customer_id')))) {

    echo $currencies->format($cart->show_total());

    } else {

    echo PRICES_LOGGED_IN_TEXT;

    }

    //TotalB2B end

     

    ?></b></td>

    </tr>

    </table>

    </td>

    <!-- end Customer Update Cart Reminder 2.0 -->

     

    <!-- bof: Added 2gether (contribution 3929) //-->

    <?php

    if ($together_offer_ok) {

    echo '<tr><td class="smalltext" align="center"><img src="images/save-icon_sm.gif" border="0" style="vertical-align:middle" alt="2gether discount" title="2gether discount">?Receive Your 2<i>gether</i> Discount at Checkout?<img src="images/save-icon_sm.gif" border="0" style="vertical-align:middle" alt="2gether discount" title="2gether discount"></td></tr>';

    echo '<tr><td>'.tep_draw_separator('pixel_trans.gif', '100%', '10').'</td></tr>';

    }

    ?>

    <!-- eof: Added 2gether //-->

    <?php

    if ($any_out_of_stock == 1) {

    if (STOCK_ALLOW_CHECKOUT == 'true') {

    ?>

    <tr>

    <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>

    </tr>

    <?php

    } else {

    ?>

    <tr>

    <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>

    </tr>

    <?php

    }

    }

    ?>

    <tr>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

    </tr>

    <tr>

    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

    <tr class="infoBoxContents">

    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

    <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>

    <?php

    $back = sizeof($navigation->path)-2;

    if (isset($navigation->path[$back])) {

    ?>

    <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>

    <?php

    }

    ?>

    <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

    </tr>

    </table></td>

    </tr>

    </table></td>

    </tr>

    <?php

    } else {

    ?>

    <tr>

    <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>

    </tr>

    <tr>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

    </tr>

    <tr>

    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

    <tr class="infoBoxContents">

    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

    <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

    </tr>

    </table></td>

    </tr>

    </table></td>

    </tr>

    <?php

    }

    ?>

    </table></form></td>

    <!-- body_text_eof //-->

    <td width="<?php echo BOX_WIDTH; ?>" valign="top" class="bar_right"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">

    <!-- right_navigation //-->

    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

    <!-- right_navigation_eof //-->

    </table></td>

    </tr>

    </table>

    <!-- body_eof //-->

     

    <!-- footer //-->

    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

    <!-- footer_eof //-->

    <br>

    </body>

    </html>

    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

     

    Thanks, Amanda

  5. Hello Amanda,

     

    I have this problem in my shopping_cart.php (2gether addon):

    Warning: Division by zero in /home/user/public_html/onoff/includes/functions/html_output.php on line 117

     

    My html_output.php on line 97 to 117 is:

    	// Get the image's information
    if ($image_size = @getimagesize($src)) { 
    
      $ratio = $image_size[1] / $image_size[0];
    
      // Set the width and height to the proper ratio
      if (!$width && $height) { 
    	$ratio = $height / $image_size[1]; 
    	$width = intval($image_size[0] * $ratio); 
      } elseif ($width && !$height) { 
    	$ratio = $width / $image_size[0]; 
    	$height = intval($image_size[1] * $ratio); 
      } elseif (!$width && !$height) { 
    	$width = $image_size[0]; 
    	$height = $image_size[1]; 
      } 
    
      // Scale the image if not the original size
      if ($image_size[0] != $width || $image_size[1] != $height) { 
    	$rx = $image_size[0] / $width; 
    	$ry = $image_size[1] / $height;

    Thanks in advance

  6. Hello,

     

    I can't get the contrib working.

    I created the cache file outside my public_html and installed everything as described but the result is THIS:

    Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/user/public_html/folder/includes/application_top.php on line 285.

     

    HELP, please!

    Thanks in advance.

  7. Ok, I'm just going to post my modifications to seo.class.php and see if anyone else has thoughts. This is necessary when integrating these two contribs as Ultimate SEO URLs replaces the tep_href_link function in html_output.php. That's the same function that SID Killer modified. I did update the code in html_output.php according to the SID Killer instructions so I can turn off Ultimate SEO URLs and things will still work.

     

    Using oscommerce 2.2ms2-051113

     

    To combine SID Killer

    http://www.oscommerce.com/community/contributions,952 (v1.2a 12/2005)

     

    With Ultimate SEO URLs

    http://www.oscommerce.com/community/contributions,2823 (v2.2.1e 1/1/2006)

     

    In seo.class.php find:

     

    /**
    * Stock function, fallback use 
    */	
     function stock_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
    global $request_type, $session_started, $SID;

     

    and change by adding $kill_sid to the end of the global line like:

     

    /**
    * Stock function, fallback use 
    */	
     function stock_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
    // ADD: SID KILLER	
    global $request_type, $session_started, $SID, $kill_sid;
    // EOADD: SID KILLER

     

    Then a little below that find:

     

    	if (isset($_sid)) {
      $link .= $separator . $_sid;
    }

     

    and change it to:

     

    // ADD: SID KILLER	
    if (isset($_sid) && ( !$kill_sid ) ) {
    // EOADD: SID KILLER	
      $link .= $separator . $_sid;	 
    }

     

    continuing down the file, find the code:

     

    	function add_sid( $link, $add_session_id, $connection, $separator ){
    	global $request_type; // global variable

     

    and again add $kill_sid to the end of the global line like:

     

    	function add_sid( $link, $add_session_id, $connection, $separator ){
    // ADD: SID KILLER		
    	global $request_type, $kill_sid; // global variable
    // EOADD: SID KILLER

    finally, a little lower find the code:

     

    		if ( isset($_sid) ) return $link . $separator . $_sid;
    	else return $link;

     

    and change to:

     

    // ADD: SID KILLER
    	if ( isset($_sid) && ( !$kill_sid ) ) return $link . $separator . $_sid;
    	else return $link;
    // EOADD: SID KILLER

     

    As best I can tell, this is the only two places where SIDs show up.

     

    Thoughts?

     

    Nathan

     

    Hello,

    I have installed the ultimate SEO URLs. I don't know if I have to install the 1.2a before installing your contribution for SID killer or if your contribution is enough without the SID Killer 1.2

     

    Thanks lots

  8. well, I have no paypal so the first thing is for you to determine where your paypal module gets its total from.

     

    Hello Amanda,

     

    I visited a few sites of this topic's posters and I didn't find any (mine included obviously lol) working like yours. These are my bugs:

     

    1. "Buy Product1 and Product2" on my product_info.php url

    When I click on one of those links "Product1" or "Product2", the module doesn't add it to the cart. It does only on your website (most of us have that bug).

     

    2. When I click on Add to cart of a single product, it adds directly the 2 products to the cart (i am the only one to have that bug actually)

     

    3. A suggestion:

    Could you please post a complete CLEAN package of this contrib? It's one of the top5 contrib of osCommerce and I think it deserves all our attention BECAUSE the one posted by Jenso causes a critical error: 1054 due to his product_info.php sample.

     

    4. Addon Shopping cart:

    I installed the add-on too. It works well although my second product's image never displays completely. Seems to be a problem in the height of my shopping cart row because I can't see a piece of the second image. It's just crushed and I don't know how to change the height.

     

    Here is my product_info.php

     

    <?php
    /*
     $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
     require('includes/application_top.php');
    
     require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
    
     $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product_check = tep_db_fetch_array($product_check_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <?php
    // BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
    // Replaced by header_tags.php
    if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
     require(DIR_WS_INCLUDES . 'header_tags.php');
    } else {
    ?> 
     <title><?php echo TITLE; ?></title>
    <?php
    }
    // EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
    ?>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <script language="javascript"><!--
    function popupWindow(url) {
     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>
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" width="100%" cellspacing="3" cellpadding="3">
     <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    </table></td>
    <!-- body_text //-->
    <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <?php
     if ($product_check['total'] < 1) {
    ?>
      <tr>
    	<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    		  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    <?php
     } else {
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info = tep_db_fetch_array($product_info_query);
    
    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
    
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    } else {
      $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
    }
    
    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
    ?>
      <tr>
    	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    	  <tr>
    		<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
    		<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    
      <tr>
    	<td class="main">
    <?php
    if (tep_not_null($product_info['products_image'])) {
    ?>
    	  <table border="0" cellspacing="0" cellpadding="2" align="right">
    		<tr>
    		  <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>
    <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>
    
    		  </td>
    		</tr>
    	  </table>
    <?php
    }
    ?>
    	  <p><?php echo stripslashes($product_info['products_description']); ?></p>
    <?php
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
    ?>
    	  <table border="0" cellspacing="0" cellpadding="2">
    		<tr>
    		  <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
    		</tr>
    <?php
      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    	$products_options_array = array();
    	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
    	while ($products_options = tep_db_fetch_array($products_options_query)) {
    	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
    	  if ($products_options['options_values_price'] != '0') {
    		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
    	  }
    	}
    
    	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
    	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
    	} else {
    	  $selected_attribute = false;
    	}
    ?>
    		<tr>
    		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
    		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
    		</tr>
    <?php
      }
    ?>
    	  </table>
    <?php
    }
    ?>
    	</td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    <?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    $reviews = tep_db_fetch_array($reviews_query);
    if ($reviews['count'] > 0) {
    ?>
      <tr>
    	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    <?php
    }
    
    if (tep_not_null($product_info['products_url'])) {
    ?>
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    <?php
    }
    
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
    ?>
      <tr>
    	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
      </tr>
    <?php
    } else {
    ?>
      <tr>
    	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
      </tr>
    <?php
    }
    ?>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    			<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
    			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    		  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    <!-- bof: Add 2gether (contribution 3929) //-->
      <tr>
    	<td>
    <?php 
    if (MODULE_2GETHER_DISCOUNT_STATUS) { 
     echo '<tr><td>';
     include(DIR_WS_MODULES . '2gether.php');
     echo '</td></tr>';
    } 
    ?>
    	</td>
      </tr>
    
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    
    <!-- eof: Add 2gether (contribution 3929) //-->
      <tr>
    	<td>
    <?php
    //added for cross -sell
      if ( (USE_CACHE == 'true') && !SID) { 
    echo tep_cache_also_purchased(3600); 
      } else { 
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); 
     } 
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
    
    ?>
    	</td>
      </tr>
    </table></form></td>
    <!-- body_text_eof //-->
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
    </table></td>
     </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

     

    Thanks again for that contrib, Amanda, you are THE ONE because the combo offer is the best tool for any vendor.

  9. Hello everybody,

    Happy New Year!

     

    Could you please help me? It's an emergency.

    1. my CSV file is always located in the same folder. Let's say update.csv located into temp folder.

    2. i would like to get rid of the forms and just have a button to click on to update my store.

     

    So the question is:

    How do I transform this code into a single url which would be able to load /temp/update.csv?

     

    <FORM ENCTYPE="multipart/form-data" ACTION="easypopulate.php" METHOD=POST>

    <p>

    <div align = "left">

    <p><b>Import from Temp Dir (<? echo $tempdir; ?>)</b></p>

    <p class="smallText">

    <INPUT TYPE="text" name="localfile" size="50">

    <input type="submit" name="buttoninsert" value="Update">

    <br>

    </p>

    </div>

     

    </form>

     

    Thanks lots in advance.

  10. Could anybody help me please?

    It's an emergency.

     

    I need to call the Easy Populate update function without using the form in the admin panel.

    the fle to upload has always the same path.

    Please help.

    My partners should be able to update the store without logging in the admin panel, just from a secret link on the website.

     

    Thanks in advance.

     

    Hello everybody,

     

    I have a little problem but I am not skilled enough to fix it myself.

    I would like to edit the easypopulate.php file

     

    Purpose:

     

    My CSV file is located ALWAYS at the same place on my server.

    I would like to update it from an external link.

     

    Example: the CSV file is called: update.csv; I locate it in temp dir.

    How should I edit the easypopulate.php to run the Import from a single URL?

     

    Thank you in advance.

    :-)

  11. Hello everybody,

     

    I have a little problem but I am not skilled enough to fix it myself.

    I would like to edit the easypopulate.php file

     

    Purpose:

     

    My CSV file is located ALWAYS at the same place on my server.

    I would like to update it from an external link.

     

    Example: the CSV file is called: update.csv; I locate it in temp dir.

    How should I edit the easypopulate.php to run the Import from a single URL?

     

    Thank you in advance.

    :-)

  12. this should probably be in the Tips & Tricks section, but I accomplished this with my new site..

     

    You can do it either one of two ways..

     

    have a drop-down menu as on www.graveyardrecords.com/index.php

     

    or do it using css like on www.graveyardrecords.com/2006/

     

    The scrollbar looks nice in MSIE but generic in Firefox :(

     

    in your stylesheet.css add

    DIV.scrollbar {
    width: 215px;
    height: 210px;
    position: absolute;
    overflow:auto;
    }

     

    then in your includes/boxes/categories.php

     

    find the following code and add in the <div class= "scrollbar" > and then add another </div> at the bottom right AFTER the last ?> but BEFORE the last

    </td>
    	  </tr>
    <!-- categories_eof //-->

    <!-- categories //-->
    
    	  <tr>
    		<td>
    <div class= "scrollbar" >
    <?php
     $info_box_contents = array();
     $info_box_contents[] = array('align' => 'left',
    						   'text'  => BOX_HEADING_CATEGORIES
    						  );
     new CategoriesBoxHeading($info_box_contents, true, false);

     

    Hello,

    Thanks lots for your reply.

    I tried your solution but it's messing up the following box which is "manufacturers" in my case. That box just disappears.

    Any hint?

     

    Thanks in advance.

×
×
  • Create New...