Latest News: (loading..)
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

1,576 posts in this topic

OK, here's a quick try at this. Find this code in catalog/includes/modules/more_pics.php (Line 134)

		  if ($num_products_images > 1) {
		$small_images_string .= '			 <a href="' . tep_href_link (basename ($PHP_SELF), 'products_id=' . $products_id . '#morepics') . '" name="morepics" ' . MORE_PICS_MOUSE_OPERATION . '="document.MainImage.src=\'' . DIR_WS_IMAGES . $images['image_filename'] . '\'">' . tep_image (DIR_WS_IMAGES . $images['image_filename'], $products_name, $image_width, $image_height, 'class="productsImages"') . '</a>';
	  }
	  $small_images_string .= '		   </td>' . "\n";

and add this just after it:

		  if (MORE_PICS_IMAGE_ROW > 0 && MORE_PICS_IMAGE_ROW == $images_order+1) {
		$small_images_string .= '		 </tr>' . "\n";
		$small_images_string .= '		 <tr>' . "\n";
	  }

Then run this SQL on your database:

INSERT INTO `configuration` VALUES(NULL, 'Small Image Rows', 'MORE_PICS_IMAGE_ROW', '0', 'Set the maximum number of small images in a row. Location = Top or Bottom only. 0 = Off.', 6124, 40, now(), now(), NULL, NULL);

Now go to your More Pics Admin and set Small Image Rows to the maximum number of thumbnails you want in a row.

 

This is untested, so beware of fat-finger typos. Please let me know if it works for you.

 

Regards

Jim

 

I have followed this solution, setting images per row to 3. It works for the the first row...but the remaining images (12 of them...all get placed on the second row).

 

Is it possible to amend this code so that each row displays only 3 images?

 

Thanks

 

Riz

Share this post


Link to post
Share on other sites

