Forums / General Questions / Limit Number of Items Shown in Cart

Limit Number of Items Shown in Cart

Views: 679

Results 1 to 3 of 3
28 Sep 2012, 11:37 AM
#1
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Limit Number of Items Shown in Cart

I have found a small issue where a client of mines site / server was playing up due to server resources being all used up. Upon investigation it was because one single visitor was maliciously adding hundreds of products to the shopping cart, and for each product in the cart obviously there is a defined number of queries associated with it. in this case was around 80-90. Thats 250 products resulting in a 20,000 query page load on average!

what I am wondering is if there is a way to limit the number of items displayed to safeguard against this? setting it to 30 for example, not stopping from someone checking out with more than 30 but just to stop more than 30 being called and displayed on that page?

Any ideas?

Cheers

Phil

Phil Rogers
A problem shared is a problem solved.

28 Sep 2012, 1:03 PM
#2
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Limit Number of Items Shown in Cart

Don't know the response but i suggest you to block that IP at .htaccess level .

28 Sep 2012, 1:15 PM
#3
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Limit Number of Items Shown in Cart

solo_400:

Don't know the response but i suggest you to block that IP at .htaccess level .

I did. but thats not preventative. I figure I just need something that will add a LIMIT on the query that calls the products in cart array when displaying them?

Phil Rogers
A problem shared is a problem solved.