Jump to content

Clean install 6.1.10, add to basket not working.


Recommended Posts

I have done a clean install of 6.1.10 downloaded less than 12 hours ago from the site. i am currently running locally from my computer to demo/test it out to see if the features will work for me. 

Upon install, blank configuration with the sample data. I have followed the steps in the welcome video, added a paypal payment gateway, added the free shipping module. configured a single product of my own. when browsing the store front and attempting to add a product to basket I get a page within a page (like an iframe) starting inside from the logo and nothing is added to basket. 

Below are my server details I was really hoping this would be the solution I was looking for. 

MAMP 4.2 on OSX 10.12.6
Apache 2.2.32 
PHP 7.0.20 mod_rewrite enabled
MySQL 5.6.35

Link to comment
Share on other sites

Welcome dollmaker! Glad to see you made it to the forum.

We have found the likely culprit when one sees a copy of the entire store where the shopping basket details should be (hidden just off the left edge), that is, a storefront within a storefront, it is because of some sort of aggressive caching by the web server.

Just recently, I worked with a person who was having some troubles:



Still cannot register new people.  Fill out the form, hit the register button and then there is no action.


I ask that you discover if there is any extra caching happening. Ask your hosting server admin if there may be something called "HTTP Cache Headers" enabled, or anything else that may interfere with a web server delivering the freshest content from a PHP script.



This last email got me thinking... I am the hosting server admin.  So, I did a quick search for "disable cache apache2 ubuntu"... this jumped out at me
sudo a2enmod headers -- then a quick restart of apache (service apache2 restart). Success!


CubeCart is supposed to return only the rendered and populated HTML that is the box.basket.php template.

If a pre-emptive caching system determines that the page requested is actually in its cache, such as the entire index.php storefront, then that will be what the AJAX request gets and replaces the existing shopping basket <div> with the returned code - the whole storefront.

Edited by bsmither
Link to comment
Share on other sites

Even though CubeCart does a good job of figuring out where it is, on a local dev machine, it helps tremendously to override some of this decision making.

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

$glob['storeURL'] = ''; // No trailing slash
$glob['standard_url'] = ''; // No trailing slash
$glob['ssl_url'] = ''; // No trailing slash
$glob['cookie_domain'] = ''; // No trailing slash
$glob['rootRel'] = '/store/'; // YES trailing slash or just a slash
$glob['ssl_path'] = '/store/'; // YES trailing slash or just a slash

In .htaccess, make these changes:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /store   ### or just a slash ###
### Default store 404 page ###
ErrorDocument 404 /store/index.php

If CubeCart is installed in the "doc_root" of the server, that is, not in it's own folder, don't include the "/store" part.

Then, use instead of 'localhost'.

Edited by bsmither
  • Thanks 1
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.

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...