Link to home
Start Free TrialLog in
Avatar of tonMachine100
tonMachine100

asked on

Opencart image filepath

I've added a column to the database to store image file paths.

I've populated it with some sample images file paths in the following format - data/red_blue.jpg, data/red.jpg.

I've amended the controller and template files so the field is now available.

However when i call the image through it cannot find the file beacuse the file path is incorrect. Rather creating a full file path eg.

www.mywebsite.co.uk/image/data/red_blue.jpg

Its only calling in the file path as specified in the database field eg.

data/red_blue.jpg

Is there some code that i need to add to the controller to tell the page to add the image url (www.mywebsite.co.uk/image/) to the link?

thanks
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial