Post by WavMixer » Fri Jul 31, 2020 1:03 am

Fresh install OC 2.0.3.2
Website: https://shop.grassroots1968.com/

I installed the software in a sub-directory of the main domain www.grassroots1968.com. After the installation I set up a sub-domain of shop.grassroots.com and now the icons at the top of the page for account, wish list etc and not showing as well as the add to cart buttons. They are all appearing as a small square. I'm thinking that I may just need to make a change to the .htaccess file? Any help is appreciated.
Last edited by WavMixer on Fri Aug 07, 2020 5:25 am, edited 2 times in total.

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by by mona » Fri Jul 31, 2020 1:32 am


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by IP_CAM » Fri Jul 31, 2020 1:34 am

Add this Content to your .htaccess file, further down, after the

Code: Select all

RewriteCond %{HTTP_USER_AGENT} ^-?$ [NC]
RewriteCond %{REQUEST_URI} !.*\.(ico|cur|mp3|mpeg|webp|svg|ttf|eot|woff|woff2|js|cfg|css|xml|pdf|zip|env|tar|sql|gz|exe|rar|arj|cab|iso|rpm|tbz|tgz|old|bak|backup|dump|db|7z)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
...
Section:

Code: Select all

## Allow cross-origin requests.
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule> 

<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|ico|pdf|flv|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
Header always append X-Frame-Options SAMEORIGIN
</FilesMatch>
</IfModule>

## Send the CORS header for images when browsers request it.
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
and set your HTTP_IMAGE + HTTPS_IMAGE links (for both Shops) in the
config.php files:
either (SUB-DOMAIN configuration for HTTP Access !)

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://subdomain.yourshop.com/');
define('HTTP_IMAGE', 'http://yourshop.com/image/');
// HTTPS
define('HTTPS_SERVER', 'http://subdomain.yourshop.com/');
define('HTTPS_IMAGE', 'http://yourshop.com/image/');
or (SUB-DOMAIN configuration for HTTPS Access !)

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://subdomain.yourshop.com/');
define('HTTP_IMAGE', 'https://yourshop.com/image/');
// HTTPS
define('HTTPS_SERVER', 'https://subdomain.yourshop.com/');
define('HTTPS_IMAGE', 'https://yourshop.com/image/');
REGULAR DOMAIN Sample configuration for HTTP Access !

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.yourshop.com/');
define('HTTP_IMAGE', 'http://yourshop.com/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.yourshop.com/');
define('HTTPS_IMAGE', 'http://yourshop.com/image/');
or in reverse, if no WWW. is part of the regular Link, to also make 'em 'Cookie-free' for Test Sites.
Good Luck! ;)
Ernie

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by WavMixer » Fri Jul 31, 2020 1:41 am

Thank you Mona & Ernie!! I'll try these this out when I get home tonight from my day job. As always, your help is much appreciated. ;D

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by WavMixer » Fri Jul 31, 2020 10:39 am

No luck was required Ernie! Great instructions got the job done. 8)

THANK YOU!!!!

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by paulfeakins » Mon Aug 03, 2020 6:37 pm

WavMixer wrote:
Fri Jul 31, 2020 10:39 am
No luck was required Ernie! Great instructions got the job done. 8)

THANK YOU!!!!
Don't forget to add [SOLVED] to the beginning of the post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by WavMixer » Wed Aug 05, 2020 1:01 pm

Well, I'm almost there. I have done a fresh install with a theme package and all was well in the sub-directory, I pointed the sub-domain to the sub-directory and the front end looks good, however I'm receiving the following error when logged into the /admin back end...

Warning: Use of undefined constant HTTP_CATALOG - assumed 'HTTP_CATALOG' (this will throw an Error in a future version of PHP) in /home/dh_5kw8wa/grassroots1968.com/2-3-0-2/admin/controller/common/header.php on line 121Warning: Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' (this will throw an Error in a future version of PHP) in /home/dh_5kw8wa/grassroots1968.com/2-3-0-2/admin/model/tool/image.php on line 42

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by khnaz35 » Wed Aug 05, 2020 3:08 pm

WavMixer wrote:
Wed Aug 05, 2020 1:01 pm
Warning: Use of undefined constant HTTP_CATALOG - assumed 'HTTP_CATALOG' (this will throw an Error in a future version of PHP) in /home/dh_5kw8wa/grassroots1968.com/2-3-0-2/admin/controller/common/header.php on line 121Warning: Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' (this will throw an Error in a future version of PHP) in /home/dh_5kw8wa/grassroots1968.com/2-3-0-2/admin/model/tool/image.php on line 42
This is a warning message for PHP Version , not only one warning soon you will be seeing more warning coming through, I will suggest better install the latest fresh copy of OC version so it is capable of PHP latest versions.

