Solved

Opencart image filepath

Posted on 2013-01-09
1
1,986 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
website content maintenance 3 57
Upload PDF On Mobile 1 78
WPF issue with Trigger 2 65
Problem to Popup 2 48
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

708 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

13 Experts available now in Live!

Get 1:1 Help Now