Solved

Joomla - Virtuemart - set the image width for normal pictures

Posted on 2011-09-04
14
608 Views
Last Modified: 2012-05-12
Hello,

In the same way as I can set the "Thumbnail Image Width", I need to set the image width.

Reason: the pictures have different width and the Product detail the whole layout is different.
compare the two products:

http://www.egyediszoftverek.hu/ideig/joomla_ideig/index.php?page=shop.product_details&product_id=907&category_id=1&flypage=flypage_sts2.tpl&option=com_virtuemart&Itemid=60

and

http://www.egyediszoftverek.hu/ideig/joomla_ideig/index.php?page=shop.product_details&flypage=flypage_sts2.tpl&product_id=890&category_id=1&option=com_virtuemart&Itemid=60

Every picture should have the same width as the second (337 pixels).

Thank you
0
Comment
Question by:starhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
14 Comments
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36480425
most of your problems in your site have to do with width!

you have to assign the width tag in the container (div or class) in order to have the results you want
0
 

Author Comment

by:starhu
ID: 36480458
"most of your problems in your site have to do with width!"
It is true, but the customer is the problem :-( at my previous webshop that customer said at first glance that everything was fine, this customer picks a quarrel every time, nothing is good for him.

By the way it is not only me who has this image size problem with VM, I found the same question many times in google, but there was no proper answer.

I modified the flypage like this (vm_detail_pict):

<?php  if( $this->get_cfg('showManufacturerLink') ) { $rowspan = 5; } else { $rowspan = 4; } ?>
        <td width="33%" rowspan="<?php echo $rowspan; ?>" valign="top"><br/>
          <div class="vm_detail_pict">
              <?php echo urldecode( $product_image ) ?><br/><br/><?php echo $this->vmlistAdditionalImages( $product_id, $images ) ?>
            </div>
            </td>

And the css:

div#vm_detail_pict
{
 width:337;

}

But it didn't work. In FireBug the result is:

<div class="vm_detail_pict">
              <a rel="lightbox[product907]" title="MARILYN 265" href="http://www.egyediszoftverek.hu/ideig/joomla_ideig/components/com_virtuemart/shop_image/product/239632.jpg"><img width="450" height="379" border="0" alt="MARILYN 265" src="http://www.egyediszoftverek.hu/ideig/joomla_ideig/components/com_virtuemart/shop_image/product/239632.jpg"><br>Teljes méretu kép megtekintése</a><br><br>            </div>
<a rel="lightbox[product907]" title="MARILYN 265" href="http://www.egyediszoftverek.hu/ideig/joomla_ideig/components/com_virtuemart/shop_image/product/239632.jpg"><img width="450" height="379" border="0" alt="MARILYN 265" src="http://www.egyediszoftverek.hu/ideig/joomla_ideig/components/com_virtuemart/shop_image/product/239632.jpg"><br>Teljes méretu kép megtekintése</a>
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36480468
ok but the div is inside a td of 33% width and that the problem
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:starhu
ID: 36480531
I deleted the td of 33% width but nothing has changed.

The img width="450" height="379"  is set in another file, not in the flypage (but I don't know where).
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36480539
look at the admin of virtuemart
0
 

Author Comment

by:starhu
ID: 36480545
I can set there only  "Thumbnail Image Width" and  "Thumbnail Image Height" but not "Image Width" and  "Image Height"
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36480559
so its on the flypage that you use maybe not as width and height but as the full image
0
 

Author Comment

by:starhu
ID: 36480569
This is my flypage, maybe this will help:

 
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);
 ?>

<?php //echo $buttons_header // The PDF, Email and Print buttons ?>

<br/>
<?php
if( $this->get_cfg( 'showPathway' )) {
 	echo "<div class=\"pathway\">$navigation_pathway</div>";
}
if( $this->get_cfg( 'product_navigation', 1 )) {
	if( !empty( $previous_product )) {
		 echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
		
	}
	if( !empty( $next_product )) {		
		echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
		
		
	}
}
?>



<table border="0" style="width: 100%;" align="left" cellpadding="2">
  <tbody>
	<tr>
<?php  if( $this->get_cfg('showManufacturerLink') ) { $rowspan = 5; } else { $rowspan = 4; } ?>
	  <td  rowspan="<?php echo $rowspan; ?>" valign="top"><br/>
	    <div class="vm_detail_pict">
	  	<?php echo urldecode( $product_image ) ?><br/><br/><?php echo $this->vmlistAdditionalImages( $product_id, $images ) ?>
		</div>
		</td>
		
	  <td rowspan="1" colspan="2">
	  <h1><?php echo $product_name ?> <?php echo $edit_link ?></h1>
	  </td>
	</tr>
	<?php if( $this->get_cfg('showManufacturerLink')) { ?>
		<tr>
		  <td rowspan="1" colspan="2"><?php echo $manufacturer_link ?><br /></td>
		</tr>
	<?php } ?>
	<tr>
      <td valign="top" align="left">
      	<?php echo $product_price_lbl ?>
      	<?php echo $product_price ?><br />
		<a href="index.php?option=com_virtuemart&page=shop.registration" class="button">Legyen a partner&uuml;nk</a>
		</td>
      <td valign="top"><?php echo $product_packaging ?><br /></td>
	</tr>
	
	<!--
	<tr>
	  <td colspan="2"><?php echo $ask_seller ?></td>
	</tr>
	rowspan="1" colspan="2" 
	
	-->
		
	<tr>
	  <td style="font-size:15px; font-weight:bold; color: #3333FF; "><hr />
	  	<?php echo $product_s_desc ?>   <br/>
	  	<span style="font-style: italic;"><?php echo $file_list ?></span>
	  </td>
	</tr>		
		
	<tr>
	  <td style="font-size:7px; font-weight:bold; color: #000000; "><hr />
	  	<?php echo $product_description ?><br/>
	  	<span style="font-style: italic;"><?php echo $file_list ?></span>
	  </td>
	</tr>
	
	<tr>
	  <td><?php 
	  		if( $this->get_cfg( 'showAvailability' )) {
	  			echo $product_availability; 
	  		}
	  		?><br />
	  </td>
	  <td colspan="2"><br /> <!--  <?php echo $addtocart ?>  --> </td>
	</tr>
	<tr>
	  <td colspan="3"><?php echo $product_type ?></td>
	</tr>
	<tr>
	  <td colspan="3"><hr /><?php echo $product_reviews ?></td>
	</tr>
	<tr>
	  <td colspan="3"><?php echo $product_reviewform ?><br /></td>
	</tr>
	<tr>
	  <td colspan="3"><?php echo $related_products ?><br />
	   </td>
	</tr>
	<?php if( $this->get_cfg('showVendorLink')) { ?>
		<tr>
		  <td colspan="3"><div style="text-align: center;"><?php echo $vendor_link ?><br /></div><br /></td>
		</tr>
	<?php  } ?>
	<?php if( isset($paypalLogo)) : ?>
		<tr>
			<td colspan="3" align="center">
				<?php echo $paypalLogo ?>
			</td>
		</tr>
	<?php endif;?>
  </tbody>
</table>



<?php 

if( !empty( $recent_products )) { ?>
	<div class="vmRecent">
	<?php 
	  //echo $recent_products; 
	?>
	
	</div>

<?php 
}
if( !empty( $navigation_childlist )) { ?>
	<?php echo $VM_LANG->_('PHPSHOP_MORE_CATEGORIES') ?><br />
	<?php echo $navigation_childlist ?><br style="clear:both"/>
<?php 
} ?>

Open in new window

0
 

Accepted Solution

by:
starhu earned 0 total points
ID: 36480829
I found the solution:

<img src="./components/com_virtuemart/shop_image/product/<?php echo $product_full_image ?>" width="337" > 
0
 

Author Closing Comment

by:starhu
ID: 36508811
I found the solution
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36481053
where was the above?
0
 

Author Comment

by:starhu
ID: 36485420
This wasn't above. I found the solution after hours of trying:

"<img src="./components/com_virtuemart/shop_image/product/<?php echo $product_full_image ?>" width="337" >  "
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36485429
did you put that to your flypage ?
0
 

Author Comment

by:starhu
ID: 36485555
Yes
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question