close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Powerstore All Versions - Products Image placeholder

Thread began 10/13/2010 7:14 am by Jason Kline | Last modified 10/22/2010 11:46 am by Dani Chankhour | 2655 views | 14 replies |

Jason Kline

Powerstore All Versions - Products Image placeholder

Does PS have to ability to check for missing product images in the imagesupload folder and provide a default placeholder image?

Sign in to reply to this post

Dani Chankhour

No, but that is something that could be added. However with Powerstore v4, you don't have to add an image when you insert a product, because we default to a default image if no image was specified.

Sign in to reply to this post

Jason Kline

Sounds like this could be added in the next update to PS 3.0.1 right?

Sign in to reply to this post

Dani Chankhour

I'm not sure that is something that could be added to PS 3, because that is not how it is designed. But i can provide with a work around on how to go about showing a default image if the image does not exists. Although that seems like it is not really possible because PS 3 requires an image before creating a new product.

Sign in to reply to this post

Jason Kline

If can provide this work around it would be helpful for those who have 7000+ products with images and will import via a database backend.

Sign in to reply to this post

Jason Kline

I just added this code to the Product_Results.php page and it works.

onerror="this.src = 'noimage.jpg'"


<div class="imageWrapper"> <a href="Products_Detail.php?ProductID=<?php echo(rawurlencode($ProductID)); ?>" title="<?php echo $row_WADAProducts["ProductName"]; ?>"> <img class="WADAResultThumb" border="0" src="imagesupload/<?php echo $row_WADAProducts['ProductThumb']; ?>" onerror="this.src = 'noimage.jpg'" /></a> </div>

But whatever you provide I will use.

Thanks Dani.

Sign in to reply to this post

Dani Chankhour

You can add these lines of code before the image tag:

<?php
$file = "imagesupload/" . $row_WADAProducts['ProductThumb'];
if(!file_exists($file)) $file = "imagesupload/default-product.png";
?>

and update the image tag to:

<img class="WADAResultThumb" border="0" src="<?php echo $file; ?>" />

Sign in to reply to this post

Jason Kline

Thank you Dani.

That works very well.

Your awesome.

Sign in to reply to this post

Dani Chankhour

I'm glad i was able to help.

you can use that concept any where where images are displayed (detail page, cart, etc...).

Sign in to reply to this post

Jason Kline

Now that I have purcahsed PS4 after importing products the placeholder image is missing for all products. How can this be rectified?

Seems like the placeholder image only come when you add a product from with the store manager. But I don't think one would expect that we would sit and enter couple thousand products manually right?

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...