Jump to content

[RESOLVED] Issues getting started


MyNameWasTaken

Recommended Posts

Hi,

I've worked some with OpenCart before, and decided to try out CubeCart on a whim. I am very impressed with CC's admin panel, especially the product options and matrix - WOW, that is a sweet feature that blows OC out of the water!

However, while testing on localhost, I've run into some show-stoppers that I have not yet been able to resolve:

1. Security alert trying to login to admin panel using Chrome: possible CSRF (works in Firefox, so I can manage for now, but why doesn't it work with Chrome?). I saw a thread about this somewhere, but don't have the link at the moment, and the contents were not helpful in resolving this issue.

2. Clicking 'Checkout' or 'View Cart' always leaves me with an empty cart when using Chrome (again, works in FF, but this will seriously impede sales when the site goes live, as lots of people use browsers other than FF). I saw this thread and changed my store timezone settings to match my actual timezone, checked the local server timezone, etc., without success, and there are many other threads with the same or similar issues, yet I don't see any open bug reports on the Github issue tracker - what's going on, and how can we fix it?

3. EDIT: See 1st reply. After installing and enabling the UPS plugin (on FF), I still receive the "Unfortunately there are no suitable shipping methods available for your order. This may be because the total weight of your order is too high or we cannot ship to your country" message when trying to check out (in FF), despite both the store and the 'customer' being located in the US and the product having a defined weight. I searched for similar issues, but all I found was someone who had failed to install a shipping module at all. I have both installed and configured one, yet no shipping methods appear to be available.

This is all with a fresh install of v6.0.7, both code and database, without any plugins other than the default UK language and the free standard UPS plugin (which had difficulties recognizing that it was installed in the admin panel for a while, but deleting previous cookies finally got the settings page to load correctly instead of showing a blank page; also, it doesn't have anywhere to enter my UPS credentials, but I can deal with that later).

Btw, I have Chrome configured to block 3rd party cookies as well as JavaScript, but still have issues even after adding an exception for localhost and then enabling JS globally. FireFox has uBlock, uMatrix, and PrivacyBadger plugins installed, as well as also blocking 3rd party cookies (I don't suspect that is the issue anyway), yet has none of the issues that Chrome does. I have yet to try any other browsers.

Am I missing something completely obvious? I'd really hate to have to go back to OpenCart after seeing how awesome product management may be with CubeCart, but OC works right out of the box. :(

EDIT: Btw, I've seen the knowledge thread about setting the cookie domain - mine is set to '.localhost' and SSL is not enabled (yet).

Edited by MyNameWasTaken
Mark title as resolved
Link to comment
Share on other sites

Ok, it turns out I am just partially stupid - I had changed my firewall settings to block all outgoing connections that didn't match a rule, which was preventing the UPS call via cURL. Got tipped off to that by viewing the request log in the admin panel, which was full of the following:

14 Sep 2015, 12:54 	
Request Sent - http://www.ups.com/using/services/rave/qcostcgi.cgi?accept_UPS_license_agreement=yes&10_action=3&13_product=1DA&14_origCountry=US&15_origPostal=98370&19_destPostal=98370&22_destCountry=US&23_weight=2&47_rateChart=Regular%2BDaily%2BPickup&48_container=00&4
accept_UPS_license_agreement=yes&10_action=3&13_product=1DA&14_origCountry=US&15_origPostal=98370&19_destPostal=98370&22_destCountry=US&23_weight=2&47_rateChart=Regular%2BDaily%2BPickup&48_container=00&49_residential=1
Error:
cURL Error (7): Failed to connect to www.ups.com port 80: Bad access
Response received

UPS rates work fine now, but the problems with Chrome are still unresolved.

Link to comment
Share on other sites

My suggestion with Chrome was to check the time. But I see you did that. I will fall back to blaming Chrome being very uptight about cookies.

On one hand, in my opinion, while CC6 can work very well under localhost, I prefer (because of other reasons) 127.0.0.1.

On the other hand, I say CC6 can work very well on a local server, it works the very best on a server that answers to a domain name.

On the third hand, CC6 can be forced to use certain web addresses, bypassing it's very good algorithms of figuring out where it is. On a local server, those algorithms are not perfect.

In the file /includes/global.inc.php, add the following statements:

// Adjust the following as necessary:
$glob['storeURL'] = 'http://127.0.0.1/606_debug';
$glob['standard_url'] = 'http://127.0.0.1/606_debug';
$glob['ssl_url'] = 'https://127.0.0.1/606_debug';
$glob['cookie_domain'] = '127.0.0.1';
$glob['rootRel'] = '/606_debug/'; // With trailing slash, or just a slash
$glob['robots_path'] = 'L:/WebServer/robots.txt';

 

Link to comment
Share on other sites

Thanks bsmither!

Interesting that it is so picky on Chrome, and only on localhost - only after switching to 127.0.0.1 like you suggested would it actually work, localhost on its own (after pasting and changing the links you posted above) still had the same CSRF error.

It's also interesting that I've never experienced any other cart that has this issue, though I've only briefly evaluated 5 or 6. I can't believe there are some people that still develop a website on a live host, and many more that don't use version control, and... xD

Anyway, thanks again for the tip!

Link to comment
Share on other sites

Just want to let others know that if you set the cookie domain to 127.0.0.1 and use that as the basis of your URL address instead of 'localhost', you may not need to make any changes to the global.inc.php file, even when using Chrome.

It could also be that my cookies are already set, so I may update this post if, after deleting them, I need to re-add those lines to global.inc.php, but so far all is well without them.

Thanks again to bsmither for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...