Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra Images Contrib


php_punk

Recommended Posts

Hi all, the site I'm working on requires more than one image; an example is for an awning, I need to show it open and closed.

 

I have seen a contrib called extra images, the instructions have been translated from Portuguese to English, I can follow the instructions, but if I can get this contrib installed I would like to rewrite the instructions to help more people understand how to install.

 

If anyone has this contrib installed and working can you post a link showing it.

 

The trouble I am having is the on the the second step. I don't know where or how to import the sql file or alternatively where to add the code! or even if I actually have to...

 

here are the instructions:

 

1 STEP: This makes sense backing up is good

 

BACKUP: Back of its archives before installing any contribution always makes one or making some alteration in the store.

 

2 STEP: Ok now I'm totally lost! what do i do with this bit? Import extra_images_english.sql to where?

 

It adds table SQL below in its data base:

 

 

DROP TABLE IF EXISTS products_extra_images;

CREATE TABLE products_extra_images (

products_extra_images_id int(11) NOT NULL auto_increment,

products_id int(11) default NULL,

products_extra_image varchar(64) default NULL,

KEY products_extra_images_id (products_extra_images_id)

) TYPE=MyISAM;

 

INSERT INTO configuration VALUES ('', 'Display Extra images (on products_info)', 'DISPLAY_EXTRA_IMAGES', 'true', 'Display Extra images', 1, 87, '2005-11-17 17:20:36', '2005-10-20 17:40:05', '', 'tep_cfg_select_option(array(\'false\', \'true\'),');

 

( Or import the SQL file extra_images_english.sql )

 

 

3 STEP: Ok now we are talking on my level, I understand this.

 

Opens the archive admin/includes/languages/english.php and adds to the codes below before last ?> :

 

define('BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES','extra images');

define('TEXT_PAGING_FORMAT','Page');

define('TEXT_PRODUCTS','Product');

 

 

4 STEP: I understand this.

 

Opens the /admin/includes/filenames.php And add archive the code below in the end of the archive, before the last ?>:

 

define('FILENAME_PRODUCTS_EXTRA_IMAGES','products_extra_images.php');

 

 

5 STEP: I understand this.

 

Opens the /admin/includes/database_tables.php.Add the code below in the end of the archive, before the last ?> :

 

define('TABLE_PRODUCTS_EXTRA_IMAGES', 'products_extra_images');

 

 

6 STEP: I understand this.

 

It opens the /admin/includes/boxes/catalog.php.Find in archive below for the code:

 

 

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

 

 

And add below: I am assuming they mean add below the statement above

 

 

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_IMAGES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES . '</a><br>' . //Extra images

 

 

7 STEP: I understand this.

 

Add the cod below in catalog/includes/languages/english.php:

 

 

define('BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES','Extra Images'); //Extra images

 

 

8 STEP: I understand this 'loja' is portuguese for store/shop

 

 

Opens the /loja/includes/filenames.php and add the code below in the end of the archive, before the last ?>

 

9 STEP: I understand this 'loja' is portuguese for store/shop

 

Opens the /loja/includes/database_tables.php and add the code below in the end of the archive, before the last ?> :

 

define('TABLE_PRODUCTS_EXTRA_IMAGES', 'products_extra_images');

 

 

10 STEP I understand this 'loja' is portuguese for store/shop

 

 

It opens the /loja/product_info.php archive and it looks the code below:

 

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

 

 

Add below: I am assuming they mean add below the statement above

 

 

 

if (DISPLAY_EXTRA_IMAGES == 'true'){

if ($product_check['total'] >= 1) {

include (DIR_WS_INCLUDES . 'products_extra_images.php');

}

}

 

end

This looks like a good contrib and would solve my problem nicely, but, If you know of an alternative that can display at least 3 images and has clearer instructions, please let me know.

 

But i would still like to clarify these instructions to help everyone else.

 

Cheers Lee

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

Seems a lot of people are interested in this post but no assistance Hmmm!

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

After a bit of reading, importing the .sql info is possibly done with phpmyadmin, well this is the impression I'm getting all I have to do now is find out how?

 

If anyone can help with regards to this I be grateful.

 

Just making backups of all the files.

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

Hi all, another step closer...

 

I have worked out how to get to myphpadmin and consequently import the .sql files. Apparently my server uses cpanel and you can login into cpanel in a few different ways. There is secure ssl login and regular login, both require a user name and password.

 

I was helped along by terrielee, when he showed me how he logs into cpanel, unfortunately that didn't work for me but it was close to what i needed to do, so, I searched for the cpanel website and found the info required.

 

Terrielee's suggestion is actually correct, but there is more than one way to access the cpanel software. Below is the method terrielee suggested and then the one that worked for me:

  • www.your domain/cpanel <-- terrielee's suggestion
  • http://your domain/2082 <-- This one worked for me

