Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SjoerdNL

Archived
  • Posts

    10
  • Joined

  • Last visited

Everything posted by SjoerdNL

  1. I haven't solved it yet. Hope someone can help me. I've included the complete code for the corresponding layout. What I want is to display images of the corresponding position in the bestsellers list, and not the numbers which are in text at the moment. $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '. </td><td class="infoBoxContents" valign="top" align="center"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $best_sellers['products_image'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,' class="shadow1" ') . '</a><br><br> </td><td class="infoBoxContents" valign="top" align="left"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a><BR><BR> <a title="more info" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . 'more info</a> | <a title="buy now" href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $best_sellers['products_id']) . '">' . 'buy now</a><br><br> </td><td class="infoBoxContents" valign="top" align="right">' . $currencies->display_price($best_sellers['products_price'], tep_get_tax_rate($best_sellers['products_tax_class_id'])) . '</td></tr>';
  2. Hey, There is not a recent topic displayed for this contribution using the search. Probably there never was an 'official' one in the contribution support forum, but I still have a question about this contribution: http://www.oscommerce.com/community/contri...arch,bestseller I installed this contribution on my development shop. Everything seems to work great. But the numbers are displayed in text. And I really want to display these numbers with some custom images I have. Something like the top 10 used @ frontlineshop.com. It's the first column, using this code $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '. </td> It's the part where it says tep_row_number_format($rows). I want this to change into code which displays the corresponding image. So the text that says 01. now, should be something like this: tep_image(DIR_WS_IMAGES . $best_sellers['products_image'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) But then it needs to point to the right number image: 01. --> images/no1.gif 02. --> images/no2.gif etc... Till the last item displayed, which would be: 10. Can somebody help me with the correct line of code to implement in this part of the query? Is there some additional information required? Thanks in advance.
  3. Is it possible to sort on brand/price/productname only. And what code do I have to use for that? I don't want to use the bestsellers option + cronjob. I'm using another contribution to create a standalone bestsellers page: http://www.oscommerce.com/community/contri...arch,bestseller
  4. In the OSC update dating 17th of august (The 2.2 Milestone 2 060817 Update) there were some modifications to the html_output.php in catalog/includes/functions. Can anyone tell me if there is an update available for the auto thumbnailer, after this update was published? This is the code section which was updated: Old: // "On the Fly Thumbnailer" using PHP GD Graphics Library by Nathan Welch (v1.5) // Scales product images dynamically, resulting in smaller file sizes, and keeps // proper image ratio. Used in conjunction with product_thumb.php t/n generator. function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { // Set default image variable and code $image = '<img src="' . $src . '"'; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == false || strstr($height,'%') == false) { $dont_calculate = 0; } else { $dont_calculate = 1; } // Do we calculate the image size? if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) { // 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 larger than the set width or height if ($image_size[0] > $width || $image_size[1] > $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image = '<img src="product_thumb.php?img='.$src.'&w='.tep_output_string($width).'&h='.tep_output_string($height).'"'; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if ($params != '') { $image .= ' ' . $params; } $image .= ' border="0" alt=" ' . tep_output_string($alt) . ' "'; if ($alt) $image .= ' title=" ' . tep_output_string($alt) . ' "'; $image .= '>'; return $image; } New: //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } Does it need updating, or will the old code be safe to use? Can't really tell it by looking at it myself.
  5. I've been able to clear out the header. Solved it by deleting the following line of code in includes/modules/new_products.php. new contentBoxHeading($info_box_contents); And with the shopping cart it was includes/classes/shopping_cart.php: new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SHOPPING_CART)); It even works with with the image headers from this contribution. http://www.oscommerce.com/community/contributions,1378 But it took some fine tuning in the html layout to get it all right.
  6. I looked in that topic, too bad there wasn't anything helpfull. But your 2 steps forward, 1 step back sounds familiar ;)
  7. I'm using STS Plus to make a distinctive look for my webshop. I've installed some contributions and it's still working fine. But i'm not happy with some of the design elements. I've got 2 main 'problems' so far: 1. I don't like the look of the what's new box in the contents part. I've looked for the files which need to be changed to delete this header (and replace it with an image of mine, or delete it totally). I looked for it in new_products.php in the catalog/includes/modules/ directory, and also the whats_new.php file in this directory: catalog/includes/boxes/. After changing some code in these file, the content part didn't change. So it seems that i need a different file to change, but which is this? And what do i need to change(links to contributions?)? This is the current look of the heading: 2. I want the border in my cartbox deleted. I've got a white borderline now, and it needs to be all black. And there will be an image on top of this too. Below you will find the current design, beneath the future image for the heading. What needs to be changed to accomplish this? current: future: The content of the cart will be below this. I tried to implement the following contribution ( http://www.oscommerce.com/community/contributions,1378 ), but it changed my overall design (only in Firefox). I want to know where I can change this, so that only the concerning headings will be changed. All the other infoboxes will remain unused.
×
×
  • Create New...