Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited


Profile Information

Recent Profile Visitors

17,287 profile views
  1. Sorry, that's a bug... Just create a php file in admin folder, with the code below. Run that file once and delete it afterward. <?php //bug no modRewrite require('includes/application_top.php'); if (!defined('OSC_PRODUCT_IMAGE_MODREWRITE')) { tep_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title,configuration_key,configuration_value,configuration_description,configuration_group_id,sort_order,date_added, set_function) VALUES ('OPI: mod_rewrite enabled', 'OSC_PRODUCT_IMAGE_MODREWRITE', 'true', 'OsC Product Image Module: If mod_rewrite enable, set to true. Otherwise, set to false. <br />', '4', '264', NOW(), '" . tep_db_input("tep_cfg_select_option(array('true', 'false'), ") . "')"); } require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  2. There is an addon "Stock View with Quantity per Attribute" out there, but I did not know how the frontpage look like. But I guess it's easy to create some javascript function using jQuery to get similar output. As for the site mentioned, I did not use that addon but created myself, including the backend and frontend. I also use prototypejs instead of jQuery for frontpage catalog. @zaenal
  3. Some others suggestion... Your product list (index.php) seem still use default image (a big one) that slowdown your site. Try to use opi thumbnail to display your product image everywhere. Files that display product image product_info.php (done) popup_image.php product_reviews.php product_reviews_info.php product_reviews_write.php products_new.php reviews.php shopping_cart.php specials.php includes/modules/also_purchased_products.php includes/modules/new_products.php includes/modules/product_listing.php (!important) includes/modules/boxes/bm_reviews.php includes/modules/boxes/bp_specials.php includes/modules/boxes/bm_whats_new.php Just use the same method as product_info.php. Below an example to edit includes/modules/product_listing.php file... Find... case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id'] . '&products_name=' . $listing['products_name']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id'] . '&products_name=' . $listing['products_name']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; Replace with: --here we use "thumbs/def/small/" but you can use other "def", or just edit opi_thumbnail.php to fit your need. case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><img src="' . tep_href_link(DIR_WS_IMAGES . 'thumbs/def/small/' . $listing['products_image']) . '" alt="' . $listing['products_name'] . '" /></a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><img src="' . tep_href_link(DIR_WS_IMAGES . 'thumbs/def/small/' . $listing['products_image']) . '" alt="' . $listing['products_name'] . '" /></a></td>'; } break; @zaenal
  4. There is no error on your opi_thumbnail.php and .htaccess. I try to access your rain_light.gif and 0-3-months-yellow-lily.jpg using opi thumbnailer, and it's works: square rain_light.gif - http://www.rain-e-da.../rain_light.gif small rain_light.gif - http://www.rain-e-da.../rain_light.gif square 0-3-months-yellow-lily.jpg - http://www.rain-e-da...yellow-lily.jpg small 0-3-months-yellow-lily.jpg - http://www.rain-e-da...yellow-lily.jpg I guess the problem come from your tep_image function. Did you add an addon that modify tep_image function? Well, if you add file_exists check to tep_image, the result will always null because the thumbnail is generated on-the-fly by opi_thumbnail.php. Just try to write IMG tag without tep_image on your product_info.php: <?php if (tep_not_null($product_info['products_image'])) { //$pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); $products_images = explode(',', $product_info['products_images']); if (sizeof($products_images) > 1) { ?> <div id="piGal" style="float: right;"> <ul> <?php $pi_counter = 0; foreach ($products_images as $pi) { $pi_counter++; $pi_entry = ' <li><a href="'; $pi_entry .= tep_href_link(DIR_WS_IMAGES . 'thumbs/def/large/' . $pi); $pi_entry .= '" target="_blank" rel="fancybox"><img src="' . tep_href_link(DIR_WS_IMAGES . 'thumbs/def/display/' . $pi) . '" /></a>'; $pi_entry .= '</li>'; echo $pi_entry; } ?> </ul> </div> <script type="text/javascript"> $('#piGal ul').bxGallery({ maxwidth: 300, maxheight: 200, thumbwidth: <?php echo (($pi_counter > 1) ? '75' : '0'); ?>, thumbcontainer: 300, load_image: 'ext/jquery/bxGallery/spinner.gif' }); </script> <?php } else { ?> <div id="piGal" style="float: right;"> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . 'thumbs/def/large/' . $product_info['products_image']) . '" target="_blank" rel="fancybox"><img src="' . tep_href_link(DIR_WS_IMAGES . 'thumbs/def/display/' . $product_info['products_image']) . '" alt="' . addslashes($product_info['products_name']) . '" hspace="5" vspace="5" /></a>'; ?> </div> <?php } ?> <script type="text/javascript"> $("#piGal a[rel^='fancybox']").fancybox({ cyclic: true }); </script> <?php } ?> @zaenal
  5. Never seen it... I'm not linux expert, but this could be happen on some server that appoint specific privilege (user and user group) to PHP. Another workaround, try to CHMOD the folder manually. Open opi_thumbnail.php, and find @mkdir(OPI_FS_IMAGES_OPI_THUMB . $subdir, OPI_FS_CHMOD), and make some change like below: //check directory $dirs = explode(DIRECTORY_SEPARATOR, $imMode['thumb']); $subdir = ''; for ($i=0; $i < sizeof($dirs)-1; $i++) { $subdir .= $dirs[$i] . DIRECTORY_SEPARATOR; if (!is_dir(OPI_FS_IMAGES_OPI_THUMB . $subdir)) { @mkdir(OPI_FS_IMAGES_OPI_THUMB . $subdir); } @chmod(OPI_FS_IMAGES_OPI_THUMB . $subdir, OPI_FS_CHMOD); } @zaenal
  6. On linux you should use octal value with leading zero. On opi_thumbnail.php find OPI_FS_CHMOD, and set 0755 define('OPI_FS_CHMOD', 0755); If you can't find OPI_FS_CHMOD on that file, I'm afraid you use older version. Download the new one here: http://addons.oscommerce.com/info/8139
  7. Hi Graham, I have no idea why it's did not show up on your product info page, because the thumbnail images work properly. I try to access your store but seem it's on "maintenance" mode... Try to "view source" and find the IMG tag that load thumbnail image. How it look like? Does the SRC attribute pointing to the right URL? <img src=".../images/thumbs/def/display/products/0-3-months-yellow-lily-1.jpg" /> @zaenal
  8. Hi Gemma, Open file in admin: /includes/classes/productImageHandler.php, and replace below line if (mkdir($dest . $new_folder)) { with this one if (mkdir($dest . $new_folder, 0755)) { Hope that help. Note: It's seem OPI need one more configuration for handling this. So it's can be configured from admin page. Thanks, @zaenal
  9. Hi Johnatan, Maybe you can replace your code like below: //// // The HTML image wrapper function if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { $src=DIR_WS_IMAGES.'thumbs/def/display/nopic.jpg'; //no image url when you upload the product. } //over Cheers, @zaenal
  10. Do you use IIS or Apache? It's seem OPI can not find your image folder. Please make some test below: Assuming that your domain is domain.com, installed oscommerce in root directory, and you have an image in root_directory/images/products/virtual_image.png, can you view this image using URL http: // domain.com/images/thumbs/def/adminthumb/virtual_image.png ? If you can not see the image using this URL, your problem should be in your htaccess, etc. (If you pass point above) What the value of configuration below when editing product. View source and find similar line below var oscProductImageHelper = { ... imageURL: ???, ... } If you use Apache with modrewrite, its should be: imageURL: {path:'http://domain.com/images/', relative:'products/', medium:'http://domain.com/images/thumbs/def/adminpreview/', small:'http://domain.com/images/thumbs/def/adminthumb/', transparent:'images/pixel_trans.gif'}, Otherwise, if you use IIS its should be: imageURL: {path:'http://domain.com/images/', relative:'products/', medium:'http://domain.com/opi_thumbnail.php?def=adminpreview', small:'http://domain.com/opi_thumbnail.php?def=adminthumb', transparent:'images/pixel_trans.gif'}, Cheers, @zaenal
  11. Hi Bryan, I can't view the image. Something wrong, but not from OPI. Do you install other addon? Just a quick fix from your admin folder, go to includes/application_top.php, find line/text like "error_reporting()", then change it like below: //Set the level of error reporting error_reporting(0); Best, @zaenal Note: for your security concern... When trying to ask in the forum, hide/mask your real path/root and don't announce it to the world, moreover you also provide your domain and your gmail .
  12. Hi Gemma, To set your watermark, open opi_thumbnail.php file. Edit some configuration below: define('OPI_FS_IMAGES_WATERMARK', OPI_FS_IMAGES_OPI_PATH . str_replace('/', DIRECTORY_SEPARATOR, '_hidden_/watermarked.png') ); // watermark file define('OPI_IMAGES_WM_WMIN', 600); define('OPI_IMAGES_WM_HMIN', 600); define('OPI_IMAGES_WM_POSITION', 'CC'); define('OPI_IMAGES_WM_OPACITY', 20); If you "remove" the images before deleting a product, the thumbnail will be cleaned up. But if you delete product directly without removing it's images (or you use EP to update product and/or products_images) then the _thumbnail_ will not be cleaned up. The easiest way to deal with... after updating products, for example using EP, go to Configurations > Images > OPI: Cleanup Thumbnail, then set it value to true (then go back to edit/access/view product or categories to make it 'executed'.) Now you will have an empty _thumbnail_ folder. @zaenal
  13. I downloaded the last version of EP (v2-77a) and try to figure out how to make OPI works with it. It's seem it just as easy as add new variable to product's $custom_fields array. Open easypopulate.php, find line below (arround line 300) $custom_fields[TABLE_PRODUCTS] = array(); Insert products_images to the array: 'products_images'=>'OPI' $custom_fields[TABLE_PRODUCTS] = array('products_images' => 'OPI'); I've never use EP, but I'm sure above patch will works. @zaenal
  14. OPI: TIGHTEN-UP SECURITY File change: opi_thumbnail.php I just uploaded the new opi_thumbnail.php. There is no new feature in this one, only some enhancement in security issue by sanitizing all user input (global variable _GET). Big thanks to Te Taipo for his advice. DOWNLOAD: http://addons.oscommerce.com/info/8139 (click on "History" tab to see old release) NEW INSTALLATION -------------------------- Download full package from previous release (OPI 2.0) Replace opi_thumbnail.php with the new one. UPGRADE INSTALLATION --------------------------------- Backup your old opi_thumbnail.php. If you previously made some configuration change to the old one, do similar changes to this new opi_thumbnail.php. Upload the new opi_thumbnail.php. @zaenal