Post by SeanRamey » Thu Jul 12, 2018 4:46 pm

So, I'm trying to create a local development copy of an opencart site that has never had one before, and even worse, may be operating on modified code in opencart itself... So, I've mostly got it working, but when I try to go to different parts of the site, it tries to link me to an invalid location. This location happens to be a valid filepath for the most part.
For instance:
<a href="https:///Users/seanramey/WebDev/slimsejuice-dev/index.php?route=product/category&amp;path=109"><span class="main-menu-text">Premium E-Liquid</span></a>
The path in bold should be: "http://localhost:8080/slimsejuice-dev/"

I can't seem to figure out how it's getting that file path into the link? Could anybody that knows more about Opencart help me out here?

Newbie

Posts

Joined
Thu Jul 12, 2018 4:25 pm

Post by Johnathan » Thu Jul 12, 2018 10:12 pm

Check your constants in config.php and admin/config.php --- one of those may be referencing your local file system, rather than the localhost file server.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by SeanRamey » Fri Jul 13, 2018 8:18 am

That doesn't seem to be the issue. Both config.php files reference the filesystem, but as far as I know, they are supposed to. I'll post the full config.php files minus the database info.
admin/config.php:

Code: Select all

/ HTTP
define('HTTP_SERVER', 'http://localhost:8080/slimsejuice-dev/admin/');
define('HTTP_CATALOG', 'http://localhost:8080/slimsejuice-dev/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost:8080/slimsejuice-dev/admin/');
define('HTTPS_CATALOG', 'http://localhost:8080/slimsejuice-dev/');

// DIR
define('DIR_APPLICATION', '/Users/seanramey/WebDev/slimsejuice-dev/admin/');
define('DIR_SYSTEM', '/Users/seanramey/WebDev/slimsejuice-dev/system/');
define('DIR_LANGUAGE', '/Users/seanramey/WebDev/slimsejuice-dev/admin/language/');
define('DIR_TEMPLATE', '/Users/seanramey/WebDev/slimsejuice-dev/admin/view/template/');
define('DIR_CONFIG', '/Users/seanramey/WebDev/slimsejuice-dev/system/config/');
define('DIR_IMAGE', '/Users/seanramey/WebDev/slimsejuice-dev/image/');
define('DIR_CACHE', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/cache/');
define('DIR_DOWNLOAD', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/download/');
define('DIR_LOGS', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/logs/');
define('DIR_MODIFICATION', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/modification/');
define('DIR_UPLOAD', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/upload/');
define('DIR_CATALOG', '/Users/seanramey/WebDev/slimsejuice-dev/catalog/');
config.php:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://localhost:8080/slimsejuice-dev/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost:8080/slimsejuice-dev/');

// DIR
define('DIR_APPLICATION', '/Users/seanramey/WebDev/slimsejuice-dev/catalog/');
define('DIR_SYSTEM', '/Users/seanramey/WebDev/slimsejuice-dev/system/');
define('DIR_LANGUAGE', '/Users/seanramey/WebDev/slimsejuice-dev/catalog/language/');
define('DIR_TEMPLATE', '/Users/seanramey/WebDev/slimsejuice-dev/catalog/view/theme/');
define('DIR_CONFIG', '/Users/seanramey/WebDev/slimsejuice-dev/system/config/');
define('DIR_IMAGE', '/Users/seanramey/WebDev/slimsejuice-dev/image/');
define('DIR_CACHE', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/cache/');
define('DIR_DOWNLOAD', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/download/');
define('DIR_LOGS', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/logs/');
define('DIR_MODIFICATION', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/modification/');
define('DIR_UPLOAD', '/Users/seanramey/WebDev/slimsejuice-dev/system/storage/upload/');

Newbie

Posts

Joined
Thu Jul 12, 2018 4:25 pm

Post by SeanRamey » Thu Jul 19, 2018 12:02 pm

Ok... So I don't know what in the world is happening, but the same link that I originally posted has changed. Seemingly for no reason.. Now the code looks like this:

Code: Select all

 <a href="http://localhost:8080/slimsejuice-dev/premium-e-juice-e-liquid-vape"><span class="main-menu-text">Premium E-Liquid</span></a>
Thing is, this still gives me a 404 error and I don't know why. I have found one link that will work, my shopping cart link:

Code: Select all

<a href="http://localhost:8080/slimsejuice-dev/index.php?route=checkout/cart" class="icon-only top-menu-item-4"><i style="margin-right: 5px; font-size: 16px" data-icon=""></i><span class="top-menu-link">Shopping Cart</span></a>
Any ideas?

Newbie

Posts

Joined
Thu Jul 12, 2018 4:25 pm

Post by Johnathan » Thu Jul 19, 2018 10:03 pm

The SEO URL probably doesn't work because you don't have SEO URLs turned on in System > Settings > Server, and/or you didn't rename the .htaccess.txt file to .htaccess. Both of those are required for SEO URLs to work in OpenCart. (The .htaccess.txt file is invisible on most normal filesystems, so you'll need to use some type of file manager that lets you see an rename that in order to use it.)

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 11 guests