Jump to content

Add to Basket --> Cart Empty - SOLUTION


Recommended Posts

Posted

Hi

I'm glad I found this thread but I'm not sure I'm seeing what my client is going through. Thanks Estelle (I've bought several of your mods for other clients) - for the suggestion on the cart_empty language - very good suggestion.

Here is my situation

http://www.centigradeproducts.com - main url

http://www.centigradeproducts.com/shop/ - shopping cart

https://www.centigradeproducts.com - SSL URL (registered as www.centigradeproducts.com

Although the site can be called with or without the www to start, I have www. set throughout in order to match moving back and forth from main page to shopping to checkout, etc.

I can not duplicate the problem on either IE6 or Firefox.

My partner cannot duplicate the problem on IE7

My client is getting tons of calls. Many of his customers are retirees and I'm thinking that might be part of the problem in browser settings...I've been told many of them are not computer friendly - and it's causing much stress for them on the customer service end, and I'm considering writing some informational pages on browser settings, but thinking also that much of it would be beyond what they might be able to do on their own (customers).

Here is what my client posted, in order:

===========

Here's how it happens:

From home page of website, client clicks "click here to see accessories you

can order for your cooler", then click "to order your power outlet adapter,

click here", this opens a new window:

Problem #1 occurs here, a lot of people, especially those on AOL have pop-up

blockers in place that will prevent the opening of the new window, and trust

me, they have no idea how to remove this block. We may need to add a warning

that says, pop-ups must be allowed on this site to go to the store.

Or, not open a new window when going to the store (my preferred solution).

If people get passed the pop-up block:

Then problem #2 occurs: items in cart still shows zero: this does not happen

all the time, it's erratic. If you press "add to cart" then it goes directly

to two instead of one. I just had a lady over the phone this happened to,

it's also happened to me several time. We also have about 4 or 5 customers

now that "double-purchased" the power supply, probably because of the same

issue.

All I can tell you is it's happening on and off, but I have seen this issue

several times.

Another example: as I'm typing this e-mail, I had a LVD and a power supply

in my cart, I clicked both "delete items" and "empty cart", then I clicked

"return to store home", the LVD is still showing in the cart despite erasing

everything in the checkout page.

I stand by what I reported: the shopping cart function is erratic on IE7.

=============================================

>>I changed all links to go from page to page as opposed to opening a new browser window - I don't believe this had anything to do with the problem as they were non cart pages<<<

part 2

============

Lorri,

I went to use the website to purchase a power supply, after adding the power

supply, the cart still shows empty. When I add the power supply again, I end

up with two power supplies.

I am running IE7.

We are doing some double work on our side and it is eating us alive. Can you

help?

===========================

I did some investigation and noticed that the cube cart settings were not putting the

www. in so I corrected that.

We removed the "buy" button that shows up on the products index to help alleviate

confusion so it just says "more info" with the one link, so that all information could be seen then product could be added directly from the product info page

My partner implemented Estelle's suggestion from the earlier post.

I wrote the customer and told him to clear his cache files - completely shut down all browsers and try again and let me know.

He responded with

I tried again, but still have the same problem.

I even tried it on another computer (with Vista IE7).

==================================

I was planning on registering cube for him after we got everything finished and insured that he liked it, but from an earlier post - someone with a registered version had not received a fix on this either. We worked REALLY hard on customizing this cart and it looks great - the only mod in there at this time is one we had to write for Innovative Gateway to process cc's, but that should not have any effect on this - there are a couple of mods I need to buy for him including exporting orders/customers - but I don't want to touch anything until I can fix this.

If anyone has implemented anything that has cured the problem with this situation, please let me know - I feel like we have done everything according to the great information found here by this wonderful community - but to no avail.

Thanks in advance - and sorry for the length - was trying to include info for possibilities.

  • 2 weeks later...

  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I tried another version of the redirect in the root .htaccess file:

:huh:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.jammaboards\.com [NC]

RewriteRule ^(.*) http://www.jammaboards.com/$1 [L,R=301]

</IfModule>




It works if I just enter jammaboards.com, then it will redirect to www.jammaboards.com ...but unfortunately  if I enter jammaboards.com/store (location of my cubecart 3.0.16) then it just stays at jammaboards.com/store ...   
Ok this issue is definetly caused by entering a cubecart site with out the www then when a customer visits their cart they are directed to the same domain but with the www Heres the FIXEs In my htaccess I added the code thusly (we are Using the SEO mod) Original code in rukis seo mod htaccess file

