Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2


surfalot

Recommended Posts

  • Replies 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

Well the header error images seem to have disappeared.

 

I painstakingly found the bits of morepics code I was missing in my master products code thru a combination of beyond compare and the find function in notepad.

 

Everything seems to be working fine now except that if an image is not uploaded into the image field the page shows the tag as part of the page

 

ie. if no image is loaded for subimage4 instead of there being nothing the page shows $subimage4

Link to comment
Share on other sites

Just installed More pics 6.1, but do not seem to do well... After clicking a picture on the first page:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /usr/home/web25920/domains/site.se/public_html/includes/header.php:86) in /usr/home/web25920/domains/site.se/public_html/includes/boxes/categories.php on line 13

 

#SQL database modification ran without problems

#More pics shows up under Configuration and looks good

 

What I have not done yet is this:

 

**********

Step: 5

**********

 

Adjust the size and color in the catalog/popup_image.php File

to match the popup window of your online store.

 

You can find the color to change by searching for #666666 in

catalog/popup_image.php. that line has the <hr> tag you can

modify the size="" (width of the line) and the color="#666666"

(color of the divider line)

 

...as what to do was not really clear to me, but is this likely to explain the "fatal error"?

 

Other contributions installed:

Easy Populate 2.76

Low stock report 2.0

Removed installation of "On the fly auto thumbnails" prior to "More pics 6.1"

 

Any ideas about what to check?

Edited by Gnarpjohan
Link to comment
Share on other sites

I would say that first stop in any contrib is to check admin/categories.php

 

Doesn't seem to be the problem at first glance, the only difference between the categories.php modified by More pics and the previous file is the additions by More pics. Will continue to compare files...

Link to comment
Share on other sites

I ran that sql and recieved an error message that says, ERROR "SQL query:

 

ALTER TABLE `products` DROP `products_subimage1`" What on earth could that be and how can I fix it....???

 

if `products_subimage1` didn't get added to your products table, ignore that part. Just run this.

 

DELETE FROM `configuration` WHERE `configuration_group_id` = 6124;

Link to comment
Share on other sites

Just installed More pics 6.1, but do not seem to do well... After clicking a picture on the first page:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /usr/home/web25920/domains/site.se/public_html/v) in /usr/home/web25920/domains/site.se/public_html/includes/boxes/categories.php on line 13

 

Any ideas about what to check?

Hmm, that's interesting since tep_show_category() is not added by this contrib. A quick search of the original osC code shows that it is defined in /includes/boxes/categories.php and not includes/header.php.

 

So if I were you, remove the function from includes/header.php starting on line 86

Link to comment
Share on other sites

  • 2 weeks later...

Hi There,

Just ran the SQL query and it ran ok, but now in my admin section i have a lot of errors that read:

 

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 '-8, 8' at line 1

 

select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -8, 8

 

The later part of the error chnages depending on what section i'm in. It's not all of the pages but there are about 8.

 

Also, if i try to restore my database backup i get this error:

 

Invalid default value for 'additional_images_id'.

 

Query: CREATE TABLE additional_images ( additional_images_id int(11) DEFAULT '' NOT NULL auto_increment, products_id int(11) DEFAULT '0' NOT NULL , images_description varchar(255) , medium_images varchar(64) , popup_images varchar(64) , PRIMARY KEY (additional_images_id,products_id) )

 

I'm a bit up the creek without a paddle.

 

Any help is massively appreciated.

 

Cheers,

 

Pat

Edited by patbegg
Link to comment
Share on other sites

Hi There,

Just ran the SQL query and it ran ok, but now in my admin section i have a lot of errors that read:

 

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 '-8, 8' at line 1

 

select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -8, 8

 

The later part of the error chnages depending on what section i'm in. It's not all of the pages but there are about 8.

 

Also, if i try to restore my database backup i get this error:

 

Although it may appear to have happened when including this contrib, I believe it is related to another issue. I'm betting you have not installed the 051113 security patch for osCommerce MS2. (link)

 

I believe this is fixed on line 67 of catalog/includes/classes/split_page_results.php and line 38 of catalog/admin/includes/classes/split_page_results.php

 

This is a problem that developed from a newer version of PHP. Maybe your host upgraded your PHP recently and didn't tell you.

 

Also, if i try to restore my database backup i get this error:

 

It won't hurt anything to have the database changes in your database (with or without the code changes). Rerun the SQL if you have already modified your code.

Link to comment
Share on other sites

Although it may appear to have happened when including this contrib, I believe it is related to another issue. I'm betting you have not installed the 051113 security patch for osCommerce MS2. (link)

 

I believe this is fixed on line 67 of catalog/includes/classes/split_page_results.php and line 38 of catalog/admin/includes/classes/split_page_results.php

 

This is a problem that developed from a newer version of PHP. Maybe your host upgraded your PHP recently and didn't tell you.

It won't hurt anything to have the database changes in your database (with or without the code changes). Rerun the SQL if you have already modified your code.

 

Hi Todd thanks for the rapid response. I have installed the security patch but still no joy im afraid. You mention some fixes to 'split_page_results.php', do you know what needs to be changed at all to these pages?

 

I backed up my SQL database by dumping it, not using the store backup tool. I am getting the error i mentioned before when i try to run the SQL dump file. IS it worth me sending the SQL file for you to look at?

 

Thanks for your help - really can't face a clean install!

 

Cheers,

Pat

Link to comment
Share on other sites

Hi Todd,

Ignore all that last one, i've got it sussed i think - slight error on the splitpage changes i made, i've done it properly now and all seems fine.

 

Massive relief!

 

Cheers,

Pat

Link to comment
Share on other sites

Hi surfalot, thanks for this excellent contrib.

 

I installed more pics 6v1.2. It works fine, but I would like to open a large image when pressing "click to enlarge".

 

The current problem is that the first popup displays the one that I uploaded in "products Image" field and which is a thumbnail size. So, I want to bypass this step so that the first popup displays directly "products Image1" which is a large image.

 

Any help on this? I cannot find a solution.

Thanks in advance.

Link to comment
Share on other sites

The solution is already built into this contribution. see the more_pics_6_thumbnail_option_quickfix.txt file in the contribution package.

 

The contribution is designed to provide additional product photos in the manner that the original osCommerce is setup. That is, you setup and upload full sized images and the osCommerce code shrinks the images for the areas that require thumbnails. This, of course, is not ideal since the thumbnails are not good quality. That is why there are several "3 image" contributions available that allow 3 different (presized) images per product photo.

Link to comment
Share on other sites

How to install more_pics (admin/includes/functions/general.php)???

 

Hi, I want to install your contribution.

Since I installed other contributions, I try to compare the files and do the appropriate changes.

In the admin/includes/functions/general.php it is not possible, because (beyond compare) marks everything red. I did lots of changes before, so I would appreciate it, if you could comment the areas in admin/includes/functions/general.php where you changed the code for the more_img cont.

 

thanks i advance.

Link to comment
Share on other sites

How to install more_pics (admin/includes/functions/general.php)???

 

Hi, I want to install your contribution.

Since I installed other contributions, I try to compare the files and do the appropriate changes.

In the admin/includes/functions/general.php it is not possible, because (beyond compare) marks everything red. I did lots of changes before, so I would appreciate it, if you could comment the areas in admin/includes/functions/general.php where you changed the code for the more_img cont.

 

thanks i advance.

 

sorry for the question - found the comments - never mind everything works great;-))

Link to comment
Share on other sites

not sure what you mean. is the More Pics additional images uploading to a place other then the original osCommerce image? they should be going to the image location defined in the configure.php file.

Link to comment
Share on other sites

Can anyone tell me how to limit the size of the images in pop up box.

The best thing to do is only upload large images that aren't too big. resizing images through html presents poor quality images. but you can try this.

 

find in popup_image.php:

 

$img = DIR_WS_IMAGES . $insert;
echo '<tr><td align="center"><img src="' . $img . '"></td>';

 

replace with:

 

$max_width=0;
$max_height=0;
$img = DIR_WS_IMAGES . $insert;
list($width, $height, $type, $attr) = getimagesize($img);
if ($max_width!=0 && $max_width<$width && $max_height!=0 && $max_height<$height) {
 if (($max_width-$width)>($max_height-$height)) {
$width = $max_width;
$height = 0;
 } else {
$width = 0;
$height = $max_height;
 }
} elseif ($max_width!=0 && intval($max_width)<$width) {
 $width = $max_width;
 $height = 0;
} elseif ($max_height!=0 && intval($max_height)<$height) {
 $width = 0;
 $height = $max_height;
}
echo '<tr><td align="center"><img src="' . $img . '"' . (($width!=0)?' width="'.$width.'"':'') . (($height!=0)?' height="'.$height.'"':'') . '></td>';

 

Was written on the fly, and not tested. This should maintain proportions. Hope it helps.

 

change $max_width=0 & $max_height=0 to the maximum you need.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, very easy to install, thank you!

 

Anyone gotten the main popup image to work with imagemagic? If I replace the popup_image.php Imagemagic will work. Just need to know how to modify the popup_image.php for both to work.

 

**** nevermind, found the download :-"

 

thanks,

 

Sparks

Edited by sparks
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...