?
Solved

Opencart image filepath

Posted on 2013-01-09
1
Medium Priority
?
2,336 Views
Last Modified: 2013-01-29
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
0
Comment
Question by:tonMachine100
1 Comment
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 38758535
The easy way would be to change your database data from  data/red_blue.jpg to /image/data/red_blue.jpg
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why WooCommerce is one of the majorly favored choices when it comes to having an eCommerce store. This article will acquaint you with some reasons that I believe make it one of the best eCommerce platforms available.
Before you approach an Ionic Mobile App development company for developing mobile apps using the ionic framework, you must know why you should choose the framework. Let's try to understand that through this article.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question