Joomla - Virtuemart - set the image width for normal pictures

starhu
starhu used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Panagiotis Sweb developer - designer

Commented:
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

Author

Commented:
"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>
Panagiotis Sweb developer - designer

Commented:
ok but the div is inside a td of 33% width and that the problem
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Author

Commented:
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).
Panagiotis Sweb developer - designer

Commented:
look at the admin of virtuemart

Author

Commented:
I can set there only  "Thumbnail Image Width" and  "Thumbnail Image Height" but not "Image Width" and  "Image Height"
Panagiotis Sweb developer - designer

Commented:
so its on the flypage that you use maybe not as width and height but as the full image

Author

Commented:
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

Commented:
I found the solution:

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

Author

Commented:
I found the solution
Panagiotis Sweb developer - designer

Commented:
where was the above?

Author

Commented:
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" >  "
Panagiotis Sweb developer - designer

Commented:
did you put that to your flypage ?

Author

Commented:
Yes

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial