As I've been reviewing what she's gotten done so far, I notice that all the image links are absolute: www.hersite.com/development/image...
Is there anyway to change OC so the links are relative? So that when I copy her site to the root directory all the links won't have to be redone?
When I do move the files to the root directory, what files need to be edited. Tell it to me like I'm a newby.
Thanks.
I don't quite understand...
Set the path in the config.php files (root and admin) the path is absolute. If you point it to where the images are then that is where they will be gotten from. Reminder the correct path for the images is image/catalog so in the config.php files for the images
define('DIR_IMAGE', '/home/content/57/10005557/html/opencarttest/image/');
OpenCart adds catalog to the defined path.
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
Currently, she has a zencart site running at www.hersite.com (not the actual domain name)
To test and subsequently build her opencart site, opencart was installed at www.hersite.com/development
As she has been building her site, I've gone back and if I "view source" for one of her product pages, I see <img src="http://hersite/development/image/cache/ ... gename.jpg"
Once I move all her files from the "development" subdirectory, to the root directory, none of these image links will work, as the photos will actually be at <img src="http://hersite/image/cache/catalog/Iren ... gename.jpg"
One should be able to set opencart so that when building out a store, relative links are used. In this case <img src="/image/cache/catalog/Irene/images/imagename.jpg"
For the second part, is there a step by step that tells how to move from a subdirectory to a root directory and then what exactly needs to be edited in the .php files? Guess I don't really understand what the php files actually do - I haven't even looked at them to this point.
Thanks in advance
define('DIR_IMAGE', '/home/content/xx/1000xxxx/html/opencarttest/image/'); parameter
It will become DIR_IMAGE . catalog and DIR_IMAGE . cache/catalog so if you change the DIR_IMAGE to the root of define('DIR_IMAGE', '/home/content/xx/1000xxxx/html/image/'); it will do as you want, but the hard code structur will remain the same.
The html pages are generated on the fly so relative paths are not needed...
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
Sample: Destination site-url/shop/index.php...
Code: Select all
# SEO URL Settings
RewriteEngine On
RewriteBase /shop/
adding some DIRECT LINKS to the DB (Shop-SUB), where the old Shop has been before.
Code: Select all
INSERT INTO `oc_blog_description`
................ src="http://images.openshop.li/shop/image/data/vqmod-570x333.jpg" width="499" /></p>\r\n<p>\r\n .....
Code: Select all
INSERT INTO `oc_order` (`order_id`, `invoice_no`, `invoice_prefix`, `store_id.......... (24, 0, 'INV-2015-00', 0, 'Ernie''s OpenShop', 'http://www.hitline.info/shop/', 2, 3, 'Hans', 'Meier', 'jti@jacob.ch', '
I would THEREFORE clean out a DB first, of such Data !
Good Luck !
Ernie
openshop.li
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
In opnecart links are relative by default. As others said you just need to properly adjust config.php / .htaccess after yuo copy / move the files.geotnt wrote:Alright then. Thanks.
So, to move the store from the subdirectory to the root folder, is it as simple as dragging and dropping all the files from one to the other, since it's still on the same domain?
All mods | OpenCart Bulk Related Products Ultimate Edition |GeoIP hide Prices / no add to cart by country| CSS override | Direct link to checkout / skip add to cart / buy now link | AUTO pilot - reward & purchase points
Except for the htaccess file. Where is it located? And, I'm still fuzzy on the details of what needs to be edited therein.
2 - Run repair_settings.php and select all the recommended paths
3 - Run your new store...
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
My wife currently has a web domain, www.herdomain.com
Her host allows multiple addon domains, so she also has www.addondomain.com which is a subdomain located under public/html
We've developed her new site as a subdomain, currently at www.herdomain.com/development
Will it work if I change the directory name for subdomain to subdomain2 and then rename development to subdomain?
It seems like it should, but I'm unsure and help would be appreciated.
geotnt wrote:Can someone tell me if this will work?
My wife currently has a web domain, http://www.herdomain.com
Her host allows multiple addon domains, so she also has http://www.addondomain.com which is a subdomain located under public/html
We've developed her new site as a subdomain, currently at http://www.herdomain.com/development
Will it work if I change the directory name for subdomain to subdomain2 and then rename development to subdomain?
It seems like it should, but I'm unsure and help would be appreciated.
You have a beautiful wife..
Now regarding your question, I think you should follow the instructions given to you in all the above posts, and if you want to try to just rename the directory instead, be my guest. If it works, great...
Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...
first, you wanted to try Opencart installed in a sub_dir (called "development")geotnt wrote:Randem, thanks for replying. Let me try to explain better.
Currently, she has a zencart site running at http://www.hersite.com (not the actual domain name)
To test and subsequently build her opencart site, opencart was installed at http://www.hersite.com/development
As she has been building her site, I've gone back and if I "view source" for one of her product pages, I see <img src="http://hersite/development/image/cache/ ... gename.jpg"
Once I move all her files from the "development" subdirectory, to the root directory, none of these image links will work, as the photos will actually be at <img src="http://hersite/image/cache/catalog/Iren ... gename.jpg"
One should be able to set opencart so that when building out a store, relative links are used. In this case <img src="/image/cache/catalog/Irene/images/imagename.jpg"
For the second part, is there a step by step that tells how to move from a subdirectory to a root directory and then what exactly needs to be edited in the .php files? Guess I don't really understand what the php files actually do - I haven't even looked at them to this point.
Thanks in advance
then, now You want to move all source to webroot ?
as my point, you shoulde edit the config files, example like this:
remove the sub_fir in each line// HTTP
define('HTTP_SERVER', 'http://domain/development/');
// HTTPS
define('HTTPS_SERVER', 'http://domain/development/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/development/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/development/system/');
define('DIR_IMAGE', '/home/user/public_html/development/image/');
define('DIR_LANGUAGE', '/home/user/public_html/development/catalog/language/');
define('DIR_TEMPLATE', '/home/user/public_html/development/catalog/view/theme/');
define('DIR_CONFIG', '/home/user/public_html/development/system/config/');
define('DIR_CACHE', '/home/user/public_html/development/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/user/public_html/development/system/storage/download/');
define('DIR_LOGS', '/home/user/public_html/development/system/storage/logs/');
define('DIR_MODIFICATION', '/home/user/public_html/development/system/storage/modification/');
define('DIR_UPLOAD', '/home/user/public_html/development/system/storage/upload/');
I did give you the simplest way to achieve what you want to do. Try it before complicating the issue...
Put the file in the root of the new folder where you copied the OpenCart software to then run the repair_settings.php script, take all the defaults and recommendations and you should be all done.
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
Why? I don't know you and I'm leery of running scripts on my machines so I was asking if anyone could vouch for it.Randem wrote:You win... I give up
I asked a simple question about renaming the directories and you want me to run a javascript on your say-so? That's not good computer security by any stretch.
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
Again, I'll ask the question: Is there any reason why I can't just rename the directories, edit the config files and be done with it? Seems to me that would be much easier than this. But, if it won't work, that's a whole other story.
Thanks for being patient.
Users browsing this forum: No registered users and 134 guests