robburne Posted November 10, 2018 Share Posted November 10, 2018 Hi Everyone, Since installing a self-sign SSL certificate on v 2.3.4 of my store I am unable to add items to my cart - I get a message that my cart is empty. My config as as follows: define('HTTP_SERVER', 'https://foobar.com'); define('HTTPS_SERVER', 'https://foobar.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'www.foobar.com'); define('HTTPS_COOKIE_DOMAIN', 'www.foobar.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/foobar.com/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); There are plenty of other posts to be found reporting this issue without any definitive solution. Is this an issue with OS Commerce - seems to be the case? Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 10, 2018 Share Posted November 10, 2018 A self-signed cert will display a warning and require your customers to accept it so it shouldn't be used. I haven't tried using one on a live shop for that reason but I doubt it would work the way your configure file is setup. The configure file is saying there is a cert for the domain name, which there isn't. You can try turning off the ssl option. That won't turn off the self-signed cert since that is applied by the server. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 1 hour ago, robburne said: Is this an issue with OS Commerce - seems to be the case? check with your host or in your control panel and see if you have access to "Let’s Encrypt" if you do use its free auto assign ssl, it will last 90 days and then auto renew automaticly. Works flawlessly with osC , have it running on a number of sites. You will have to delete your self signed ssl first. https://letsencrypt.org/ Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 Actually I just checked, I am using a Let#s Encrypt SLL, apologies for the mis-information. I understand that the self-signed is a bad choice however I don't understand how this would cause the basket to be empty. So given that my cert is issued by Let's Encrypt and my config is as above, why can't I add items to the cart? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 Self signed would mean you had to set up the cert manualy which you probably did wrong! deleat the manual cert and use the auto sign method and then see what you have. Also make sure your config is correct in shop and admin. Also would help to check error log and see what if anything is reported. Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 I didn't ever install the self signed, my host offers 3 options, the self-signed, let's encrypt and a paid version. The Let's Encrypt is done automatically with one click. I forgot to mention and I'm not sure if it is of significance but my shop is on a sub-domain of my main domain. The cert was installed for the subdomain though. I will check my logs - hadn't thought of that. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 6 hours ago, robburne said: Since installing a self-sign SSL certificate on v 2.3.4 of my store I am unable to add items to my cart 😊 we can only advise based on what you say. Still check both configs are pointing to the same places , especially the cookies as that is the main cause of empty baskets. The error logs should show something. Re: https on subdomain Setup your subdomains. In cpanel go to SSL/TLS. Install and Manage SSL for your site (HTTPS) > Manage SSL sites. add the key and certificate you gets from step 2 to all domains and subdomains. Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 What should the http_cookie_domain be. If I disable all SSL and use either of he following: define('HTTP_COOKIE_DOMAIN', '/'); define('HTTP_COOKIE_DOMAIN', '/mydomain.com'); I also get the empty basket problem. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 You need too find your correct url for your subdomain, if you are in a subdomain I would expect the url to be https://mysubdomain.mywebsite.com Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 installing in a directory such as www.mywebsite.com\myshop\ is not the same as installing in a subdomian. Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 1 minute ago, JcMagpie said: installing in a directory such as www.mywebsite.com\myshop\ is not the same as installing in a subdomian. my shop is installed in: shop.mydomain. It is entirely distinct from the main domain Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 10, 2018 Share Posted November 10, 2018 ok but your config files do not reflect that. is foobar the domian or the subdomain? Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 Apologies - here is my revised config: define('HTTP_SERVER', 'https://shop.foobar.com'); define('HTTPS_SERVER', 'https://shop.foobar.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'shop.foobar.com'); define('HTTPS_COOKIE_DOMAIN', 'shop.foobar.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 So should be the path to my site root /cookies.... where cookies is a directory i will create in my site root? Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 I did already try that Link to comment Share on other sites More sharing options...
robburne Posted November 10, 2018 Author Share Posted November 10, 2018 Ok I am beaten - this isn't worth the effort it really isn't. This thread is heading in the same direction as every other thread on this topic. This is clearly an issue with OS Commerce - there are plenty of examples of this problem and so one ever gets or posts a solution. For the record I can't login to admin now - page just refreshes. Go figure! Link to comment Share on other sites More sharing options...
robburne Posted November 11, 2018 Author Share Posted November 11, 2018 I think I got to work: define('HTTP_SERVER', 'https://www.shop.foobar.com'); define('HTTPS_SERVER', 'https://www.shop.foobar.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', '.www.shop.foobar.com'); define('HTTPS_COOKIE_DOMAIN', '.www.shop.foobar.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); I was missing the www which was causing the problems. I also tested this by having my host redirect all www traffic to http:// and that now works with my previous config. Hopefully this will help someone else who arrives here with the same problem Link to comment Share on other sites More sharing options...
Dan Cole Posted November 11, 2018 Share Posted November 11, 2018 14 hours ago, robburne said: This is clearly an issue with OS Commerce - there are plenty of examples of this problem and so one ever gets or posts a solution. So I guess it wasn't an OS Commerce problem? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
robburne Posted November 11, 2018 Author Share Posted November 11, 2018 1 hour ago, Dan Cole said: So I guess it wasn't an OS Commerce problem? Dan It seems not Sorry for the rant, but in getting myself mad it helped fix the issue. Link to comment Share on other sites More sharing options...
Dan Cole Posted November 11, 2018 Share Posted November 11, 2018 It was nice that you came back to report on it. Often people don't do that and as you pointed out, it looks like their plea for help went unanswered. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
KateHoll Posted November 23, 2018 Share Posted November 23, 2018 Very useful information for people, I think this is what everyone needs. Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.