This is a quote from a cpanel newbie guide, you can find the complete guide here: cpanel newbie guide

Login to WHM Login to Cpanel

You need to login to your box right well here are a few things to help you. SSL logins are highly recommended for security - please see our Force SSL logins in the Cpanel Tutorials for more details.

 

* WHM

- Secure SSL https://sitename.com:2087

Notice: Root user should only ever login using the secure HTTPS login!

- Regular http://sitename.com:2086 and http://yourdomain.com/whm

* Cpanel

- Secure SSL https://sitename.com:2083

- Regular http://sitename.com:2082 and http://yourdomain.com/cpanel

* Webmail

- Secure SSL https://domain.com:2096

- Regular http://domain.com:2095 and http://yourdomain.com/webmail

 

here is the post i started: my other post cross-referenced

 

regards Lee

Edited by php_punk

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

Hi all, back again, I have successfully installed the extra images 1.6.1 contribution. the instructions for this are very good and it has an html page with steps in a table and a check box at the side of each step to tick so you know you have done that step.

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

Hi, Basically it places a centred box at the bottom of the products page with the title Extra images also centred.

 

One thing I have noticed re the pop windows, is that it didn't fit the image and cropped some of the image from view. I fixed this by opening the popup_extra_images.php and editing this code:

<script language="javascript"><!--
var i=0;
function resize() {
if (navigator.appName == 'Netscape') i=40;
if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
self.focus();
}
//--></SCRIPT>

where it says height+60-i); change the 60 to 120

 

I also edited the popup_images.php file doing the same thing as above. the code is near line 29

 

extra images I have just added a placeholder graphic for now to show you how it would look.

 

I find the adding of images a bit clumsy but once you have done it a few times it is easier.

 

regards Lee

Edited by php_punk

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

thanks Lee, im looking for an image contribtuion that will allow me to have thumbnails underneath the main picture, have you seen anything like that before?

 

and... How do you think 'Extra Images' compares with the other image contributions that are about, have you tried any of the others?

Link to comment
Share on other sites

Hi all, the site I'm working on requires more than one image; an example is for an awning, I need to show it open and closed.

 

I have seen a contrib called extra images, the instructions have been translated from Portuguese to English, I can follow the instructions, but if I can get this contrib installed I would like to rewrite the instructions to help more people understand how to install.

 

If anyone has this contrib installed and working can you post a link showing it.

 

The trouble I am having is the on the the second step. I don't know where or how to import the sql file or alternatively where to add the code! or even if I actually have to...

 

here are the instructions:

 

This looks like a good contrib and would solve my problem nicely, but, If you know of an alternative that can display at least 3 images and has clearer instructions, please let me know.

 

But i would still like to clarify these instructions to help everyone else.

 

Cheers Lee

 

 

 

What did you add in step 8 Lee I don't see any code ???

 

8º STEP

 

Opens the /loja/includes/filenames.php and add the code below in the end of the archive, before the last ?>

 

 

Jerry

Link to comment
Share on other sites

thanks Lee, im looking for an image contribtuion that will allow me to have thumbnails underneath the main picture, have you seen anything like that before?

 

and... How do you think 'Extra Images' compares with the other image contributions that are about, have you tried any of the others?

 

A really good image Contrib is Additional Images 2.0.0 It has about 3 or 4 different layout options for your images, I am about to reinstall this once I finsh with my STS modifications.

 

Link to contrib http://www.oscommerce.com/community/contributions,1032/

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

I tried Additional Images although because you needed to use a file compare program I had quite a few problems installig it because my store was already so heavily modded although it does look like it will do what i want it to.. hmmm

Link to comment
Share on other sites

Hi guys, sorry I haven't replied sooner only I've been a bit busy re work, always the same nothing for weeks then you get loads and everyone wants it NOW! lol!

 

Ok...

 

Benjjj: This is the only extra images contrib I have tried so i'm afraid I can't compare it to any others. Having said that, I think 'extra Images' functions well, albeit lacking a more user friendly add page. I have found a lot of these contribs pay more attention to functionality and lack the 'user friendly' front end. I wish I knew how to program in php as i could create some very nice contribs that are user friendly and functional. I really can't understand why a lot of the contribs have to go off the screen to the right, so you are forever scrolling sideways. It makes more sense to scroll down - its more natural, a point in case is the Product/Attributes page. I can see why it was done the way it was but it just looks messy, it really frustrates me to see it and not be able to alter it so it looks better and has a flow to it. The same goes for the 'extra images' contrib. If; when adding images, you use images any bigger than 320x120 the screen really gets messed up, the end result looks good but the back end where all the images are starts to look messy. Overall I'd give it a 7/10 I've marked it down because of the poor GUI The good part is the documentation, excellent, it could do with a few updates but overall I'd give the instructions a 8/10.

 

jerryzs: Step 8: is:

 

/catalog/product_info.php <-- we need to edit this file

 

Look for:

<td align="center" class="smallText"><?php echo  sprintf(TEXT_DATE_ADDED,  tep_date_long($product_info['products_date_added'])); ?></td>
  </tr>
  <?php
  }
  ?>

and add this code after it

<?
	 if (DISPLAY_EXTRA_IMAGES == 'true'){
  if ($product_check['total'] >= 1) {
  include (DIR_WS_INCLUDES . 'products_extra_images.php');
  }
  } 
  ?>

I have taken this from the index.htm instruction page that comes with the contrib

 

Regards Lee

 

Ps: I'll be back on tomorrow night (UK time)

[Based in UK] oscommerce: 2.2-MS2 | php version: 4.4.7 (zend: 1.3.0) | http server: apache/1.3.37 |

server os: Linux 2.6.15-1.2054_FC5 | Database: MySQL 4.1.22-standard

 

Link to comment
Share on other sites

  • 2 weeks later...

I just tested this contrib.

 

Its certainly the best looking on the frontend. Very clean & tidy. However the backind is a mess. It would be so much better to be able to upload/edit/delete the extra images on the same form that you create the product with catalog/admin/categories.php

Having the separate "extra images" page in admin becomes an endless game of scrolling & searching.

 

On the whole though, its the frontend that matters & this contrib looks & functions the best for my store, so many thanks!

Link to comment
Share on other sites

I just tested this contrib.

 

Its certainly the best looking on the frontend. Very clean & tidy. However the backind is a mess. It would be so much better to be able to upload/edit/delete the extra images on the same form that you create the product with catalog/admin/categories.php

Having the separate "extra images" page in admin becomes an endless game of scrolling & searching.

 

On the whole though, its the frontend that matters & this contrib looks & functions the best for my store, so many thanks!

 

I just tested myself. I need to overcome some drawbacks though

 

1- Both in extra images section and regular catalog section the pictures are in their original sizes (800x500 pixels). Especially in extra images section it is filling everywhere and since I have at least 300 extra images its a big hassle. I have to find a way to make them somewhere around 80x60.. It says that they overcome this issue but they did not..

 

2- I don't need 3 languages. Only English is enough for me.. I need to find a way to eliminate other 2. Because each picture I am putting is displayed 3 times to suport the 3 languages..

 

Since I am an amateur, I am open to all kind of suggestions..

spam, spam, spam

Link to comment
Share on other sites

I just tested myself. I need to overcome some drawbacks though

 

1- Both in extra images section and regular catalog section the pictures are in their original sizes (800x500 pixels). Especially in extra images section it is filling everywhere and since I have at least 300 extra images its a big hassle. I have to find a way to make them somewhere around 80x60.. It says that they overcome this issue but they did not..

 

2- I don't need 3 languages. Only English is enough for me.. I need to find a way to eliminate other 2. Because each picture I am putting is displayed 3 times to suport the 3 languages..

 

Since I am an amateur, I am open to all kind of suggestions..

 

 

I installed this contrib, then when I attempt to upload some images via the Extra Images that's now in my Admin panel I get this:

 

Warning: reset(): Passed variable is not an array or object in /home/content/q/u/i/quicksale/html/online/catalog/admin/includes/functions/database.php on line 55

Warning: Variable passed to each() is not an array or object in /home/content/q/u/i/quicksale/html/online/catalog/admin/includes/functions/database.php on line 58

Warning: reset(): Passed variable is not an array or object in /home/content/q/u/i/quicksale/html/online/catalog/admin/includes/functions/database.php on line 62

Warning: Variable passed to each() is not an array or object in /home/content/q/u/i/quicksale/html/online/catalog/admin/includes/functions/database.php on line 63
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') values)' at line 1

insert into products_extra_images) values)

[TEP STOP]

 

I updated the database with the sql file and it said it properly ran 3 queries.

Link to comment
Share on other sites

  • 2 weeks later...

I just installed this contribution.

 

I think the best version to install is "Extra Images - v 1.6.1 (Complete Package)" together with "Bug Fix For v-1.6.1 (update instruction only)".

 

I have one thing I would like to see different :

 

The contribution says : "Added a onMouseOver event for the images shown (extra images) so that the main image would change when someone hovers the mouse over the extra images. This requires a change in catalog/product_info.php".

 

I don't want a onMouseOver event for the images shown. Just a popup window will do for me.

 

The code that had to change is this :

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="prodimg"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="prodimg"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

I tried to remove the piece of code "name="prodimg" twice, and that works ... I have no onMouseOver event, but I do have an error in my Internet Explorer.

 

Can anyone help me try fixing this ??

Link to comment
Share on other sites

  • 2 months later...

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