this fix will work on sites with SSL installed that use their www.domainame.com as the FQDN on the certificate

if you are using shared SSL (not reccomended EVER) or your FQDN for your SSL certificate is a subdomain

ie. secure.mycoolstore.com I would hesitate and caution you to NOT use this fix...

Hope this helps!

Kinetic

# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{QUERY_STRING} (.+) 

RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1&%1 [L]




My changes


# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.yourdomainnamehere\.com [NC]

RewriteRule ^(.*) http://www.yourdomainamehere.com/ [L,R=301]

RewriteCond %{QUERY_STRING} (.+)




the above ONLY WORKS if your store is in your sites root and NOT a subfolder!!!!





USE this code if your store is in a subfolder and not root

In my htaccess I added the code thusly (we are Using the SEO mod)

Original code in rukis seo mod htaccess file


# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{QUERY_STRING} (.+) 

RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1&%1 [L]




My changes


# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.yourdomainnamehere\.com [NC]

RewriteRule ^(.*) http://www.yourdomainamehere.com/store/ [L,R=301]

RewriteCond %{QUERY_STRING} (.+)
Posted

Ok this issue is definetly caused by entering a cubecart site with out the www then when a customer visits their cart they are directed to the same domain but with the www

Heres the FIXEs

USE this code if your store is in a subfolder and not root

My changes

# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.yourdomainnamehere\.com [NC]

RewriteRule ^(.*) http://www.yourdomainamehere.com/store/ [L,R=301]

RewriteCond %{QUERY_STRING} (.+)

Kinetic

Hi Kinetic, cool fix. Now my store is in a sub folder.

I see that will work if I if I got to my root url off 'jammaboards.com', it will then forward me to 'www.jammaboards.com/store' ... However, if for some reason the customer goes directly into my shop by entering 'jammaboards.com/store' then the 'www' will still be missing. :huh:

I'm not sure how to do this, but is it possible to change that htaccess code somehow to only re-route someone if they go to my store subfolder at 'jammaboards.com/store' to 'www.jammaboards.com/store'?

I hope I wrote that down right and it makes sense.

Thanks!

-Tim

Posted

Ok this issue is definetly caused by entering a cubecart site with out the www then when a customer visits their cart they are directed to the same domain but with the www

Heres the FIXEs

USE this code if your store is in a subfolder and not root

My changes

# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.yourdomainnamehere\.com [NC]

RewriteRule ^(.*) http://www.yourdomainamehere.com/store/ [L,R=301]

RewriteCond %{QUERY_STRING} (.+)

Kinetic

Hi Kinetic, cool fix. Now my store is in a sub folder.

I see that will work if I if I got to my root url off 'jammaboards.com', it will then forward me to 'www.jammaboards.com/store' ... However, if for some reason the customer goes directly into my shop by entering 'jammaboards.com/store' then the 'www' will still be missing. :yeahhh:

I'm not sure how to do this, but is it possible to change that htaccess code somehow to only re-route someone if they go to my store subfolder at 'jammaboards.com/store' to 'www.jammaboards.com/store'?

I hope I wrote that down right and it makes sense.

Thanks!

-Tim

Tim the htaccess code as I have it written for a sub folder store SHOULD (and does in every store Ive updated with it)

will redirect to the store with the www.

jammaboards.com/store

will get you

www.jammaboards.com/store

going to jammaboards.com/ will only redirect to www.jammaboards.com/

you will notice subtle difference between your original code and mine the $1 is left off my code on the redirect section as this cause problems on the redirect actually working

also this htaccess file should be the one in the store folder not site root

the one that comes with the SEO mod by ruki

edit it like I have shown and re upload to the /store/ folder

try it...

Kinetic

Posted

Tim the htaccess code as I have it written for a sub folder store SHOULD (and does in every store Ive updated with it)

will redirect to the store with the www.

jammaboards.com/store

will get you

www.jammaboards.com/store

going to jammaboards.com/ will only redirect to www.jammaboards.com/

you will notice subtle difference between your original code and mine the $1 is left off my code on the redirect section as this cause problems on the redirect actually working

