Page 1 of 1

Missing Icons

Posted: Fri Jul 31, 2020 1:03 am
by WavMixer
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.

Re: Missing Icons

Posted: Fri Jul 31, 2020 1:32 am
by by mona

Re: Missing Icons

Posted: Fri Jul 31, 2020 1:34 am
by IP_CAM
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

Re: Missing Icons

Posted: Fri Jul 31, 2020 1:41 am
by WavMixer
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

Re: Missing Icons

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

THANK YOU!!!!

Re: Missing Icons

Posted: Mon Aug 03, 2020 6:37 pm
by paulfeakins
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.

Re: Missing Icons

Posted: Wed Aug 05, 2020 1:01 pm
by WavMixer
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

Re: Missing Icons

Posted: Wed Aug 05, 2020 3:08 pm
by khnaz35
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. ;)

Re: [SOLVED] Missing Icons

Posted: Fri Aug 07, 2020 5:25 am
by WavMixer
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.

Re: Missing Icons

Posted: Fri Aug 07, 2020 6:44 am
by IP_CAM
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 ... ???

Re: Missing Icons

Posted: Fri Aug 07, 2020 9:52 am
by WavMixer
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/');

Re: Missing Icons

Posted: Fri Aug 07, 2020 10:38 am
by WavMixer
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.

Re: Missing Icons

Posted: Fri Aug 07, 2020 3:55 pm
by khnaz35

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', '.............................');

Re: Missing Icons

Posted: Sat Aug 08, 2020 1:27 am
by WavMixer
Thank you @khnaz35,

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