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 ... 13   Go Down
Print
Author Topic: 2 Product Thumbnail image sizes Mod [finished]  (Read 134869 times)
snazzyperry
Jr. Member
**
Posts: 97


« Reply #15 on: July 19, 2006, 11:55:37 AM »

Cipher...
how did you get the logo from the manufacturer to showup on the product descriptions??? and have the price highlighted like that?

Other than that... beautifully done!!
Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #16 on: July 19, 2006, 12:19:54 PM »

I have a php function that pulls the mfr name, and then all my mfr logos use logo_mfr_name.jpg, so all I do is replace mfr_name with the actual mfr name in the db.

Price is highlighted with a bg image in a CSS div id.
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!
teamit
Newbie
*
Posts: 18


« Reply #17 on: July 23, 2006, 06:30:42 AM »

Hi Jeff!

Realy like this one, but can't find your modified files for download.
Can you please upload the needed modified files ?

Thanks

Tor

Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #18 on: July 23, 2006, 09:51:41 AM »

That's because there are no files to download - I still havent decided on whether or not to put all the files (too many files) up or not - problem is, the files in this mod also have other mods I have done in those files... I think I need to sort through my code, and just put the changes required for this mod, and just the changes.  Sorry.  I need to find some time to actually finish this post with all the code and clean up this post.
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!
teamit
Newbie
*
Posts: 18


« Reply #19 on: July 26, 2006, 06:22:41 AM »

Hi!

Is there sombody that have used Jeff's code ?
Please explane witch files to modify ?

Need this great thing from Jeff ASAP.

Thanks for all help.

Tor
Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #20 on: July 26, 2006, 06:58:39 AM »

Hey Teamit, everyone else interested in this mod...

Sorry - I havent had time to finish this post yet... testing is done and it's ready to go... just have to get the rest of the code up here... I will try and go through this post and get it finished tonight or tomorrow night.

Cheers
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!
teamit
Newbie
*
Posts: 18


« Reply #21 on: July 26, 2006, 07:44:35 AM »

Hi Jeff!

THANKS YOU!  Wink Smiley

Locking forward to finaly install your great stuff.

Tor
Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #22 on: July 27, 2006, 22:11:35 PM »

Okay, I think this is finally finished... make sure you read through the entire post as there has been a few changes to the thread.  Be warned, this is a big mod and requires editing a lot of files.  Some of the files had some other mods - which is the reason why I did not make a zip file with all modified files - there's a good chance my mods could mess up your site, so I decided to post just the code modifications for this 2 thumbnail size functionality.  I must also warn that this mod is not for the amatuer or beginner - if you dont know what you are doing, then you should not attempt this mod (you can contract me to do the modifications for you at a reasonable fee or donation to my paypal account)

Cheers

Thanks go out to Soeren, jabberwock, mcallf for their help and/or input on this mod Wink
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!
teamit
Newbie
*
Posts: 18


« Reply #23 on: July 28, 2006, 02:35:09 AM »

hi!

Where is the code Huh
Have you forgot to put the code in here ?
Or do i need to give you some money to do the work for me ?
How mutch do you want ?

Thanks for helping me...

Tor
« Last Edit: July 28, 2006, 03:02:28 AM by teamit » Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #24 on: July 28, 2006, 06:41:42 AM »

All the code is on page 1 of this post - you dont need to pay me, but if you dont feel comfortable doing this mod, you can contract me to do the mod for you - if you like Smiley

Just send me a pm with your contact details and I will get in touch.
« Last Edit: July 28, 2006, 06:48:47 AM 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!
gwen
Sr. Member
****
Posts: 333


« Reply #25 on: August 30, 2006, 15:40:09 PM »

Hi Cipher,

Did you see with soeren to add this in the 1.1 version ?
I guess it would be great to avoid hacking and hacking again to obtain such result

by the way you made a really good job...I'll implement this for me also Wink

Logged

Gwen ex-dev team member
peluche - doudou - puericulture - cadeaux naissance - ecusson - Kaloo[/si
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #26 on: August 30, 2006, 18:51:11 PM »

Hi Cipher,

Did you see with soeren to add this in the 1.1 version ?
I guess it would be great to avoid hacking and hacking again to obtain such result

by the way you made a really good job...I'll implement this for me also Wink

Hey Gwen,

I dont have a stable version of 1.1 for testing... I should get an admin login from Soeren so I can check out the backend more thoroughly.

Yes, it would be nice to avoid hacking stuff... but then, "if it aint broke, there must be something wrong" lol - glad you like the mod  Wink

I also just recently discovered there are a few changes to be made to the category editing function for the category thumbnails (ahhh, more work to do!)

Cheers
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!
styledefender
Newbie
*
Posts: 10



WWW
« Reply #27 on: September 01, 2006, 06:14:57 AM »

HI

first off all this is an awesome hack and i would love to just dont have to do it. But maybe in a few versions all of this will be integrated.
Now I tried to apply the hack to a local copy of my shop and found that the changes made to the shop.product_details.php and shop.browse.php are missing. I tried to code them alone and i can use the second picture now. But its always resized to the small picture-size.
So i figure i did it wrong. Can you please post the changes to those files too?
I also have the problem that the path to my additional pictures (uploaded with the data-manager) is show on the product-detail-page. Can you give me a hid where to find the error?


* error.JPG (53.69 KB, 940x558 - viewed 1112 times.)
« Last Edit: September 01, 2006, 06:18:46 AM by styledefender » Logged
Jeff_S
** on hiatus **
Global Moderator
Hero Member
*
Posts: 574


if it aint broke, there must be something wrong


WWW
« Reply #28 on: September 01, 2006, 07:06:53 AM »

Part of the reason a "package" was never uploaded is the fact that my files already have many many mods made specifically for our site, and to upload a package is just not feasible - that and the fact that people would have more problems using all my modified files than just posting the code of the changes made.  There are a lot of files to modify.

Are you getting any errors when you edit a product and try to add the product image?  It could be because you are trying on a local copy and there are issues related to that.
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!
styledefender
Newbie
*
Posts: 10



WWW
« Reply #29 on: September 01, 2006, 07:34:16 AM »

Hi CiPHeR, thank you for the quick answer  Cheesy
I tried again and i dont get any errors during the upload and resize of a picture. And in the backend i can see the different sizes of the image. After i copy the resized images from the resize folder to the product folder they are also shown in the product detail page. But just in 90x90.
It might be helpfull If I  post the code i add in the shop.product_details.php

/** PRODUCT IMAGE2 **/
  $product_image_2 = "";
  $full_image = $db_product->f("product_full_image");
  $full_image = $product_parent_id!=0 && !$db_product->f("product_full_image") ?
        $dbp->f("product_full_image") : $db_product->f("product_full_image"); // Change
  $product_thumb_image_2 = $product_parent_id!=0 && !$db_product->f("product_thumb_image_2") ?
        $dbp->f("product_thumb_image_2") : $db_product->f("product_thumb_image_2"); // Change

  /* Wrap the Image into an URL when applicable */
  if ( $db_product->f("product_url") ) {
    $product_image_2 = "<a href=\"". $db_product->f("product_url")."\" title=\"".$product_name."\" target=\"_blank\">";
    $product_image_2 .= $ps_product->image_tag($full_image, "alt=\"".$product_name."\"", 0);
    $product_image_2 .= "</a>";
  }
  /* Show the Thumbnail with a Link to the full IMAGE */
  elseif( !$db_product->f("product_url") ) {
    if( empty($full_image ) ) {
      $product_image_2 = "<img src=\"".IMAGEURL.NO_IMAGE."\" alt=\"".$product_name."\" border=\"0\" />";
    }
    else {
      // file_exists doesn't work on remote files,
      // so returns false on remote files
      // This should fix the "Long Page generation bug"
      if( file_exists( IMAGEPATH."product/$full_image" )) {
         
        /* Get image width and height */
        if( $image_info = @getimagesize(IMAGEPATH."product/$full_image") ) {
          $width = $image_info[0] + 20;
          $height = $image_info[1] + 20;
        }
      }
      else {
        $width = 640;
        $height= 480;
      }
      if( stristr( $full_image, "http" ) ) {
        $imageurl = $full_image;
      }
      else {
        $imageurl = IMAGEURL."product/$full_image";
      }
      /* Build the "See Bigger Image" Link */
      if( @$_REQUEST['output'] != "pdf" ) {
      $link = $imageurl;
      $text = $ps_product->image_tag($product_thumb_image_2, "alt=\"".$product_name."\"", 1)."<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>";
      }
    }
  }

$template = str_replace( "{product_image_2}", $product_image_2, $template );

It might be because i'm running it a local sever but it would be wierd if that is really the cause of my problems.
Anyway if you cannot think of a mistake i might did i guess i have to build a temporary joomla installation on my server (which takes forever  Smiley  Embarrassed )


* error2.JPG (21.45 KB, 512x384 - viewed 1038 times.)
Logged
Pages: 1 [2] 3 4 ... 13   Go Up
Print
Jump to: