Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: 1 2 [3] 4 5 ... 13   Go Down
Print
Author Topic: 2 Product Thumbnail image sizes Mod [finished]  (Read 134687 times)
snazzyperry
Jr. Member
**
Posts: 97


« Reply #30 on: September 01, 2006, 08:19:39 AM »

could it be because it is in a different language other than english??? I have noticed that many mods don't quite work the way they are supposed to because of the language module, etc...Huh?

Just thought that I would throw in my two cents... Don't know how much that would be in other currencies?? LOL
Logged
styledefender
Newbie
*
Posts: 10



WWW
« Reply #31 on: September 01, 2006, 16:33:40 PM »

Yep, I finally found a solution to one of the problems.
Now I can use both sizes of the image as I like. It just was a simple one / zero switch:
The correct line is:
 /* Build the "See Bigger Image" Link */
      if( @$_REQUEST['output'] != "pdf" ) {
      $link = $imageurl;
      $text = $ps_product->image_tag($product_thumb_image_2, "alt=\"".$product_name."\"", 0)."<br/>".$VM_LANG->_PHPSHOP_FLYPAGE_ENLARGE_IMAGE;
      // vmPopupLink can be found in: htmlTools.class.php
      $product_image_2 = vmPopupLink( $link, $text, $width, $height );
      }
      else {
        $product_image_2 = "<a href=\"$imageurl\" target=\"_blank\">".$ps_product->image_tag($product_thumb_image_2, "alt=\"".$product_name."\"", 1)."</a>";
      }
    }
  }

But the images are still copied in the wrong folder and i still have this line stating the ref to the pictures uploaded using the data manager.... Any clue? I gonna take a look at the code tomorrow again.
Logged
jmds
Guest
« Reply #32 on: September 22, 2006, 09:46:25 AM »

Hi,

I have been asked about adding this hack to a clients site, the problem I have is that if I copy the code it pastes with a large amount of space between each line. I have been able to cut and paste from other sites via wordpad. But not this time.

All advice on this subject welcomed.
Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #33 on: September 22, 2006, 17:30:52 PM »

Yep, I finally found a solution to one of the problems.
Now I can use both sizes of the image as I like. It just was a simple one / zero switch:
The correct line is:
 /* Build the "See Bigger Image" Link */
      if( @$_REQUEST['output'] != "pdf" ) {
      $link = $imageurl;
      $text = $ps_product->image_tag($product_thumb_image_2, "alt=\"".$product_name."\"", 0)."<br/>".$VM_LANG->_PHPSHOP_FLYPAGE_ENLARGE_IMAGE;
      // vmPopupLink can be found in: htmlTools.class.php
      $product_image_2 = vmPopupLink( $link, $text, $width, $height );
      }
      else {
        $product_image_2 = "<a href=\"$imageurl\" target=\"_blank\">".$ps_product->image_tag($product_thumb_image_2, "alt=\"".$product_name."\"", 1)."</a>";
      }
    }
  }

But the images are still copied in the wrong folder and i still have this line stating the ref to the pictures uploaded using the data manager.... Any clue? I gonna take a look at the code tomorrow again.

This mod is works only when creating, editing, cloning products, it creates the filenames using the product sku, copying the full image to /product/ folder, and the thumbnail images to the /product/resized/ folder appending the _90x90 and _200x200 to the thumbnail names... if you are using the file manager to upload images, thats why.  What file and function is this code from? Sorry, I've modified so many files lately hard to keep track.

I am working on a new version that will fix a couple of small issues with the category thumbail creation, and also new products had to be created first, then add the images after the product was created.  This mod right now, generates the filename by pulling the product_sku from the db, so new products dont have a sku yet.  As soon as I finish working out a few bugs, and finish testing, I am going to try and organize all the files and modifications and post it in the wiki mods section.

Hi,

I have been asked about adding this hack to a clients site, the problem I have is that if I copy the code it pastes with a large amount of space between each line. I have been able to cut and paste from other sites via wordpad. But not this time.

All advice on this subject welcomed.

Cut and paste via Wordpad? That could be part of the problem. WordPad could be putting extra stuff in there, new lines, carriage returns.  Also, what version of Joomla and VM? How are you trying to edit your source files?  The best way to edit files is to download a copy of the file via ftp, (always make backup copies in case of mistakes) edit the file with NOTEpad or an html editor like Macromedia Homesite, or Zend Studio, the upload the modified file overwriting the original file... Dreamweaver and/or Frontpage are NOT recommended.
« Last Edit: September 22, 2006, 17:41:03 PM by CiPHeR » Logged

Jeff
=================================================
Dragon's Head Web Design - www.dragonsheadweb.com
**On Hiatus** Please don't PM me, as chances are you will not get a reply any time
soon - I am not on here as much as I used to be lately.
VirtueMart needs YOU! We need good coders that can help
with coding and testing to continue the VirtueMart Evolution!
Vive le VirtueMart!
newbie^_^
Newbie
*
Posts: 3


« Reply #34 on: October 15, 2006, 11:21:25 AM »

Sir how can is use {product_thumb_image_2} in browse_1.php?tnx
Logged
Michael Tucker
Newbie
*
Posts: 20


« Reply #35 on: November 25, 2006, 06:22:39 AM »

