Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

David 1cog

Archived
  • Posts

    62
  • Joined

  • Last visited

Everything posted by David 1cog

  1. http://www.directplastics.com Well, everything was working fine but now the store owner reports he cannot upload images via Admin. I have no idea what could have changed to cause this - I haven't touched the code for several weeks. When an image is added to a product in Admin, click 'Preview', the image shows as broken: <img src="/images/" border="0" alt="20x1 Frame Packers (per 100)" title=" 20x1 Frame Packers (per 100) " width="100" height="75" align="right" hspace="5" vspace="5"> The image filename is not being populated. I tried adding an echo to categories.php: // copy image only if modified $products_image = new upload('products_image'); echo $products_image; This returns the word 'Object'. Should it not show the image filename??? I've uninstalled, reinstalled three times. Read this thread twice and none the wiser. Help or suggestions very welcome. :?
  2. Hopefully we won't have to wait too long before some of these essential contribs are added to the core - that would save a lot of work for a lot of people, especially the contributors. Thanks again.
  3. I wanted to create a new thread because the other threads are getting too big to be easily read, and phpBB doesn't display specific pages in a thread when searching - it's getting a nightmare trying to find info in the forums (hopefully the new forum system will help that). :oops: I didn't check carefully enough - looks like my client has added duplicate product models. Thanks for the reply.
  4. Oh well, it's nice to know I'm not alone. Hopefully Tim or Deborah can take a look....
  5. I've solved the problem by replacing: //echo tep_image($image, $products_values['products_name']); with echo '<img src="' . DIR_WS_IMAGES . $image_subdir . $products_values['products_image'] . '" />'; However, I would really like to work out why I have got to do this with 'Images Required = False' and no one else.
  6. http://www.directplastics.com/ I installed EasyPopulate successfully (???) and used it to populate the database for the above shop. Now when I download the complete tab-delimited file and make any changes (or no changes!) and then upload, EasyPopulate creates duplicates for some products. I haven't worked out why some products are duplicated and others are not. I've installed the latest version (2.61.2). Any suggestions?
  7. http://www.directplastics.com/ This problem isn't related to Image Resizer, but it's stopping it working. I have 'Image Required' set to 'false' in Admin so that broken images do not show for products that do not have images. With this set to 'false' the pop-up big image does not display, it justs opens an empty window. If I set 'Image Required' to 'true' everything works OK. I had the same problem using Dynamic MoPics and couldn't track down the problem. Could anyone suggest where to look for the cause of this? Thanks.
  8. The patent for GIFs expired in the US last month and will expire around the rest of the world over the next year (?), so there is no longer an issue with using them because of patent fees. PNG is unlikely to threaten GIFs until M$ provides full support for PNG in Windows IE (alpha transparency, etc.).
  9. Sorry Joshua, didn't spot that. I'll follow up with my hosting company. If they cannot enable GIF support is it possible to disable it in your mod? Thanks for your help and an excellent contribution.
  10. GD Support enabled GD Version bundled (2.0 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled Looks like I've got GDLIB 2 and that's what is selected in Admin. Could the problem be something else? I've run GDLIB with other scripts without problem in the past on this server and GDLIB2 supports GIFs (???). Big images problem now solved. :)
  11. FYI with echo turned on in popup_image.php, the image path is: /home/directpl/public_html//images/BIG_IMAGE_SUBDIR/fa65wg.jpg I guess BIG_IMAGE_SUBDIR is not being populated?
  12. http://www.directplastics.com/ Fatal error: Call to undefined function: imagegif() in /home/directpl/public_html/bigboss/includes/classes/upload.php on line 268 This was produced when attempting to add a GIF image to an existing product - JPEGs are OK. Also, the large image is not displaying when I click the thumbnail - it just shows the thumbnail version again.
  13. Hi Joshua Thanks for confirming that 'Images Required' should not have this effect - that's what I guessed. I thought it was something to do with tep_image, but the function hasn't changed for a long time and my code is identical to the last few releases: My code: // 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; } Although http://www.directplastics.com/ looks fairly standard I've changed quite a few lines of code, added bug fixes and a few contribs. I've probably screwed something up. :roll: It would be nice to fix this but all the important bits are working so I'm not too worried, but if you can think of any suggestions I'll be happy to hear them.
  14. I've worked out a fix to my problems (couple of posts up). To get big pictures working with 'Images Required' set to false I changed the following code in popup_image.php: From: echo tep_image($image, $products_values['products_name']); To: echo '<img src=' . $image_path . $image_base . $image_addon . $image_ext . ' />'; Not pretty but it works.
  15. The contrib will still work (i.e. provide additional pics) with the osC thumb code removed but there's no reason (?) to do that. Let the osC thumb code take care of displaying the standard thumb and Dynamic MoPics will display the large picture + additional pictures if required.
  16. The problem seems to be in the call to tep_image: html_ouput.php has function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } So either popup_image.php should be changed to display the image without using tep_image or the code for tep_image needs changing to somehow ignore IMAGE_REQUIRED for the popup. As a side note, setting 'Image Required' in Admin to 'false' has some unexpected / undesirable effects, e.g. the star images for Review rating are not displayed.
  17. It should be the standard code distributed with your mod. Here you go: <?php /* $Id: popup_image.php,v 1.16 2003/02/13 03:10:56 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'); $navigation->remove_current_page(); $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . $HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . $languages_id . "'"); $products_values = tep_db_fetch_array($products_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <title><?php echo $products_values['products_name']; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i=10; if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i); self.focus(); } //--></script> </head> <body onload="resize();"> <div align="center"> <a href="javascript:;" onclick="javascript:top.window.close();"> <?php if (MAIN_THUMB_IN_SUBDIR == true) { $thumb_len = strlen(IN_IMAGE_THUMBS); $thumbs = IN_IMAGE_THUMBS; } else { $thumb_len = 0; $thumbs = ''; } $image_base = substr($products_values['products_image'], $thumb_len, -4); // $image_ext = substr($products_values['products_image'], -4); $image_ext = '.'.BIG_IMAGE_TYPE; $image_path = DIR_WS_IMAGES . IN_IMAGE_BIGIMAGES; if (!$HTTP_GET_VARS['pic']) { $image_addon = BIG_PIC_EXT; } else { $image_addon = MORE_PICS_EXT.$HTTP_GET_VARS['pic']; } // if the big image isn't shown uncomment the next line, and check the path: // maybe you have to remove '/'. or adjust the path, depends on your configuration // echo DIR_FS_CATALOG.'/'.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image']; if (is_file(DIR_FS_CATALOG . $image_path . $image_base . $image_addon . $image_ext)) { $image = $image_path . $image_base . $image_addon . $image_ext; } else { if (!$HTTP_GET_VARS['pic']) { $image = DIR_WS_IMAGES . $thumbs . $image_base . $image_ext; } else { $image = DIR_WS_IMAGES . IN_IMAGE_THUMBS . $image_base . $image_addon . $image_ext; } } echo tep_image($image, $products_values['products_name']); ?> </a> </div> </body> </html> <?php require('includes/application_bottom.php'); ?>
  18. That's exactly what I did. I wonder if the installation instructions should be expanded to explain that the MOPICS function does not replace the osC one? OK, progress. So now the thumb is displayed as /images/aaa.jpg. However, when I click on the thumb the enlarge window is blank - unless I set 'Image Required' to 'true' in Admin (as mentioned before this isn't an option for me because I don't want broken images displayed for products that do not have images associated with them). With 'Image Required' set to true it works as expected and displays /images/products_big/aaa.jpg If this problem related to MoPics or is it an osC problem?
  19. Hi Joshua This is what is puzzling me - I have set the main thumb to be aaa.jpg in Admin (confirmed by looking at products_image in the database), but when I look at the image source for the thumbnail displayed in product_info it shows /images/products_small/aaa_pic1.jpg. However, the preview in Admin shows /images/aaa.jpg. This is a problem with Dynamic MoPics or the way I've installed it (done it three times now!)???
  20. Hi Yeah, that's right - but I've set MAIN_THUMB_IN_SUBDIR to false so it shouldn't be using 'products_small' and I don't know why it requires the _pic1' extension. I don't need extra images - just a thumbnail and a big image - the same as: http://www.playgroundforthemind.com/catalo...&products_id=41 and http://www.madmacgames.com/mac_game.php?na...&products_id=72 It works for them so there's gotta be a way. All I need is to have images/aaa.jpg - thumbnail image images/products_big/aaa.jpg - big image Easy? :?
  21. Thanks, James. I'll use that as a fallback, although it might be quite a bit of work to integrate that in to my modified categories.php, product_info.php, etc. I'd really like to get Dynamic MoPics working because it's easier for the store owner to add new products / images. It's working for other people so there must be an answer??? It's either my installtion of osC (snapshot 20030623 - all bug fixes applied to date) or I've screwed something up installing this mod. Hopefully someone has an answer.
  22. After many hours reading this thread and the instructions I still could not get Dynamic MoPics working. The thumb displayed in product_info but clicking on it produced an empty window. I eventually got it working by setting 'Image Required' to 'True' instead of 'False' in Admin. However, this isn't a solution for me because the catalog contains almost 1,000 products, many of which do not have images and some never will... so I don't want the shop covered with broken images. However, I still think there's something wrong with my installation of Dynamic MoPics: E.g. http://www.directplastics.com/product_info...products_id=880 define('IN_IMAGE_BIGIMAGES','products_big/'); //directory inside catalog/images where your big images are stored define('IN_IMAGE_THUMBS', 'products_small/'); //directory inside catalog/images where your mopic thumbs are stored define('MAIN_THUMB_IN_SUBDIR', false); //if you store your main thumb in the above directory set this true. if its in the main image dir, set it false define('THUMBS_PER_ROW', '4'); define('MORE_PICS_EXT', '_pic'); define('BIG_PIC_EXT', ''); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here. otherwise leave it blank define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...) define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif, bmp, png, etc...) Even though MAIN_THUMB_IN_SUBDIR is set to false, the thumb is displayed from /images/products_small/aaa_pic1.jpg. This isn't correct is it? It should be /images/aaa.jpg? Clicking on the thumb displays a blank window - as mentioned above I can make it work by setting 'Image Required' to 'True', but that is not an option for me. If someone could help out this time - especially Joshua - I'd very grateful. Thanks.
  23. Sod's Law: minutes after posting to the forum I see what I've done wrong... didn't copy one of the WP modules up to the server. [slaps side of head].
  24. Sorry - other info: osC = tep_snapshot-20030623 (most changes included from CVS to date) WorldPay = V4.0 - Version 1.4
  25. http://www.directplastics.com/ I've spent several hours reading the forums and can't find a solution to this one: I've successfully (?) installed WorldPay contrib (http://www.oscommerce.com/community/contri...ions,882/page,7). Everthing works perfectly in test mode, but when I return to the shop the item(s) that have been bought are still in the shopping cart / basket. I'm waiting to go live with this so any help very much appreciated.
×
×
  • Create New...