Guest Posted December 18, 2005 Posted December 18, 2005 Gives you the option for each product if it can be purchased or not.. When you setup the products it has on/off buttons that will hide all the buynow buttons in the cart for the item you wish not to be sold for what ever reason Quote
Guest Posted December 18, 2005 Posted December 18, 2005 contrib. URL is http://www.oscommerce.com/community/contributions,3865 Any questions please post here... Quote
nOObstYle Posted January 12, 2006 Posted January 12, 2006 Hi, i have installed this contrib. When i want to disable purchase with the red button in the productlist in the adminmenue the site will not load. when i open the product and disable it with the "on/off buttons" it works. Please can you tell me how i can fix this bug? Quote
Guest Posted January 12, 2006 Posted January 12, 2006 Did you over write the files or edit your files with the code... Also is there a URL so I may see whats going on... If you dont want to give that info here you can send it to the email address in the install.txt file... I would be glad to look at it and make any adjustments for you... Then I can upload the correction in the contribution section... Also are you receiving any errors or the site just doesnt load... Mike Quote
nOObstYle Posted January 12, 2006 Posted January 12, 2006 I overwrite the orig. file "categories.php". If i press the red or green button the side will reload an then the screen is white. No errors and no text will be shown. I can?t give you the URL to the shop because the shop is not online yet. I think the problem is in this lines: <!-- START Added for the purchase feature option --> <td class="dataTableContent" align="center"> <?php if ($products['products_purchase'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag1&flag1=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag1&flag1=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?></td> <!-- END Added for the purchase feature option --> I have changed 'action=setflag1&flag1=0&pID=' to 'action=setflag&flag=0&pID=' Now the site will reload after i pressed the red or green button. I see the button i pressed for a second and then the botton before will shown again. Nothing changed in database. Quote
Guest Posted January 12, 2006 Posted January 12, 2006 Did you over write the general.php file as well as that file has the function call in it for that part of the contribution.. Also the 'action=setflag&flag=0&pID=' needs to be 'action=setflag1&flag1=0&pID=' Quote
nOObstYle Posted January 14, 2006 Posted January 14, 2006 (edited) The general.php was the problem. I have not modified this file. But now it works fine, good job mike. Thanks for your help. Edited January 14, 2006 by nOObstYle Quote
idlerob Posted January 23, 2006 Posted January 23, 2006 I get an error when i run the SQL in my database, i use myphp admin to do this ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1' Quote
Guest Posted January 23, 2006 Posted January 23, 2006 What error do you get in phpmyAdmin.. when you run the mysql statement.. Mike Quote
Guest Posted February 16, 2006 Posted February 16, 2006 What error do you get in phpmyAdmin.. when you run the mysql statement.. Mike I had the same error. use this instead // ALTER TABLE `products` ADD `products_purchase` TINYINT(1) NOT NULL DEFAULT '1 Quote
Guest Posted February 16, 2006 Posted February 16, 2006 I have uploaded a SQL fix to the downloads section.. The SQL fix is there was a ; missing at the end of the statement.. it should have read: ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1' ; Quote
cpennington Posted March 4, 2006 Posted March 4, 2006 Gives you the option for each product if it can be purchased or not.. When you setup the products it has on/off buttons that will hide all the buynow buttons in the cart for the item you wish not to be sold for what ever reason I installed this contribution and it's working great. I would like actually to make the Buy Now button link to the same URL as the "For more information, please visit this products webpage." link shown with product detail. Explanation: On my site, the purchasing actually takes place off-site. Is there a way to do that? My URL by the way is software-critic.com (still under construction) PS - The whole OSCommerce thing and contributions, is really impressive. I'm totally blown away that all this expertise is so readily available. Kudos to all of you! Quote
Guest Posted March 5, 2006 Posted March 5, 2006 Yes the Buy Now button can be linked to the For more information, please visit this products webpage when it is set in the admin panel... It would be some custom coding but I'd be glad to help you out with it.... Please email me with more info and I will do the coding and return it to the oscommerce community... Mike Quote
Guest Posted March 7, 2006 Posted March 7, 2006 When I run the MySQL command ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1'; I get the following error: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'products_purchase` TINYINT(1) NOT NULL DEFAULT '1'' at line 1 Quote
Guest Posted March 7, 2006 Posted March 7, 2006 Which version of phpmyadmin are you using... Try this ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1' Mike Quote
UncleSteve Posted August 18, 2007 Posted August 18, 2007 Which version of phpmyadmin are you using... Try this ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1' Mike I've tried running the above, but get this error SQL query: ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT( 1 ) NOT NULL DEFAULT '1' MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'products_purchase` TINYINT(1) NOT NULL DEFAULT '1'' at line 1 Perhaps I'm missing something? Can any one walk me through this please? Thanks :) PS. I'm running - phpMyAdmin - 2.10.0.2 Quote ____________________________________________________________________ ____________________________________________________________________
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.