Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] UltraPics v1.0 - Addition Image Pac


Guest

Recommended Posts

First off, just want to thank you for creating an awesome product. Works like a charm for me, and my client loves the new functionality.

 

The only problem I am having so far is that when my client tries to launch the Image Manger window, it isn't popping up with the full (popup) window (for instance, he can't see the browse button that would allow him to search for a new image to upload.) I've tested it out on 10 different machines in my office, and they all work fine. I can probably just make the winder re-sizable, but I was hoping their may be a more permanant solution.

 

Thanks for any help.

In my case the cancel button wasnt visible.

 

Then I modified this part in admin/htmlarea/popups/insert_image.html:

 

// adapt dialog height to skipped elements when in InsertImageURL-mode

if(config.InsertImageURL) document.all.tags("html")[0].style.height='450px';

// --></script>

 

to height: 470.

Link to comment
Share on other sites

  • Replies 375
  • Created
  • Last Reply

Top Posters In This Topic

Ok, sorry all for me being an idiot. Had I taken the time to completely read all documentation on it, including this forums first page I would have quickly discovered the files that are needed to change are few and easy to change.

 

Once I compared the files with beyond compared and only copied the code marked by MaxiDVD I was able to quickly implement it. I ran into a short problem with the product_info.php file but quickly realized that I simply needed to edit the template file in the template directory instead of the copy under the catalog. This is because of a templating system that came with OSC-MAX 1.5. So other than that and a quick edit of the SQL file to comment out the first insert field I was in business.

 

One problem I ran into is the SQL upload created several duplicates in the database and therefore also in the admin menus. Deleting these quickly fixed that problem.

 

Finally, the last thing I had to do was disable the "Enable PHP image manager" option in the "image" section of the admin panel. Once that was done I stopped getting these "inserturlimg button" error messages when loading the new product page. I think this has to do with netpbm. I probably need to do something else. But also by disabling this option it gives me browse buttons to add the images, when before it didn't.

 

I have one last problem with this that I am unsure how to resolve. Since my father will be using it I will have to keep it as simple as possible for him.

I noticed that when you hit the "preview" button it will immediately list some errors at the top of the page... " Warning: No file uploaded." for every image field not utilized. Well we will be using a varying amount of images per item and I wan't to know if there is a way to disable this message for fields that are unused. That would be extremely helpful. This error even occurs when you just edit a product.

 

Any ideas???

 

Thanks,

Patrick

 

P.S. I think its kickass how it will delete the image for you, even when you delete the product.

Link to comment
Share on other sites

I noticed that when you hit the "preview" button it will immediately list some errors at the top of the page... " Warning: No file uploaded." for every image field not utilized. Well we will be using a varying amount of images per item and I wan't to know if there is a way to disable this message for fields that are unused. That would be extremely helpful. This error even occurs when you just edit a product.

 

Several pages before there was an anwer. You need to comment out a few lines.

Link to comment
Share on other sites

Thanks, I found that and it works fine. So it is now up and running. Now its time to start learning about the look and feel of the site. Until we meet again...

 

(Watch for upgrades and great new tech help pages that will be appearing by Mid-October at www.phatgod.com)

 

 

Sincerely,

Patrick

Link to comment
Share on other sites

I dont have a clue!

 

BlueNoteMKVI sent me his categories.php cos he have a special one. We both have Master Products MS2 installed. On this link (from Master Products MS2 forum) you can see my other big problem. I have a duplicated product list.

 

I can send you my categories.php if you have time to check it.

Link to comment
Share on other sites

Try comparing the packaged categories.php file with the one that you had before you changed yours for this contrib.

 

The compare utility I use is called Beyond Compare 2.

Get it at: http://www.scootersoftware.com/

 

This utility makes comparing the files very easy, you have to use it to understand.

That is how I made it work. And I only copied the sections noted by the author as modified.

 

-Patrick

Link to comment
Share on other sites

  • 2 weeks later...
Try comparing the packaged categories.php file with the one that you had before you changed yours for this contrib.

 

The compare utility I use is called Beyond Compare 2.

Get it at: http://www.scootersoftware.com/

 

This utility makes comparing the files very easy, you have to use it to understand.

That is how I made it work. And I only copied the sections noted by the author as modified.

 

-Patrick

Funny! If you go back a little in this topic you can see that I was the one who proposed this compare tool to you. :-"

See here: post

Link to comment
Share on other sites

  • 3 weeks later...

Has anyone changed the image store path for the extra images? By default any extra images are stored in catalog/images/. But i want to store the extra images in a subfolder e.g. catalog/images/Extra_Products_Images/

I noticed in admin/categories.php

  if (($HTTP_POST_VARS['unlink_image_xl_2'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_2'] == 'yes')) {

        $products_image_xl_2 = '';

        $products_image_xl_2_name = '';

        } else {

        $products_image_xl_2 = new upload('products_image_xl_2');

        $products_image_xl_2->set_destination(DIR_FS_CATALOG_IMAGES);

        if ($products_image_xl_2->parse() && $products_image_xl_2->save()) {

          $products_image_xl_2_name = $products_image_xl_2->filename;

        } else {

          $products_image_xl_2_name = (isset($HTTP_POST_VARS['products_previous_image_xl_2']) ? $HTTP_POST_VARS['products_previous_image_xl_2'] : '');

        }

        }

Ive tried changing the destination from

        $products_image_xl_2->set_destination(DIR_FS_CATALOG_IMAGES);

to

        $products_image_xl_2->set_destination(DIR_FS_CATALOG_IMAGES . 'images/Extra_Products_Images/');

And have also tried creating a new image class DIR_FS_CATALOG_IMAGES_LARGE & using this instead & adding this to admin/configure.php as

  define('DIR_FS_CATALOG_IMAGES_LARGE', DIR_WS_CATALOG . 'images/Extra_Products_Images/');

But neither of these attempts have worked as the images still go into catalog/images

Any ideas ?

Link to comment
Share on other sites

I just installed Ultrapics (10 March 2004 - Revised Package) to my osCommerce 2.2MS2. No other modules installed.

 

Im having problem with images not displaying on the admins preview page (and also on the client (public) pages). The image directory URL is being appeded to the URL of the inserted image. Here is a sample...

 

"http://www.mywebsite.com/catalog/images/case/283_rja.jpg"'>http://www.mywebsite.com/catalog/images/http://www.mywebsite.com/catalog/images/case/283_rja.jpg"

 

The correct URL of the image should be "http://www.mywebsite.com/catalog/images/case/283_rja.jpg" for it to display properly. I tried a manual workaround by removing "http://www.mywebsite.com/catalog/image/" after inserting the image and it worked.

 

I think this is a configuration problem. Before installing ultrapics, all images were displayed properly. Any help will be highly appreciated.

Edited by und3rdawg
Link to comment
Share on other sites

I have solved my problem mentioned above.

 

Problem: URL of product image contains redundant image root directory causing the image not displayed properly.

 

example:

"http://www.mywebsite.com/catalog/images/http://www.mywebsite.com/catalog/images/case/283_rja.jpg"

 

Cause: When OscImageRoot variable is passed from categories.php to insert_image.html, the variable is empty causing the image root directory not properly eliminated from the filename (lines 185~ of /admin/htmlarea/popups/insert_image.html). This is because the line below is not working properly (see admin/categories.php line 1270~)

ultra_image.OscImageRoot = '<?= trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) ?>';

 

Solution: Replace the line with this one:

ultra_image.OscImageRoot = "<?php echo trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) ?>";

 

The OscImageRoot variable occurs 3 times in categories.php. You can find them between lines 1270~1300

 

 

Another method is to directly assign the image directory

ultra_image.OscImageRoot = "http://www.mywebsite.com/catalog/images"

 

But the first method works better for me. B)

Link to comment
Share on other sites

  • 2 weeks later...

So heres one problem not talked about:

 

I want to add more than the standard 8 images Ultra Pics allows.

Now I assumed this would be easy. Just take modified code and duplicate the parts

for the number of images I want. In this case it's 12. I did this and everything looks fine. In both the Admin adn Catalog secitons. Except for the fact that the new additions link to the first 6 XL images. Now sense tells me that this would mean I would have a whole list of code going: (not actual code just ref.)

sm_9 blah blah = xl_3, instead of sm_9 blah blah = xl_9

 

I have triple checkd the files. I can't find anything. So I am here.

Does anyone know the EXACT bit of code that controls the actual link to the large image? IE can you make it so say sm_5 goes to xl_2 etc ?

Link to comment
Share on other sites

Hello,

 

When running the SQL text-file, I get an error:

SQL-query:

 

# NEW RECORDS FOR: WYSIWYG HTML AREA 1.7 and ULTRA IMAGES for MS2

# HTML_WYSIWYG_SQL.sql

# Created by: MaxiDVD www.maxidvd.com.au

INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES (

 

'112', 'WYSIWYG Editor 1.7', 'HTMLArea 1.7 Options', '15', '1'

)

MySQL said: 

 

#1062 - Duplicate entry '112' for key 1

 

Please help.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi,

 

Once I've entered my database, using phpMyAdmin, do I add the statement right away, by clicking the SQL tab? Or do I enter one of the table properties, and add the statement in there ?

 

If you are referring to your previous post, then click on the SQL tab, and paste this in the box.

 

select * from configuration_group where configuration_group_id = 112;

 

and you should get these values:

 

'112', 'WYSIWYG Editor 1.7', 'HTMLArea 1.7 Options', '15', '1'

 

If you do, then the row is already added, you do not need to worry about it.

 

Peter

Link to comment
Share on other sites

  • 4 weeks later...

Problem for Spiders.

 

I noticed I have lots of 404 NOT FOUND for requests like /catalog/images/x32.jpgℑ=0. Finally traced this down to a <noscript> tag around line 127 in products_info.php.

 

I am being spidered, hopefully by Google, and the <noscript> section is incorrectly putting this image=0 bit on the end. It's there for the benefit of the pop-up 'Click To Enlarge' window when Javascript is enabled.

<!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //-->
<?php
if ($product_info['products_image_med']!='') {
         $new_image = $product_info['products_image_med'];
         $image_width = MEDIUM_IMAGE_WIDTH;
         $image_height = MEDIUM_IMAGE_HEIGHT;
        } else {
         $new_image = $product_info['products_image'];
         $image_width = SMALL_IMAGE_WIDTH;
         $image_height = SMALL_IMAGE_HEIGHT;}?>
<script language="javascript"><!--
     document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>
<noscript>
     <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_med']) . '">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']) . ℑ=0', $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>
</noscript>
<!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->

 

I think the <noscript> bit should be like this:

<noscript>
<php>
$image = $product_info['products_image_lrg'];
if (!tep_not_null($image) { $image = $product_info['products_image_med'];}
if (!tep_not_null($image) { $image = $product_info['products_image'];}echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $image) . '">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>
</noscript>

 

Martin

Link to comment
Share on other sites

  • 5 weeks later...

I hope some one still monitors this thread, cuz I just installed

 

UltraPics - MS2 Image Addon Pack!

http://www.oscommerce.com/community/contributions,1642

 

 

and I have a small problem.

 

I love the mod, have used it on another site. but I didnt install it there.

 

My problem, is,, when adding or editing a product, It allows me to add:

 

Product Image

Bigger Image

Pop up image

 

plus the sm 1-6

and x. 1-6

 

i can browse and select them, click preview,, it states that they upload,, and showes them in the preview,, but when I save the product, the only image i get in the catalog, or in the product when i go back into it is the Product Image itself, the others are all blank,,

and in the catalog, i click to enlarge, and get just a smaller pic than was there in the first place.

 

Can someone shed some light on what i done wrong,,, and on the image size guidelines?

 

Thanks

Tom

Link to comment
Share on other sites

When i delete a product, the images doesn't get deleted. The images isn't used by other products.

 

I can manually delete the images from the product page without problems.

 

What is wrong?

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...