Jump to content

issue with "empty basket" button


sean1688
 Share

Recommended Posts

Please help!

 

website http://www.mastechpowersupply.com

 

the issue:

 

customer can add an item to the basket, and manually change the quantity and update the basket. however, the "empty basket" button does not work. it seems to do nothing

 

I thought I tested before and it worked, but yesterday when trying to improve the website speed, we put in these changes to the .htaccess file and I started to notice the issue and other related issues. after commenting out the changes to the .htaccess file, we are still having this issue.

 

# <IfModule mod_expires.c>
 
# Enable expirations
# ExpiresActive On
 
# Default directive
# ExpiresDefault "access plus 1 month"
 
# My favicon
# ExpiresByType image/x-icon "access plus 1 yearâ€
 
# Images
# ExpiresByType image/gif "access plus 1 month"
# ExpiresByType image/png "access plus 1 month"
# ExpiresByType image/jpg "access plus 1 month"
# ExpiresByType image/jpeg "access plus 1 month"
 
# CSS
# ExpiresByType text/css "access 1 monthâ€
 
# Javascript
# ExpiresByType application/javascript "access plus 1 month"
 
# </IfModule>
 
# compress text, html, javascript, css, xml:
# AddOutputFilterByType DEFLATE text/plain
# AddOutputFilterByType DEFLATE text/html
# AddOutputFilterByType DEFLATE text/xml
# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE application/xml
# AddOutputFilterByType DEFLATE application/xhtml+xml
# AddOutputFilterByType DEFLATE application/rss+xml
# AddOutputFilterByType DEFLATE application/javascript
# AddOutputFilterByType DEFLATE application/x-javascript
 
Link to comment
Share on other sites

on a related topic, out of the changes on .htaccess file for improving website speed, which ones are compatible with cubcart? we are currently running 5.2.16


we the changes were suggested by google, and put in ourselves. we did notice a visible improvement on the speed of pages loading, but came to realize the problems.

 

so my reqeust is two folds:

 

1) how to resolve the issue of "empty basket", if it cannot be done easily, can we simply remove the button?

2) what changes are compatible with cubecart, as we do wish to improve the speed of website

Link to comment
Share on other sites

 

Hmm its hard to say without experimenting. 

 

It looks like only this line would cause an issue but I'm not sure. Of course all static content can be cached e.g. Image, CSS, JS etc.. everything but the "HTML".

ExpiresDefault "access plus 1 month"

 

This shouldnt be a problem and is recommended as a catch all for any file types not specifically mentioned.  Your best bet is to remove all, make sure the empty basket works again and then add back one line at a time and test.  There is nothing obvious that I can see that would cause that problem and this is something we recommend to all hosting clients as it makes a huge difference to page load speeds 

 

Ian

Link to comment
Share on other sites

  havenswift-hosting and Al   thanks for your help. it seems to take care of the issues. however, there are some random artifacts if you add something to the basket and then remove them, and go to other links. you may see basket being empty  on some links and showing there are items in the basket on other links. strange, but at least does not affect the ordering process.

Link to comment
Share on other sites

it seems to take care of the issues.

Sorry, what does ? You havent explained what you did or what the outcome was ?

however, there are some random artifacts if you add something to the basket and then remove them, and go to other links. you may see basket being empty on some links and showing there are items in the basket on other links. strange, but at least does not affect the ordering process.

So are you saying that you have removed all directives that you added to the .htaccess file and you still have problems ? The behaviour you are describing is more likely to be due to switching between different versions of your domain such as with and without the www.

The url settings on the SSL page have to be correct and ideally you need specific directives in the .htaccess to use usage of one or the other and to also remove the /index.php

Ian

Link to comment
Share on other sites

what I did was I removed the ExpiresDefault "access plus 1 month", but left others intact.

 

no, the artifact is not related to the  switching between different versions of your domain such as with and without the www.

 

specifically, I see one item in basket (correct one) when at http://mastechpowersupply.com/linear-dc-power-supply.html, but see two items in basket when at http://mastechpowersupply.com/variac-auto-transformer.html (wrong).

 

the good news is that if I actually click on the view basket, it shows the correct information.


after emptying the basket, I went to check again, the first link again showing the correct item in basket (which is 0), but the second link still has two items in the basket

Link to comment
Share on other sites

And actually the expiration headers are good for dynamic sites as they set a far away expiration time for resources which don't often change; and it's required by things like Google PageSpeed Insights to get a higher score. Expiration headers tell the browser not to keep reloading elements which don't change like a favicon, or the logo, etc.

 

Expiration headers should absolutely be used with any dynamic site, including carts, WordPress, etc.

 

Sorry to chime in on that if unwanted comment :-)

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.

 Share

×
×
  • Create New...