The first line of the added code is wrong. My bad. Try this instead:

                  if (MORE_PICS_IMAGE_ROW > 0 && ($images_order % MORE_PICS_IMAGE_ROW) == 0) {

Regards

Jim

Share this post


Link to post
Share on other sites

Dup.

Edited by kymation

Share this post


Link to post
Share on other sites

The first line of the added code is wrong. My bad. Try this instead:

                  if (MORE_PICS_IMAGE_ROW > 0 && ($images_order % MORE_PICS_IMAGE_ROW) == 0) {

Regards

Jim

 

 

Thanks Jim. That worked.

 

Just a word of warning for those that have even less PHP know how than me....you may need to adjust the second "0" to +1...+2...or something else...in order to fix the way the images are displayed in the rows. For example, I had 14 images, and each row was meant to display 3 images each (the last one would only have 2 images). With the "0" setting above....the first and last row had one image each and the rows in between had the full 3 images. For me, "+2 fixed this so that all rows had 3 images...except for the last one that had 2.

 

Riz.

Share this post


Link to post
Share on other sites

Reciprocals. Right. That's what I get for coding at 3:00 AM.

 

Good to hear you got it working.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi!

Thanks for this contribution.

I've ran Autoinstaller 2.7 for More pics 6 v1.4.3.

Everythin works fine.

Is it possible that inslattation could change some text fields?

Here is an example:

screenshot

It is in the http://www.******.pl/admin/index.php

In Admin panel > Customers > Customers Everythink is in my language

 

 

In which .php file i could "translate" it?

Share this post


Link to post
Share on other sites

The missing translations should be in /admin/includes/languages/[iNSERT YOUR LANGUAGE HERE]/customers.php

 

An unmodified english version of the file looks like this:

 

<?php
/*
 $Id: customers.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('HEADING_TITLE', 'Customers');
define('HEADING_TITLE_SEARCH', 'Search:');

define('TABLE_HEADING_FIRSTNAME', 'First Name');
define('TABLE_HEADING_LASTNAME', 'Last Name');
define('TABLE_HEADING_ACCOUNT_CREATED', 'Account Created');
define('TABLE_HEADING_ACTION', 'Action');

define('TEXT_DATE_ACCOUNT_CREATED', 'Account Created:');
define('TEXT_DATE_ACCOUNT_LAST_MODIFIED', 'Last Modified:');
define('TEXT_INFO_DATE_LAST_LOGON', 'Last Logon:');
define('TEXT_INFO_NUMBER_OF_LOGONS', 'Number of Logons:');
define('TEXT_INFO_COUNTRY', 'Country:');
define('TEXT_INFO_NUMBER_OF_REVIEWS', 'Number of Reviews:');
define('TEXT_DELETE_INTRO', 'Are you sure you want to delete this customer?');
define('TEXT_DELETE_REVIEWS', 'Delete %s review(s)');
define('TEXT_INFO_HEADING_DELETE_CUSTOMER', 'Delete Customer');
define('TYPE_BELOW', 'Type below');
define('PLEASE_SELECT', 'Select One');
?>

Share this post


Link to post
Share on other sites

That is not it :(

In customers.php everythinG is fine, in admin.php (as i attached screenshot) text isn't translated.

 

Am I right:

Every line that contains:

define('EXAMPLE_TEXT_1', 'Translated text');

I can edit green as I wish with leaving red without any changes?

Share this post


Link to post
Share on other sites

Then I have no clue.

 

My admin/index.php looks nothing like that at all.

 

You must have a mod installed or some custom coding.

 

You'll just have to look thru the files it's using and find/fix it yourself I guess.

Share this post


Link to post
Share on other sites

Does anyone know why the product image on the products.php would be missing?

 

I've installed More pics as instructed...and it's all working apart from this.

 

products.php isn't even one of the pages that was changed - there was no mention in the instructions that this page required any changes.

 

Any help would be much appreciated...been spending hours on this :o(

Share this post


Link to post
Share on other sites

osCommerce doesn't have a "products.php". If that's something you've added, you'll need to modify it to make it work with More Pics.

 

Regards

Jim

Share this post


Link to post
Share on other sites

osCommerce doesn't have a "products.php". If that's something you've added, you'll need to modify it to make it work with More Pics.

 

Regards

Jim

 

Yes, you're right Jim.

 

Sorry, its been a couple of years since I set this site up and I have forgotten why I added it. Going through my notes, it seems to be a page I've possibly renamed as the page’s function is to list all the products per category (i.e. it's the page you see when you click on the category links on the left).

 

In any case, I resolved my problem - I hadn't copied the code in "product_listing.php" 100% correctly. Thank god for Winmerge...or it would have taken me more than the 3-4 hours it took me to work out. :-"

Share this post


Link to post
Share on other sites

ADDITION TO MY PREVIOUS MESSAGE:

In the product_reviews_info.php file, the replacing code is not the same as in the other two files because this PHP uses another name of picture function (it uses

$review['products_image']

instead of

$product_info['products_image']

), so it's necessary to change the replacing code:

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $review['products_image']) . '" rel="lightbox[roadtrip]">' . tep_image(DIR_WS_IMAGES . $review['products_image'], $review['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $review['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $review['products_image'], $review['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

Hi there Matěj (hope you're still around),

 

I have successfully installed More Pics Advanced 2.0.6 but I have noticed that the photos on the /product_reviews_info.php, /product_reviews.php and /admin/reviews.php still show the image that I used before I installed this add-on. The Readme.txt made no references to changing these files...so I followed your instruction above (for /product_reviews_info.php) but it does not work.

 

Can you (or anyone) help? I've spent hours on this. :'(

Share this post


Link to post
Share on other sites

Hi

 

First of all, I wish to thank you for great contribution.

I'm new to oscommerce, been working with joomla for past two years, but this customer of mine has a live webshop on oscommerce 2.2rc2

I've installed more pics cont. without a problem, and it's working as a charm.

But I would like to reposition it in product view. Could you help me with that?

 

here is the web shop on test server

http://md-projekt.hr/osc2/product_info.php?products_id=372

 

I would like to have your gallery just on the right od original picture. So that first are main pic on the left and gallery on the right, then facebook like, then description and then youtube video.

Is it achivable?

 

I can send you product_info.php if that would help?

 

Thanks in advance,

Ivan

Share this post


Link to post
Share on other sites

You can move things around to achieve any look that you want. However, that means editing catalog/product_info.php and moving things around. The More Pics sections are marked with comments so you should be able to find them easily. For the rest, you may need to do some experimenting. Keep backups of every change so you can back out if you mess things up.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi,Jim,

I just installed more pics and found that CSS box just support more pics advanced,but easy populate does not support more pics advanced feature,while easy populate supports more pics classic,but CSS box does not support more pics classic.How can I use more pics classic with CSS box.Do you have any plan to upgrade your more pics version so that your CSS box can support more pics classic,so that we can combine your more pics classic with css box with easy populate? I still prefer to Osc 2.2 MS2,because there are a lot of contributions to Osc 2.2 MS2 that we can adopt and so many smart people got involve into it.and Osc2.2 MS2 is easier for me to modify,because I really don't have time to learn new tricks in Osc 2.3.1.I wish you could develop more versions suitable for Osc2.2.

Thanks and have a nice day!

 

Joe

Share this post


Link to post
Share on other sites

@@ilosc6316

 

MS2.2 has long been discontinued and there is no longer support for it. Eventually, as your server updates its software you will be forced to update your store to the latest version.

 

 

 

Chris

Share this post


Link to post
Share on other sites

Chris,

Thanks for your reply.

I tried to install Osc2.2 on our newer linux server,I think Php and mysql is new enough,it runs fast,I just pay attention to the Osc2.2

security issue,and a lot of smart people gave us a lot of good contributions and hints on how to protect our Osc2.2 and web server in Osc community.We are just small business,struggling for surviving,not trying to get business from all over the world.We just show the site and contents to the people we know.If there are some products popup in market,we just upload them.So Osc2.2 is enough for our small business owners,small web store.We just like something simple, easy, and quick to adopt and control.Efficiency is more important to us.

 

Joe

Share this post


Link to post
Share on other sites

@@ilosc6316

 

Your original post was about MS2.2,,,,,but your last post mentions v2.2 which is an RC 1 or 2a release. Perhaps being more specific about your version would fix the confusion.

 

 

 

Chris

Share this post


Link to post
Share on other sites

osCommerce 2.2 MS2 is obsolete and no longer very well supported. More Pics, both the classic and advanced versions, work reasonably well with that code. Since so few people are still using something that old, there are no plans to update it. It looks like you are the only person that wants this update, so it's up to you to update it or hire someone to do it for you.

 

I recommend that you move to osCommerce 2.3.2. You're getting to the point where you are no longer able to apply security patches because your code is too different. It's only a matter of time before that catches up with you.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I have instlled this cont and i add pics but they do not show up go back to edit and in the small right hand box it says no image exists? any ideas?

Share this post


Link to post
Share on other sites

@@ChrisWarman I need to know the version of osCommerce you are running before I can help. Also, please understand that this Addon is obsolete and no longer well supported.

 

Regards

Jim

Share this post


Link to post
Share on other sites

hi jim using the latest i have uninstalled it for now I'm basically looking at adding a few more images with my products can you recommend an addon thats relatively easy to install? also any idea why my icons i.e english banner do not show up inside admin?

 

Thnaks for giving me your time guys its a help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now