Forums / All Other Contributions/Addons / Custom "Add To Cart" button not working with attributes in product listing

Custom "Add To Cart" button not working with attributes in product listing

Locked

Started by drlivingston on 7 Dec 2009, 4:04 PM · Views: 1,910

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
7 Dec 2009, 4:04 PM
#1
drlivingston avatar

drlivingston

New Zenner

Join Date:
Dec 2009
Posts:
3
Plugin Contributions:
0

Custom "Add To Cart" button not working with attributes in product listing

I am new to Zen Cart, running version 1.3.8a, fresh install on 11/23/2009.

Working on website http://theahernfamily.com/DinnersOnMe/OrderNow/index.php that will allow customers of the site to purchase home cooked meals. I have 2 products for testing purposes - 1 with an "Add to cart" button, and another with a "Buy Now" (ORDER) button.

When clicking "Add to cart", I want it to go to the main page for the category (main_page=index...). Right now it goes to a page that says, "Sorry, the product was not found." (main_page=product_info...) Help!!! :frusty:

7 Dec 2009, 4:29 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Custom "Add To Cart" button not working with attributes in product listing

You have some sort of addon/customization installed which is putting attributes in your product listing, and also appears to be generating invalid HTML. For example, you have at least one unclosed <form> tag on your product listing page. There are probably other problems with the addon which are causing your add-to-cart button to not function normally.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Dec 2009, 4:50 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom "Add To Cart" button not working with attributes in product listing

The problem you describe is happening on the return from cart to previous page (default behavior setting); it is looking for the individual product info page and not finding it (probably not looking for the right address).

7 Dec 2009, 8:55 PM
#4
drlivingston avatar

drlivingston

New Zenner

Join Date:
Dec 2009
Posts:
3
Plugin Contributions:
0

Re: Custom "Add To Cart" button not working with attributes in product listing

I removed this addon called "Options on Product Listing v2.0" which allowed for attributes to be selected on the Product Listing page. But, I am back to the "more..." URL now that I have the attributes on the Product Info page. When I validate http://theahernfamily.com/DinnersOnMe/OrderNow/index.php , I receive no errors. Was that where you saw the <form> error, DrByte? I want to reinstall the "Options on Product Listing v2.0" since I like the customer being able to select attributes on the product listing page, click "Add to cart", have it added to the cart and then come back onto the product listing page.

7 Dec 2009, 9:08 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Custom "Add To Cart" button not working with attributes in product listing

It appears to be working properly now from the normal product-info page.
Thus, it would seem to confirm that your problem is something amuck in the addon you were using.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Dec 2009, 9:09 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Custom "Add To Cart" button not working with attributes in product listing

DrLivingston:

When I validate http://theahernfamily.com/DinnersOnMe/OrderNow/index.php , I receive no errors. Was that where you saw the <form> error, DrByte?
This page was where I saw it when you had the addon installed: http://theahernfamily.com/DinnersOnMe/OrderNow/index.php?main_page=index&cPath=1

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.