Guest Posted March 31, 2005 Posted March 31, 2005 Hi, I'm having problems getting the Buy now button to work? I dont remember a time when it added the product to the shopping cart? This is how the code looks in product_listing.php case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; I've installed: Star Product, Product Description, Product Sort, CCCVV_ISSUE_START Selectable with card blacklist, Attribute sort, Price Update, Advanced Actual Attribute Price, 'On the Fly' Auto Thumbnailer using GD Library When I do a view source this is the code for index.php <td align="center" class="productListing-data"><a href="http://www.naturalfigure.co.uk/index.php?cPath=22&sort=1a&action=buy_now&products_id=29"><img src="includes/languages/english/images/buttons/button_buy_now.gif" width="60" height="14" border="0" alt=" Buy Now " title=" Buy Now "></a> </td> and it says this in the staus bar: http://www.naturalfigure.co.uk/index.php?c...&products_id=29 When I click the buy now button, I get taken to the page: product_info.php?products_id=29 instead of the shopping cart page? Can someone point out to me hopefully the obvious of why this is happening, Much Appreciated, Ally
TerryK Posted March 31, 2005 Posted March 31, 2005 Just for a bit more info... If a product has attributes, the customer is forced to go to the product page to select the order options for a product. If it has no attributes, the 'Buy Now' button will add an item to the cart. On my site, I set it up so that products with attributes show a 'More Info' button, while products with no attributes display the 'Buy Now' button. If you're using the Option Type Feature for product attributes, my code might help you if you're interested in doing that, but don't know how it would meld into the stock product_listing.php page if you're not. If you want me to post it, let me know. Terry Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. *
Guest Posted March 31, 2005 Posted March 31, 2005 If you want me to post it, let me know. <{POST_SNAPBACK}> That would be great :-)
TerryK Posted March 31, 2005 Posted March 31, 2005 Hi Ally, I'd forgotten that I posted this in the Documentation section, so you can read the instructions there. Here's the link: http://www.oscommerce.com/forums/index.php?showtopic=96915 (Make sure you read past the first post, as there was a correction to the code that I posted a little further down.) HTH, Terry Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. *
Recommended Posts
Archived
This topic is now archived and is closed to further replies.