Silverado05 Posted July 2, 2007 Share Posted July 2, 2007 Hello, I am working with this one contribution to hide the buy now/ add to cart button if sold out but still show the product. I have successfully installed this to my product info but I am having problems with this on my product_listing page. It is section of code to copy and paste but for some reason when I add it it shows all items as sold out even if it isn't. Here is the contribution: Show Sold Out Items Here is a screen shot of what it is doing. I have even tried this on a clean shop and still doesn't work. Anyone know of a code that works to remove the buy now button from the product_listing page successfully? I use to have one installed that worked but can't find it now. So if anyone can help me out that would be great. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Silverado05 Posted July 2, 2007 Author Share Posted July 2, 2007 I have tried a couple of other ones with no luck. Anyone offer any insight or help. Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Silverado05 Posted July 11, 2007 Author Share Posted July 11, 2007 I am still having no luck with this. Here is the code from the install file. Find this: $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> '; And replace with this: /** original **/ //$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> '; /** show-soldout-v1.0 **/ if($listing['products_quantity'] <= 0 || $listing['products_status']==0) $lc_text = tep_image_button('button_sold_out.gif', IMAGE_BUTTON_SOLD_OUT) . ' '; else $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> '; /** end show-soldout-v1.0 **/ Pretty simple cut and dry straight forward installation and has you can see from the pic in the first post that is what it does. Not matter if it is sold out or not it is removing the buy now button with the code above. So does anyone have an idea of how to remove the buy now buttons if sold out successfully on the product listing page. I have achieved this on the product info but the listing page is giving me some troubles. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Silverado05 Posted July 11, 2007 Author Share Posted July 11, 2007 Solved Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2007 Share Posted October 29, 2007 i've used this code to solve the same problem.. i would also like to hide the price if the item is out of stock.. how would i go about that? Link to comment Share on other sites More sharing options...
mom2ashley Posted December 19, 2007 Share Posted December 19, 2007 Solved Hi Can you please share how you solved this problem? I used the same contrib. In ny product listing page, it still displays the BUY NOW button even if the product is out of stock. It only shows the SOLD OUT button when I click on the product picture for more info and the add to cart button is replaced with the SOLD OUT button... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.