Or if you have VPS/Dedicated hosting service plan then stick to +5.4 version. (hence this is not recommend solution) but will work without any warning. ;)

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by WavMixer » Fri Aug 07, 2020 5:25 am

Well I thought that I had this done, my original issue of the icons is indeed resolved. However now I have a problem with the product images not showing up in the admin side. All images are fine in the front end, however none of the product images are showing up in the back end. When I right click on the broken image it shows https://shop.grassroots1968.com/admin/H ... -40x40.png. I'm pretty sure the HTTPS_CATALOG should not be there and when past the URL in my browser removing the HTTPS_CATALOG part and it takes me to the store front end. This was all working fine at first when I installed the software from a sub-directory https://grassroots1968.com/2-3-0-2/. After I pointed the sub-domain to https://shop.grassroots1968.com is when I lost my images. This is all after doing a fresh install of 2.3.0.2 that is packaged with a theme.

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by IP_CAM » Fri Aug 07, 2020 6:44 am

admin/HTTPS_CATALOGimage/cache/catalog/products/ .....
sure won't work!
You forgot to add a 'forward slash' , besides of linking the images
into the Admin Section, what should not be the case ... ???

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by WavMixer » Fri Aug 07, 2020 9:52 am

Here is what I have in my config.php for the admin section...

// HTTP
define('HTTP_SERVER', 'https://shop.grassroots1968.com/admin/');
define('HTTP_CATALOG',' https://shop.grassroots1968.com/');

// HTTPS
define('HTTPS_SERVER', 'https://shop.grassroots1968.com/admin/');
define('HTTPS_IMAGE', 'https://shop.grassroots1968.com/image/');
define('HTTP_CATALOG',' https://shop.grassroots1968.com/');

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by WavMixer » Fri Aug 07, 2020 10:38 am

Should I be looking somewhere other than the config files? The config files were the only files that I edited. The host did set the php version from 5.6 to 7.4 automatically when I used their control panel to point to this directory for the sub-domain shop.grassroots1960.com. That cased some errors to appear at the top of the page and then I had them set the php back to 5.6. This hosing service is more of a nightmare than a dream.
Last edited by WavMixer on Sat Aug 08, 2020 12:40 am, edited 1 time in total.

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am


Post by khnaz35 » Fri Aug 07, 2020 3:55 pm

Code: Select all

<?php

// HTTP

define('HTTP_SERVER', 'https://shop.xyz.com/admin/');

define('HTTP_CATALOG', 'https://shop.xyz.com/');



// HTTPS

define('HTTPS_SERVER', 'https://shop.xyz.com/admin/');

define('HTTPS_CATALOG', 'https://shop.xyz.com/');



// DIR

define('DIR_APPLICATION', '/home/gqvxzdmy/public_html/admin/');

define('DIR_SYSTEM', '/home/gqvxzdmy/public_html/system/');

define('DIR_LANGUAGE', '/home/gqvxzdmy/public_html/admin/language/');

define('DIR_TEMPLATE', '/home/gqvxzdmy/public_html/admin/view/template/');

define('DIR_CONFIG', '/home/gqvxzdmy/public_html/system/config/');

define('DIR_IMAGE', '/home/gqvxzdmy/public_html/image/');

define('DIR_CACHE', '/home/gqvxzdmy/public_html/system/storage/cache/');

define('DIR_DOWNLOAD', '/home/gqvxzdmy/public_html/system/storage/download/');

define('DIR_LOGS', '/home/gqvxzdmy/public_html/system/storage/logs/');

define('DIR_MODIFICATION', '/home/gqvxzdmy/public_html/system/storage/modification/');

define('DIR_UPLOAD', '/home/gqvxzdmy/public_html/system/storage/upload/');

define('DIR_CATALOG', '/home/gqvxzdmy/public_html/catalog/');



// DB

define('DB_DRIVER', '...............................................');

define('DB_HOSTNAME', '......................................');

define('DB_USERNAME', '......................................');

define('DB_PASSWORD', '.....................................');

define('DB_DATABASE', '......................');

define('DB_PORT', '.............................');

define('DB_PREFIX', '.............................');

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by WavMixer » Sat Aug 08, 2020 1:27 am

Thank you @khnaz35,

I'll double check this tonight when I get home :)

User avatar
New member

Posts

Joined
Sun Feb 23, 2014 3:15 am

Who is online

Users browsing this forum: No registered users and 51 guests