also this htaccess file should be the one in the store folder not site root

the one that comes with the SEO mod by ruki

edit it like I have shown and re upload to the /store/ folder

try it...

Kinetic

When I first did this I had the changes in my root directory and not in the .htaccess store folder.

So far it seems like it's going to work. <_<

Thanks Kinetic!

Posted

Hi, I didn`t even know I had this problem till I tried out the cart with and without WWW and this definatly a problem for me. I dont have the SEO mod so what can I do? Also sorry to be so ignorant but I have nothing in my .htaccess file what does this mean?

Thanks for all the help.

Guest fieldy
Posted

Hi. I only seem to get this problem when i have product options associated with an item. Im not sure if this is the same problem for everyone else?

I too would love to see this fixed. Its a bloody nightmare!!!

Chris

  • 2 weeks later...
Guest NeoMatrix
Posted

B. This problem should only occur when customers first enter your store via http://www.domain.com or http://www.domain.com/etc...

Estelle, your modification seems to work for me. I am using SEO mod as well. I've tested in IE7 and Firefox and both appear to add items into the cart. My cert does not contain "www" (my mistake in registration), so I must redirect as well.

I've changed the following in "index.php":

// INCLUDE CORE VARIABLES & FUNCTIONS

include_once("includes/global.inc.php");


-to-


// INCLUDE CORE VARIABLES & FUNCTIONS

include_once("includes/global.inc.php");

// Redirect to Registered SSL Cert name

if (strpos($glob['storeURL'], $_SERVER["HTTP_HOST"]) == 0)

{

  Header("Location: " . $glob['storeURL'] . $_SERVER["REQUEST_URI"]);

  exit;

}

Tom

  • 1 month later...
Guest superdevo
Posted

I was having the same problem with the empty cart scenario, but neither of Kenetic's FIXEs worked for me. After I added either of his fixes (the regular fix or the subdomain fix), and the user would type in "mydomain.com" it would route the user to "www.mydomain.com/mydomain" for some reason. This may be because I am not uses an SEO module. I am not sure.

I did find some code from another post that did work for me, here it is in case it helps anyone else:

RewriteEngine On  

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]

RewriteRule ^.*$ http://www.mydomain.com%{REQUEST_URI} [R=permanent,L]

Cheers,

Superdevo

  • 2 weeks later...
  • 3 weeks later...
Guest BaggBoy
Posted

Any solid fixes for this issue, yet? Seems like the problem will never be solved now that the developers have ver. 4 to deal with.

  • 2 weeks later...
Posted

USE this code if your store is in a subfolder and not root

In my htaccess I added the code thusly (we are Using the SEO mod)

Original code in rukis seo mod htaccess file

# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{QUERY_STRING} (.+) 

RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1&%1 [L]




My changes


# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.yourdomainnamehere\.com [NC]

RewriteRule ^(.*) http://www.yourdomainamehere.com/store/ [L,R=301]

RewriteCond %{QUERY_STRING} (.+)

this fix will work on sites with SSL installed that use their www.domainame.com as the FQDN on the certificate

if you are using shared SSL (not reccomended EVER) or your FQDN for your SSL certificate is a subdomain

ie. secure.mycoolstore.com I would hesitate and caution you to NOT use this fix...

Hope this helps!

Kinetic

Kinetic,

I'm very interested in trying your fix. My store IS in a subdirectory and I DO have the SEO mod implied. However, looking at my .htaccess file, is doesn't look like your original example, so I'm hesitant to just paste in your new code.

This is what my htaccess file looks like in my ROOT directory:

RewriteEngine on

RedirectMatch temp ^/$ http://www.karenscookies.net/shop

RewriteCond %{HTTP_HOST} ^.*$

RewriteRule ^shop/?$ http://www.karenscookies.net/shop [R=302,L]

I ALSO have an htaccess file in the subdirectory where my store lives. It looks like this:

# <rf> search engine friendly mod

# 1) only used if you selected 'Apache directory lookback and ForceType supported' as your server configuration

<Files shop>

ForceType application/x-httpd-php

</Files>

# end 1)

# 2) only used if you selected 'Apache RewriteRule supported' as your server configuration

RewriteEngine On

RewriteCond %{QUERY_STRING} (.+)

RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1&%1 [L]

RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1 [L]

RewriteCond %{QUERY_STRING} (.+)

RewriteRule prod_(.*).html index.php?act=viewProd&productId=$1&%1 [L]

RewriteRule prod_(.*).html index.php?act=viewProd&productId=$1 [L]

RewriteCond %{QUERY_STRING} (.+)

RewriteRule info_(.*).html index.php?act=viewDoc&docId=$1&%1 [L]

RewriteRule info_(.*).html index.php?act=viewDoc&docId=$1 [L]

RewriteCond %{QUERY_STRING} (.+)

RewriteRule tell_(.*).html index.php?act=taf&productId=$1&%1 [L]

RewriteRule tell_(.*).html index.php?act=taf&productId=$1 [L]

# end 2)

# <rf> end mod

<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off

</IfModule>

So first, which of these htaccess files should I be tinkering with? and Second, can someone point out what needs to change in my case?

I would sure appreciate it. We're getting into our busy season and there is a good number of people that simply give up and never return when my site fails them.

  • 2 years later...
Posted

Well apparently this is still a problem today.

I have 3.0.2 installed and IE 8 and 6 will not add to the cart. Firefox works great.

I did find out that if I go direct to my stores address http://174.120.150.187/~razor//store/index.php

instead of my masked one http://brrcm.com/store/ that IE works.

Is there not somewhere I can change the address so I dont have to take away my masking?

Posted

I may have found a solution to my internet exploder not adding to cart issue unless you set the security to "low".

Since I have godaddy masking to my host, hostgator I went into the HG control panel and setup a "redirect" so now the cookies is put on with the masked address.

  • 10 years later...
Posted

I know this is an old thread but I am having this issue now. As soon as I turned on my secure server on my domain my basket no longer adds. Everything was working fine for months until I turned SSL on.

Posted

I did turn off the SSL. So now my stuff adds to the cart. Just odd that when you turn it off one can not add to the basket. While messing around with it I noticed if you go to a specific item then add that way it works. I will turn the SSL back on so you can check it out. It seems to work correctly one moment but not the next.

Thank you for your assistance!

Www.cherrycreeksoaps.com/store/index.php

Ok, I have been experimenting with the site. Now, I noticed that my homepage (domain) was not working but the store is. I set a redirect to my store to bypass the front page until I can figure out why it was not working. This issues seems to be with my domain host and not with CubeCart. 

Everything seems to be working with CubeCart until I turned on my SSL and then redirected the page. This is probably why this issue has not been completely fixed because I do not think it is CubeCart but the host issue.

Posted (edited)

Somewhere along the way, after the POSTed data has been dealt with (Add to Basket),  CubeCart sends a 302 Bounce back to the site.

In your case, the Location: header  of the 302 Bounce response is specifying your web address without the www. part. (Doing so is called "Cross-Origin Resource Sharing" and is blocked by modern browsers by default.)

So, please determine if there is any .htaccess file that may have a rewrite rule that rewrites a URL to strip off the www. prefix.

What is the exact version of CubeCart you are running?

Edited by bsmither
Posted

I am using version 6.2.9.

This morning I noticed that my domain was not working www.cherrycreeksoaps.com so I thought I would just redirect the site to the cart. When doing so I decided to turn on the SSL. From there it was one thing after another going wrong.

As of this moment, I do have the SSL turned on. I am also able to add to the basket. But when you were talking about the 302 bounce I must have had the redirect set wrong. I did not have the “only redirect with www.” Check but the “with or without”. I am sorry for the trouble and I really do appreciate your help.

The only thing I can think of other than having the redirect set wrong was because the domain was down it just caused issues.

Picture1.png

Picture2.png

Posted (edited)

When I said "CubeCart sends a 302 Bounce back to the site", I mean that there is code in CubeCart that will tell the browser what to do after CubeCart has processed the data submitted by a form (the Add to Basket button).

The browser is told to fetch the page at "cherrycreeksoaps.com/store/index.php".

The image above shows an entry in Current Redirects, which that entry might be the cause of this issue. (I don't understand what this tool in your hosting control panel actually does.)

I also have to wonder why the initial page request is working.

That's what is (was) happening on your site.

But I see now that something got fixed. It seems to be working.

The Add to Basket is supposed to be an ajax POST, with only the HTML that draws the shopping basket contents box gets returned.

Edited by bsmither

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