Hello first off I am really new to opencart, I just installed recently and it's great! I was wondering if its possible to use a default image for products without an image. I have been searching on google, but I have been unsuccessful. Thanks
There's one in the default Opencart download ...image/cache/no_image
It appears automatically on products with no image. Very easy.
You can place a copy in your image folder too: comes in handy if you need to remove an image, as you can just swop any redundant pictures for the no-image.jpg.
It appears automatically on products with no image. Very easy.
You can place a copy in your image folder too: comes in handy if you need to remove an image, as you can just swop any redundant pictures for the no-image.jpg.
Thanks for the quick reply! For some reason the default image is not showing up on the front-end I made sure the images file was 777 and the sub folders. Do I have to enable something?
hmm, sorry, let 's correct that. It appeared automatically on older versions of OC, but this feature seems to be missing in 1.5x. No idea why.Moggin wrote:It appears automatically on products with no image. Very easy.
However, you can still upload the no-image.jpg to your main image folder, and click on it to add it to your product page.
To add it back to 1.5.x
1. EDIT: admin/controller/catalog/product.php
2. FIND:
3. REPLACE WITH:
The no_image.jpg file is in the root "image" folder as opposed to "image/data" where all uploaded images go.
Replace that with your own default image and you should be set for future inserts
1. EDIT: admin/controller/catalog/product.php
2. FIND:
Code: Select all
$this->data['image'] = '';
Code: Select all
$this->data['image'] = 'no_image.jpg';
Replace that with your own default image and you should be set for future inserts
Hi Q,Qphoria wrote:To add it back to 1.5.x
1. EDIT: admin/controller/catalog/product.php
2. FIND:3. REPLACE WITH:Code: Select all
$this->data['image'] = '';
The no_image.jpg file is in the root "image" folder as opposed to "image/data" where all uploaded images go.Code: Select all
$this->data['image'] = 'no_image.jpg';
Replace that with your own default image and you should be set for future inserts
It didn't work for me. I'm running v.1.4.9.6.
By mistake I deleted a image folder and now all the products that had an image in this folder have no image at all :/
v. 1.4.9.6 & v. 2.0.2.0
Many thanks Qphoria. I found your solution very useful and easy to implement. I created a VQmod for OC v.1.5.5.1. If anyone wants to use it, you can download it free here:
http://www.opencart.com/index.php?route ... n_id=12529
http://www.opencart.com/index.php?route ... n_id=12529
Yes, you will need to edit catalog/controller/product/product.php in the same way that Qphoria outlined earlier in this thread.
Same goes for category, featured, latest, special etc. modules. Find the appropriate controller in the catalog/controller folder and make the edit.
Same goes for category, featured, latest, special etc. modules. Find the appropriate controller in the catalog/controller folder and make the edit.
Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions
Who is online
Users browsing this forum: No registered users and 327 guests