hflsales:
Because I want them to click on the item page. My items have attributes that need to be added. Clicking on the buy now button from the category listing won't let them add the attributes. I want them to click the add to cart button from the item page.
Out-of-the-box Zen Cart already skips the Buy Now button when a product has attributes, because it already knows that attributes must be selected before Adding to Cart.
For example, see the Bug's Life MultiPak item in this list: http://www.zen-cart.net/index.php?main_page=index&cPath=22 ... note the "more info" links instead of the Buy Now button (or qty boxes, depending on the switch setting for Display Multiple Products Qty Box Status).
So, if yours isn't working the way Zen Cart works out-of-the-box, it makes me wonder: why not? And usually the answer to that starts with a detailed list of all the ways in which you've changed the code so that it's different than the original distribution files, including things added like plugins, and any code alterations you've made, and any settings you've adjusted in the Admin.
Perhaps you've added a template that's got a big bug in it, because it completely disregards the original built-in logic for this feature.
.
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.