Jump to content
Sign in to follow this  
tobz

Free Call For Price v4.0 Problem

Recommended Posts

Hi

 

I have just installed this contibution, everthing seems to have gone OK except now I am getting this error whenever a product or list of products is supposed to be displayed:

 

1064 - You have an error in your SQL syntax near 'THE_NEW_PRODUCTS_FILTER2' at line 1

 

select products_id from products where products_id= '48' THE_NEW_PRODUCTS_FILTER2

 

[TEP STOP]

 

Obviously the products_id='xx' varies depending on what is being displayed. Does anyone have an idea of what the problem is or which file to look in? This really has me stumped.

 

I only installed this to get the "Shrowroom Only" option - maybe there would have been a simpler way to do this?


tobz

 

osCommerce Links

osCommerce Templates

osCommerce UK <-- This site is for sale!

Share this post


Link to post
Share on other sites

Never mind. The problem I had was that certain manufacturers do not allow shops to sell their products online.

 

If it helps anyone, I solved it by including the following code in catalog/product_info.php:

 

Around line 170 there are these two lines of code:

 

<td class="main"><a href="<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)); ?>"><?php echo tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS); ?></a></td>

<td align="right" class="main"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

Change it to this:

 

<td class="main"><a href="<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)); ?>"><?php echo tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS); ?></a></td>

<td align="right" class="main">

<?php

   if ($product_info_values['manufacturers_id'] == 'xx') {

     echo '<b>Sorry, but this product is not available to purchase online.</b>';

   } else {

?>

<input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

<?php

   }

?>

</td>

 

Change the xx to the manufacturer_id of the manufacturer that doesn't allow their products to be sold online. This will replace the "In Cart" button with the message "Sorry, but this product is not available to purchase online." for any products made by this manufacturer.

 

If you have the "Buy Now" column switched on in the product listing then you would have to do something similar there too but, luckily, I don't have it switched on :D


tobz

 

osCommerce Links

osCommerce Templates

osCommerce UK <-- This site is for sale!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×