close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

image dimensions

Thread began 1/29/2012 6:43 pm by bill434989 | Last modified 2/03/2012 2:00 pm by bill434989 | 4802 views | 9 replies |

bill434989

image dimensions

I have vertical and horizontal images -same dimensions-, that need to be displayed the same size. My problem is when you go to the window, where you can add the image/product to the cart, the horizontal image only displays so wide while the vertical image displays much bigger in over all size. What would be easiest; being able to bring image down and start displaying under the quantity/cart button or can I limit the length displayed, or do you have other ideas. Also where would I change? Thanks in advance for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

on the webassist/plugins/shopping_cart/details.php page, the following code block controls the product image size:

php:
<?php

                    $imgWidth 
300;
                    
$imgSrc "../../../" . ($WAGLOBAL_Images_Folder) . ((isset($row_WADAProducts['ProductImage']) && $row_WADAProducts['ProductImage'] != "default-product.png")?$row_WADAProducts['ProductImage']:$row_WADAProducts['ProductThumb']);
                    
$imgSrc abs2rel(rel2abs($imgSrc,dirname(__FILE__)),dirname($_SERVER['PHP_SELF']));
                    
$WAResultsImage = new WA_Include('scripts/resize_image.php');
                    require(
$WAResultsImage->BaseName);
                    
$WAResultsImage->Initialize(true);
                    
?>
                    <img class="WADAResultThumb" border="0"  src="<?php echo(abs2rel(rel2abs($WAResultsImage->Body,dirname($_SERVER['PHP_SELF'])),dirname(__FILE__))); ?>" id="ProductImage" />



you can change the width by editing the $imgWidth variable, or you can add a $imgHeight variable to set the maximum height being used to make the images more uniform.

Sign in to reply to this post

bill434989

Yeah!

Thanks ever so much Jason, for the assist in making my website look better!

Sign in to reply to this post

bill434989

Image Dim not changed

Hi Jason:
I changed the code to change the product size...Here is the code you gave me with the changes I made to the product image size.

<?php
$imgWidth = 400;
$imgHeight = 400;
$imgSrc = "../../../" . ($WAGLOBAL_Images_Folder) . ((isset($row_WADAProducts['ProductImage']) && $row_WADAProducts['ProductImage'] != "default-product.png")?$row_WADAProducts['ProductImage']:$row_WADAProducts['ProductThumb']);
$imgSrc = abs2rel(rel2abs($imgSrc,dirname(__FILE__)),dirname($_SERVER['PHP_SELF']));
$WAResultsImage = new WA_Include('scripts/resize_image.php');
require($WAResultsImage->BaseName);
$WAResultsImage->Initialize(true);
?>
<img class="WADAResultThumb" border="0" src="<?php echo(abs2rel(rel2abs($WAResultsImage->Body,dirname($_SERVER['PHP_SELF'])),dirname(__FILE__))); ?>" id="ProductImage" />

You told me to find this in the webassist/plugins/shopping_cart/details.php page.
I found it in on the webassist/plugins/shopping_cart/products_lookup.php page, as there was no details.php.

The changes have no effect,could that be the problem??? I don't have a detail.php page, or did I miss something else?

Sign in to reply to this post

Jason ByrnesWebAssist

what version of power store?

the webassist/plugins/shopping_cart/products_lookup.php page is only used when you have product options and select a different option.

there must be a webassist/plugins/shopping_cart/details.php page, if not the product information would not display in the first place.

Sign in to reply to this post

bill434989

Found it

jason, found it inwebassist/plugins/catalog/details

Am using 4.5 right "out of the box".

Image size modifications seem to work, but "width" is still restrictive do to the "quantity /add to cart button"to the right. Am I able to display the image below the quantity/cart button?

Sign in to reply to this post

Jason ByrnesWebAssist

send a link where i can see the problem.

Sign in to reply to this post

bill434989

distorts

Here is the link of one of the image pages.

products_detail.php?ProductID=46

My images are rectangulare in size. If I set a width and height for vertical is distorts the horizontal or crops it. Same thing if I set width and height for horizontal.

Sign in to reply to this post

Jason ByrnesWebAssist

on the webassist/plugins/catalog/details.php page, edit:

php:
<div class="productDetailWrapper">

            <div class="image">
                <div class="imageWrapper">
                    <?php
                    $imgWidth 
300;
                    
$imgSrc "../../../" . ($WAGLOBAL_Images_Folder) . ((isset($row_WADAProducts['ProductImage']) && $row_WADAProducts['ProductImage'] != "default-product.png")?$row_WADAProducts['ProductImage']:$row_WADAProducts['ProductThumb']);
                    
$imgSrc abs2rel(rel2abs($imgSrc,dirname(__FILE__)),dirname($_SERVER['PHP_SELF']));
                    
$WAResultsImage = new WA_Include('scripts/resize_image.php');
                    require(
$WAResultsImage->BaseName);
                    
$WAResultsImage->Initialize(true);
                    
?>
                    <img class="WADAResultThumb" border="0"  src="<?php echo(abs2rel(rel2abs($WAResultsImage->Body,dirname($_SERVER['PHP_SELF'])),dirname(__FILE__))); ?>" id="ProductImage" />
                </div>
            </div>
            <div class="addToCart"><?php echo($WAAddToCart->Body); ?></div>
        </div>




to:

php:
<div class="productDetailWrapper">

            
            <div class="addToCart"><?php echo($WAAddToCart->Body); ?></div>
<div class="image">
                <div class="imageWrapper">
                    <?php
                    $imgWidth 
300;
                    
$imgSrc "../../../" . ($WAGLOBAL_Images_Folder) . ((isset($row_WADAProducts['ProductImage']) && $row_WADAProducts['ProductImage'] != "default-product.png")?$row_WADAProducts['ProductImage']:$row_WADAProducts['ProductThumb']);
                    
$imgSrc abs2rel(rel2abs($imgSrc,dirname(__FILE__)),dirname($_SERVER['PHP_SELF']));
                    
$WAResultsImage = new WA_Include('scripts/resize_image.php');
                    require(
$WAResultsImage->BaseName);
                    
$WAResultsImage->Initialize(true);
                    
?>
                    <img class="WADAResultThumb" border="0"  src="<?php echo(abs2rel(rel2abs($WAResultsImage->Body,dirname($_SERVER['PHP_SELF'])),dirname(__FILE__))); ?>" id="ProductImage" />
                </div>
            </div>        
</div>




then in the webassist/plugins/catalog/css/products_detail.css file, change the width of the .productDetailWrapper .addToCart selector:

.productDetailWrapper .addToCart {
width: 385px;
padding:0 0 12px;
background-image: url("../images/addtocart_bg.png");
background-position: bottom center;
background-repeat: no-repeat;
float:right;
}


to something like 696px

Sign in to reply to this post

bill434989

Appreciate the help.

Thanks for all the help Jason

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...