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

AWESOME CONTRIBUTION.....Just what I was looking for.

 

One quick question...I cehcked the output in other browsers and this seems to behave weird in Firefox.

 

No matter what setting I use on the table (sides, bottom, top) the extra images are all pushed to the right and hang over the right column. Works fine in IE and Opera. Is there a fix for this.

 

Thanks,

R

Link to comment
Share on other sites

  • Replies 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

AWESOME CONTRIBUTION.....Just what I was looking for.

 

One quick question...I cehcked the output in other browsers and this seems to behave weird in Firefox.

 

Rodrico

 

I use Firefox & use Explorer for testing and this contribution works fine on both. If the contribution works fine in other browsers, perhaps a starting point is your Firefox settings. Have you experienced any other contributions or OSC having a problem in Firefox before?

 

Sorry I cant give you any more help

 

Regards

 

Nossum

Link to comment
Share on other sites

Hi,

 

my english ist not good...

 

i use more pics 6 v1.2

 

bevore i install morepice i install categories images folder treeV1.2 and my pice want to save in a new ordner but more pics save the pice in ordner /images ...

 

what can i do that more pice save the pics in new ordner ?

 

 

i hope you can understand and help me,

 

thank you very much

Paul

Link to comment
Share on other sites

this should do it....

 

open \catalog\admin\categories.php

 

Find

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

Find

$products_subimage2->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage2->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

Find

$products_subimage3->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage3->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

Find

$products_subimage4->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage4->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

Find

$products_subimage5->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage5->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

Find

$products_subimage6->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage6->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

Link to comment
Share on other sites

this should do it....

 

open \catalog\admin\categories.php

 

Find

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

...

 

 

Hi i have test it but no effekt... sorry, that do not work

 

the subimage from more pics will save in image/

 

not in same ordner how the first image...

 

 

what can i change now ?

 

thank you very much

Link to comment
Share on other sites

hi,

 

to late to edit...

 

 

i have change the code

 

		$products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
	}

 

in this code:

 

$products_subimage1 = new upload('products_subimage1');
	// images categories
	$prod_path = $HTTP_GET_VARS['cPath'];
	$lchar = strrpos($prod_path, '_');
	if ($lchar + 1 == 1) {
	$lachar = 0;
	} else {
	$lachar = $lchar + 1;
	}
	$prod_path_id = substr($prod_path, $lachar);
	$prod_folder = tep_output_generated_category_path_fs($prod_path_id);
	$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES . $prod_folder);
// eof images categories
	if ($products_subimage1->parse() && $products_subimage1->save()) {
	  $products_subimage1_name = $products_subimage1->filename;
	} else {
	  $products_subimage1_name = (isset($HTTP_POST_VARS['products_previous_subimage1']) ? $HTTP_POST_VARS['products_previous_subimage1'] : '');
	}

 

now the pics will be save in same ordner because the image will not be display in admin men? and not in product_info.php ???

 

can someone help me to find the code that i must change to display the pic in admin and in product_info.php ?

 

 

thank you very much

Paul

Link to comment
Share on other sites

Hi,

 

please help me,

 

more pics save now in correct ordner (images/games/picture1.jpg)

 

i save the pictures with follow code:

 

// BOF: More Pics 6
	// copy subimage1 only if modified
	$products_subimage1 = new upload('products_subimage1');
	// images categories
	$prod_path = $HTTP_GET_VARS['cPath'];
	$lchar = strrpos($prod_path, '_');
	if ($lchar + 1 == 1) {
	$lachar = 0;
	} else {
	$lachar = $lchar + 1;
	}
	$prod_path_id = substr($prod_path, $lachar);
	$prod_folder = tep_output_generated_category_path_fs($prod_path_id);
	$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES . $prod_folder);
// eof images categories
	if ($products_subimage1->parse() && $products_subimage1->save()) {
	  $products_subimage1_name = $products_subimage1->filename;
	} else {
	  $products_subimage1_name = (isset($HTTP_POST_VARS['products_previous_subimage1']) ? $HTTP_POST_VARS['products_previous_subimage1'] : '');
	}

 

but the admin men?, product_info.php and popup_image.php search the picture in the wrong ordner (images/picture1.jpg)

 

which code must i change now that the admin men?, product_info.php and popup_image.php read the pic from images/games/picture1.jpg

 

 

with this code i save the first picture (bevore i install more pics)

 

// copy image only if modified
	$products_image = new upload('products_image');
// images categories
	$prod_path = $HTTP_GET_VARS['cPath'];
	$lchar = strrpos($prod_path, '_');
	if ($lchar + 1 == 1) {
	$lachar = 0;
	} else {
	$lachar = $lchar + 1;
	}
	$prod_path_id = substr($prod_path, $lachar);
	$prod_folder = tep_output_generated_category_path_fs($prod_path_id);
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES . $prod_folder);
// eof images categories
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	  $products_image_name2 = $prod_folder . $products_image->filename;
	} else {
	  //$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
$products_image_name2 = $HTTP_POST_VARS['products_previous_image'];
	}

 

this picture was correct in admin men?, product_info.php and popup_image.php

 

 

 

i have no idea, please help me, I despaired

 

 

thank you very much

Link to comment
Share on other sites

hi,

 

i have a new idea,

 

for Categories and Products Images Folder Tree V 1.2 i must run these two queries

 

ALTER TABLE categories CHANGE categories_image categories_image VARCHAR( 120 ) DEFAULT NULL;
ALTER TABLE products CHANGE products_image products_image VARCHAR( 120 ) DEFAULT NULL;

 

 

must i now add this one ?

 

 

ALTER TABLE products CHANGE products_subimage1 products_subimage1 VARCHAR( 120 ) DEFAULT NULL;

 

 

is that the missing detail to see the pictures ?

 

 

i hope someone can help me...

Link to comment
Share on other sites

hi,

 

i have a new idea,

 

for Categories and Products Images Folder Tree V 1.2 i must run these two queries

 

ALTER TABLE categories CHANGE categories_image categories_image VARCHAR( 120 ) DEFAULT NULL;
ALTER TABLE products CHANGE products_image products_image VARCHAR( 120 ) DEFAULT NULL;

must i now add this one ?

ALTER TABLE products CHANGE products_subimage1 products_subimage1 VARCHAR( 120 ) DEFAULT NULL;

is that the missing detail to see the pictures ?

i hope someone can help me...

 

hi,

 

that is not the way, the line was already in the database, with 64 varchar...

 

has someone the solution for me ?

Link to comment
Share on other sites

this should do it....

 

open \catalog\admin\categories.php

 

Find

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES);

 

change to

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES . tep_output_generated_category_path_fs($categories_id));

 

[/code]

 

Hi,

 

i have it !!! it works perfect !!!

 

i add under

$products_subimage1_name = $products_subimage1->filename;

 

this code:

$products_subimage1_name = tep_output_generated_category_path_fs($prod_path_id) . $products_subimage1_name;

 

now will the subimage save in new folder and display !!!

 

 

thank you very much !!! :D

Link to comment
Share on other sites

Thanks for the great contribution. I am having a problem with it for some reason. The popup is not working. I have STS 4.1 CCGV, installed, but these should not effect the popup. I do have javascript enabled, so you do not need to ask. Here is the code for the popup on the product_info.php page. Is there something wong here that I am not seeing? Thanks.

 

 

<script language="javascript"><!--
			document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\');
			//--></script>

-Trent

Link to comment
Share on other sites

Figured it out, the javascript had to be in the <head> of the STS template.

 

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

 

-Trent

Link to comment
Share on other sites

now will the subimage save in new folder and display !!!

thank you very much !!! :D

And thank you for reporting back what you did!! Sorry I couldn't help, been busy.

Link to comment
Share on other sites

Is there anyway to change the size of the parent image w/o affecting the size of the subimages??

 

I want my parent image to be larger, but I don't want it to be it's actual size (IE I want to force some restriction on it, but not within the realm of what the base osC offers) I would like to make the parent image it's own sub-category somehow....

 

Any ideas??

 

Rod

Link to comment
Share on other sites

Is there anyway to change the size of the parent image w/o affecting the size of the subimages??

 

I want my parent image to be larger, but I don't want it to be it's actual size (IE I want to force some restriction on it, but not within the realm of what the base osC offers) I would like to make the parent image it's own sub-category somehow....

 

Any ideas??

 

Rod

depends on how you have the More Pics settings. could be simple, could be difficult. please post the setting from the Admin -> Configuration -> More Pics.

Link to comment
Share on other sites

I have a template driven website I have moded somewhat already all is working fine. I just installed the More_pics_6 v1.2 For osC 2.2 MS2 mod. All seems ok on admin side, I see the more pics option in configuration. I however have issues with the Product_info.php file I have used beyond compare and swaped out files at first I was gettting this errror: Parse error: syntax error, unexpected $end in /home/main/public_html/send/Store/product_info.php on line 375

 

Line 375 is blank.

 

This went away when I removed this line of code:

 

// BOF: More Pics 6 ADDED to if statement: && MOPICS_GROUP_WITH_PARENT == 'false'

if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false') {

// EOF: More Pics 6

 

So someone said to put this in on line 133-137:

 

$mopics_images = array();

if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; }

for ( $mo_item=1; $mo_item<7; $mo_item++ ) {

if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; }

}

 

I did this and removed the other line above "causing the Parse error" and now the error is gone. Except it is not working when I click image it just shows the one image and a close window link. What am I missing and Also how do I add the extract 6 pics for the product?

 

Thanks Much. I really want to get this to work.

 

:)

Link to comment
Share on other sites

Ok someone help me out with this. I figured it has to be code in admin area since I do not see a space to upload more then the one default image for the product. Where and what code is this? What line should it be on?

 

 

Thanks much

Link to comment
Share on other sites

depends on how you have the More Pics settings. could be simple, could be difficult. please post the setting from the Admin -> Configuration -> More Pics.

Show All MorePics on Product Info page true

Group parent image with sub-images false

Use SMALL_IMAGE_ Restrictions true

Restrict parent image size true

Table Alignment center

Table Location below

Number of Columns 3

Number of Rows 2

 

Some of these could be changed. I do need to restrict the size of the more pics table (ie the group of 6 pics) I would like to adjust the main product pic to be larger and not dependent on the small image restriction

 

Thanks,

Rod

Link to comment
Share on other sites

Hello i would like to share my problem with you because i think it is important.

 

I took a backup of MySql Database trhrough phpMyadmin.

 

After i tried to restore the same database trough phpMyadmin

 

Then i ve noticed that i can' t see the extra images that i have in product_info.php

 

Does enyone else had the same problem with me in the past or it is the first time?

 

Could you please help me?

 

Why after the restore of the database i can't see the extra images in product_info.php ?

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