Solved

Opencart image filepath

Posted on 2013-01-09
1
2,069 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 52

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Learn about the eCommerce marketing trends for the year ahead.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now