phillipgrizzell1 Posted July 30, 2003 Posted July 30, 2003 Hi, I use OSC for downloadable products... My question is, can it be done so that if a product has a value of 0.00 or is free, then the buy now button is disabled and a add to my account and instantly added to the 'my account history'. Some of my downloads will be free, but in tests it always wants to goto checkout...... Is there a mod or am i asking the impossible.? Rgds Phil
Rumble Posted July 30, 2003 Posted July 30, 2003 I dont know about the second half of your request but this will start you off on displaying the buy now button only if the product has a value greater than 0 In catalog/inlcudes/modules/product_listing.php replaces the following line $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> '; with if ($listing['products_price'] == '0') { $lc_text = 'Add to history button'; } 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> '; } When you fgure out the second part you can replace Add to History button to whatever you want it to be. Reddy to Rumble Thank you osCommerce and all who Contribute to her!
phillipgrizzell1 Posted July 30, 2003 Author Posted July 30, 2003 Cheers Rumble.... I did that. That works a treat. The text i have changed to 'right click to download' small error.... $listing requires it to be $listing_values Cheers Phil
Rumble Posted July 30, 2003 Posted July 30, 2003 Yes sorry $listing or $listing_values depending on which version of osc! Reddy to Rumble Thank you osCommerce and all who Contribute to her!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.