Solved

Opencart image filepath

Posted on 2013-01-09
1
2,208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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