Zen Cart Logo
Forums / General Questions / Custom 'Buy Now' button on the home page leads to HTTP 406 error

Custom 'Buy Now' button on the home page leads to HTTP 406 error

Views: 931

Results 1 to 6 of 6
16 Dec 2011, 3:19 AM
#1
jxl1 avatar

jxl1

New Zenner

Join Date:
Sep 2010
Posts:
22
Plugin Contributions:
0

Custom 'Buy Now' button on the home page leads to HTTP 406 error

Having an issue whereby clicking on the 'Buy Now' button on the home page leads to HTTP 406 error. This only applies to products with attributes.

Also if I click back after the error & then re-try the 'Buy Now' button it does take me into the product page as intended.

Anyone come across something similar?

16 Dec 2011, 4:50 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Custom 'Buy Now' button on the home page leads to HTTP 406 error

Got a URL where this can be seen in action?
Plus, please click Reply below and answer all the questions in the Posting Tips section.

16 Dec 2011, 12:58 PM
#3
jxl1 avatar

jxl1

New Zenner

Join Date:
Sep 2010
Posts:
22
Plugin Contributions:
0

Re: Custom 'Buy Now' button on the home page leads to HTTP 406 error

Thanks for the response DrByte. The site is https://www.123av.co.uk.

Its running the latest version of Zen Cart 1.3.9h. Add-ons include Ceon URI Mapping, Google Merchant Center, Easy Populate & this featured product module

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=870

Only been aware of the problem recently. All the mods were added at least 2 months ago.

Any help would be appreciated

16 Dec 2011, 4:32 PM
#4
stampsville avatar

stampsville

Zen Follower

Join Date:
Jul 2004
Posts:
123
Plugin Contributions:
0

Re: Custom 'Buy Now' button on the home page leads to HTTP 406 error

IF I remember right, it's been awhile since I tried that one, but SEO URL modules wouldn't allow it to work for me when I tried. If I turned those off it will probably work. Going by memory of 2 years ago...Good luck.
Stampsville

17 Dec 2011, 4:10 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Custom 'Buy Now' button on the home page leads to HTTP 406 error

Your "buy now" button is entirely custom, and not part of the Zen Cart core code.

You're generating links somehow which include a ?action=buy_now parameter slapped haphazzardly onto the end. This is bad, and is akin to what hackers try to do when exploiting vulnerabilities or probing for possible holes. Your server's security system is trapping it and throwing the 406 error.

Your so-called "SEO" URL rewriter is also complicating things for you, since it masks the proper way of passing parameters.

You can only have one question-mark in a URL. Your slapping-on of the extra question-mark and a parameter is breaking it.

You have two options:
a) Use a proper Zen Cart function to generate the links, instead of randomly hacking something on
b) At the very least switch to using & instead of ? if you don't want to use the proper Zen Cart approach.

19 Dec 2011, 4:45 PM
#6
jxl1 avatar

jxl1

New Zenner

Join Date:
Sep 2010
Posts:
22
Plugin Contributions:
0

Re: Custom 'Buy Now' button on the home page leads to HTTP 406 error

I appreciate your repsonses & will pass on the comments to our website designer so he can fix the issue.