Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Call For Price v4.0 Problem


tobz

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!

Link to comment
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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...