When inserting images, it would be useful if when the "Image Title" is left blank, it would populate from the image filename, minus the file extension.
So if you're uploading product1.jpg, it would automatically give the image title "product1".
This would make uploading images a far less tedious task.
It's a bit quick and dirty but here's what I did:
OPEN admin/controller/image.php
FIND:
$sql = "insert into image_description set image_id = '?', language_id = '?', title = '?'";
ABOVE ADD:
if (empty($value['title'])) { $value['title']=$upload->getName('image'); }
FIND:
if ((strlen($value['title']) 64)) {
ABOVE ADD:
if (empty($value['title'])) { $value['title']=$upload->getName('image'); }
...done...
That will mean now, that when you submit an image file, it will simply use the filename as the "Image Title" if it is left blank.
OPEN admin/controller/image.php
FIND:
$sql = "insert into image_description set image_id = '?', language_id = '?', title = '?'";
ABOVE ADD:
if (empty($value['title'])) { $value['title']=$upload->getName('image'); }
FIND:
if ((strlen($value['title']) 64)) {
ABOVE ADD:
if (empty($value['title'])) { $value['title']=$upload->getName('image'); }
...done...
That will mean now, that when you submit an image file, it will simply use the filename as the "Image Title" if it is left blank.
That is a good idea.
I have added "integration" fields to customer (customer_code) and product (product_code) which are alternate unique text indexes. If I name the images to match the product codes, it makes it really easy to match the images to products later on. Easier for the customer too who identifies their products by the product_code, not the product_id in opencart.
You have made it even easier now.
I have added "integration" fields to customer (customer_code) and product (product_code) which are alternate unique text indexes. If I name the images to match the product codes, it makes it really easy to match the images to products later on. Easier for the customer too who identifies their products by the product_code, not the product_id in opencart.
You have made it even easier now.

Who is online
Users browsing this forum: No registered users and 1 guest