Don't think that this mod is useable anymore. I spent several hours checking after I installed it as it was flooded with errors, and also messed up the style of the admin. Correct me if I'm wrong. I am using 1.07
Logged
rune
Newbie
*
Posts: 2


« Reply #36 on: December 13, 2006, 10:21:25 AM »

Hey

I`v used this mod to make two resized images (on version 1.07)
It was working I think.

But I have also modyfied so images from the filemanager are resized.
Then I have made some Ajax and some css to get this:
http://www.koolaid.no/badbadbad/index.php?page=shop.product_details&flypage=shop.flypage&product_id=25&category_id=1&manufacturer_id=0&option=com_virtuemart&Itemid=2
(later it will be on www.badbadbad.no)
I tought it was working but after some days I noticed that when you klikk around suddenly you get this error:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/koolaid/www/badbadbad/includes/database.php on line 287

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/koolaid/www/badbadbad/includes/database.php on line 289

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/koolaid/www/badbadbad/includes/database.php on line 290

and always this comes five times.

I realy dosn`t have a clue how to fix.
The thing I now is that it must be this mod or more likly the things I`v done to get this to work one the files from the filemanager.
Because this is not done by any css og ajax Smiley

I realy dosn`t axpect anyone to be able to help me, but maby someone can have a tips Smiley

It`s a realy bad one, the error comes from Joomla and not the files I have edited, and the error not comes everytime,, Sad

I`v used a lot of time on this so please, anyione that are able to help can get the files if they need, or some money.

The best ting I can come up whit is to start from scratch agein a put it all together pice by pice ;(
 
Logged
rune
Newbie
*
Posts: 2


« Reply #37 on: December 13, 2006, 11:19:13 AM »

I fixed it, I had to turn off the Joomla Site cache, still don`t now what causiing the Site Cache not to work. But I can live whitout Smiley
Logged
albi
Newbie
*
Posts: 8


« Reply #38 on: December 17, 2006, 13:10:38 PM »

Okay, after many many many hours of hair pulling, mind wrenching, toothpicks holding eyes open staring at all this code... I finally have it... but it is a lot of code... so, what I will try to do over the next few days is build a zip file - with folder structure intact - for all the files for this.


I tried this usefull mode and all things goes fine except of product thumbnails. If I uncheck automatic thumbnails than i dont have thumbnails for the products. Any idea about this?
I
Logged
MyMusicVid
Newbie
*
Posts: 41


WWW
« Reply #39 on: December 19, 2006, 03:47:17 AM »

Does anybody have the modified files for download so I can do a diff between the files? I've tried copying and pasting from this page, but i have the same problem as jmds - I lose all formatting and there's extra line breaks which seem to mess up the code. I also have a lot of custom mods on my pages so i don't want to lose those.

Thanks for any help.

Logged
MyMusicVid
Newbie
*
Posts: 41


WWW
« Reply #40 on: December 21, 2006, 05:06:06 AM »

jmds - I solved the extra line breaks problem by using IE7 instead of Firefox, so it seems to be a Firefox issue.

However, i 'm now getting the following error when i'm trying to upload an image:

Warning: copy(C:\Program Files mpp mp\php28.tmp) [function.copy]: failed to open stream: Invalid argument in C:\Program Files\xampp\htdocs\joomla\administrator\components\com_virtuemart\classes\ps_main.php(336) : eval()'d code on line 1

Error: The following image update command failed: $ret = copy( "C:\Program Files\xampp\tmp\php28.tmp", "/Program Files/xampp/htdocs/joomla/components/com_virtuemart/shop_image/product/G_012.jpg" );


I can see that it's missing  the C: from the beginning of the copy to path (i'm developing on Windows) and there is a strange directory name in the Warning description C:\Program Files mpp mp\php28.tmp). Where can I look to fix this?

-----------------------------
I'm only getting this error on windows, it all works fine on the live Linux server. It's something to do with the escaped characters in the str_replace function for creating the path to the files, but as long as it works on my live site, i'm okay.
« Last Edit: December 21, 2006, 19:27:59 PM by Ensonix » Logged
MyMusicVid
Newbie
*
Posts: 41


WWW
« Reply #41 on: December 21, 2006, 17:39:30 PM »

Albi

I've found that the product browse and details pages are not adding the "resized" part of the path to the image for the thumbnail snapshots. I'm working on sorting that out and i'll let you know when i've got it.
« Last Edit: December 21, 2006, 19:25:52 PM by Ensonix » Logged
John Patrick
Jr. Member
**
Posts: 65


WWW
« Reply #42 on: January 18, 2007, 14:01:50 PM »

Is there a link to download this mod?  or do I have to go through every post to compile it?
Logged

Thanks,

John Patrick,

If guns are responsible for killing people, then my keyboard is responsible for my typos.
Option6
Newbie
*
Posts: 5


« Reply #43 on: February 16, 2007, 00:51:43 AM »

Before I attempt this mod, does anyone have this working with Joomla 1.0.12 and VirtueMart 1.0.9 ?
Logged

POST Affiliate Pro for Joomla & VirtueMart!
Bill Smith
Newbie
*
Posts: 25


« Reply #44 on: February 24, 2007, 22:38:42 PM »

Seems this mod has gone the way of many other mods. DEAD. no updates or response from the original creator, just pages of complete unupdated mess
Logged
Pages: 1 2 [3] 4 5 ... 13   Go Up
Print
Jump to: