Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

  • 4 weeks later...
Posted

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?

Posted

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

Posted

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.

Posted

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='

Posted (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 by nOObstYle
  • 2 weeks later...
Posted

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'

Posted

What error do you get in phpmyAdmin.. when you run the mysql statement..

 

Mike

  • 4 weeks later...
Posted
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

Posted

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' ;

  • 3 weeks later...
Posted
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!

Posted

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

Posted

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

Posted

Which version of phpmyadmin are you using...

 

Try this ALTER TABLE `products` ADD `products_purchase` `products_purchase` TINYINT(1) NOT NULL DEFAULT '1'

 

Mike

  • 1 year later...
Posted
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

____________________________________________________________________

____________________________________________________________________

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...