Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] OPI: OsC Product Image Module


Parikesit

Recommended Posts

 

Here the list of browsers that are supported "local image preview":

  • Chrome (versione 8 or higher)
  • Firefox (version 4 or higher)
  • Safari/WebKit (nightly build version)

You can find the info about it here: https://developer.mo...createObjectURL. And complete tutorial on a new way to handling upload field (files) is here: https://developer.mo...eb_applications (pure ajax upload)

 

 

Regarding OPI addon, I decided to use iframe instead of pure ajax upload because IE and some old browser will suffer. So, for users that use IE or lower version... don't worry, you still able to upload image except you can not preview your image before uploading.

 

 

Cheers,

@zaenal

 

I dont thinkt this workd, I cant upload pictures with IE.

See post above.. =)

Link to comment
Share on other sites

I'm using this addon for a few month and now I reached a BIG problem for my site...

 

In admin section when I edit product there is no picture show for that product. But in main categories/products listing I see picture.

So, If I changing some text of my prodtcs and click on SAVE, picture dissappear. If I upload new picture (but I can't do that for 1000 products) with OPI everything is OK.

 

Please HELP ASAP

 

thnx

J.

Link to comment
Share on other sites

Hello,

 

I'm trying to use this along with Easy Populate 2.77. I've gotten so far as to find the additional images in the Easy Populate .csv files under v_products_images that have been uploaded using the admin panel based product info editing page. Such as "image1.jpg,image2.jpg,image3.jpg" ...etc. If I add new pictures using the same format of newpicture1.jpg,newpicture2.jpg, etc that I've uploaded to the /images folder they don't appear. I've figured out that it's obviously not being computed by any of the scripts in the whole system, opi or osc. I've even looked at the php database under products_images and do not find the picture names listed there either. So my question is, can you code a script or something in the next release to be able to upload some pictures to an image folder, write the names and paths of the pictures into the .csv file for Easy Populate under v_products_images and have it display on the product info page?

Link to comment
Share on other sites

Oops, it looks like I didn't upload the edited 2.3.1 files. Looking at view source I can now see all of the images being scripted, BUT it points to a thumb directory that I don't have (I assume I need to use the admin product info panel to create those?) If I use Easy Populate and upload the files manually to my server, can I make it not use the thumb directory and instead use the normal /images directory? None of my images are showing up including the ones I put in using the normal admin product info panel method...

Link to comment
Share on other sites

I guess another option would be to have OPI and Easy Populate create a thumb in the thumbs/def/large/ directory upon .csv upload...ya?

 

But I think the thumbnails generates "on the fly" when they are loaded the first time in the catalog.

Try to remove your thumbs, then go to catalog and load your product again. Voila.. You have the thumbs again! :)

Link to comment
Share on other sites

  • 2 weeks later...

Just installed this contribution. Everything seems to be working on the admin side, but I am not getting any images in product_info.

 

My product images files are uploaded to catalog/images/(subdirectory)/file.jpg

 

I changed the relative path in the Configuration->Images to 'blank' instead of products

 

Do I need to change my opi_thumbnail.php file and / or any other files?

 

And if so, how? I'm not a php programmer, though I understand some of the language.

 

I have read through this forum, but I can't seem to find the same problem.

 

I am running OSC 2.3.1 and installed the latest version of OPI.

 

Thanks for any input you may have...

 

Varina

Link to comment
Share on other sites

Hi, forgive me but I've not combed through the previous posts to see if my question has been answered already. But can you please confirm that this addon is compatible with the products and the images I've already uploaded?

Link to comment
Share on other sites

 

Hi, I have a problem with this contribution.

 

Everything works fine except when I push the button Browse Server or Upload Image I see the screen below (in the attach) and..

 

Nothing is happing... It looks like it doesn't get connected.

 

I have tried everything. Can somebody help me with this.

 

Thanks.

 

Oscommerce 2.3.1. PHP 5.3

post-178579-0-27283300-1328713540_thumb.jpg

Edited by scubaworld
Link to comment
Share on other sites

  • 2 weeks later...

I desperately need someone's help. I've been testing OPI 1.0 on my local machine (using xampp) and was able to install and run it without any issues. However, now I've installed it on my live site and all of my previously uploaded pictures have disappeared, and when I go into the admin page to edit/add products, the OPI only displays the rotating circles (see attached image).

I installed it the same on my local machine (with xampp) as I did on my live website, but it doesn't seem to be working.

Note: My live website is on a linux server hosted by GoDaddy.

 

Any help would be greatly appreciated.

 

Thank you.

 

Sincerely,

Matt

post-308503-0-55037500-1330408208_thumb.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Ive gone over the install multiple times now and I get the same error.

 

My admin/categories.php is giving a blank page with : ()

 

Any ideas? Ive set permissions, added the code to htaccess..

Link to comment
Share on other sites

  • 4 weeks later...

ok, i got it.

 

awesome contrib

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

 

Edited by Pa

Link to comment
Share on other sites

  • 3 weeks later...

First of all - love this addon, great work!

 

But I have a few problems with it.

 

I have loaded all the images into my shop, they are displaying fine, and in admin side they are shown when selecting product:

http://screencast.com/t/MnwumJe0xv

 

but after some manipulation (either thumbnail cleanup or something) they are not shown in admins edit panel:

http://screencast.com/t/kHO7uUj6C8N

 

If I add new images, the old one is just not used anymore and is not displayed. Although I have no idea why - some of the old images are displayed correctly.

 

Second problem is opi_thumbnails.php is not reacting to any changes in configuration. I change this and that, but the thumbnails and the main images stay the same. Could this have to do with file permissions and opi_thumbnails not beeing able to overwrite old files? Is there a way to enable logging, so I can see what opi thumbnails did and where were the errors?

 

And the last problem - is it possible to make this plugin take the information from current database entry images, re-do the image and save the new image as well as new database input?

I am asking because I add my information with EasyPopulate through CSV file and I would love to state that image field is 1.jpg and then tell OPI - do the magic! and it would rewrite all files automatically? Otherwise there is a lot of manual click-click-click work involved.

Link to comment
Share on other sites

  • 2 weeks later...

Ive got a question... What if I want to watermark only select images? For example I have images that dont represent the actual product as packaging changes, suppliers change etc. So im placing a watermark via php over that image that says "Image May not Represent Actual Product". But i want to be able to select & save these items that need to render like this individualy. This may be to much to ask pertaining to coding but im thinking it may be as easy as adding an "if"/"else" statement and a checkbox that correlates to products description table in the database and renders either checked/unchecked on categories.php...action=edit. Any ideas?

Link to comment
Share on other sites

  • 4 weeks later...

I like the look of this addon but am having a few problems. Most have been answered, but the main one being, I use ie9 mainly and this does not seem to work. Is there a working work around for this.

 

Its a shame the writter of the code seems to have disapeared after such a promising start.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Having a slight problem -

 

Moved severs, all working fine except:

 

When browsing images on the server to add photos I can see all the first tier subdirectories but when i click on the subdirectory i just see whats in the products folder and not the subdirectory.

 

image attached

post-268503-0-99415100-1338456450_thumb.jpg

Link to comment
Share on other sites

Having a slight problem -

 

Moved severs, all working fine except:

 

When browsing images on the server to add photos I can see all the first tier subdirectories but when i click on the subdirectory i just see whats in the products folder and not the subdirectory.

 

image attached

 

FIXED - it was an jquery upgrade error, went from 1.4 to 1.7 and it didnt like it

Edited by OSC-Sevilla
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...