Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

direct product querie error in website


toyicebear

Recommended Posts

Posted

Hi there,

 

Maybe someone out there can lend me a hand in fixing a small problem, this goes for one shop where all the products are indexed by google et all......but now some of the products have been removed, to be replaced by new ones.....

 

 

But when someone comes from a searchengine link which goes directely to a product which have been removed...the get shown a 1064 error........

 

What i would like to do is set an if statement in the the product querie so that when a non exixting product is queried you get a product removed message or just a redirect to a 404 page or search page or just the frontpage......

 

ie i already have a working htaccess redirect for removed pages/ url typos and such, but it does not work when a product is directly queried.

 

Any help is appriciated...... :-)

Posted

this looks more like a coding 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 '' at line 1

select p.products_id from products p, products_to_categories ptc where p.products_status = '1' and p.products_id = ptc.products_id and ptc.categories_id =

 

as you should get something like this when the product is not there:

 

http://www.sexypants.me.uk/product_info.ph...products_id=141

 

check the db calls in product_info.php

 

email to me if you would like me to have a look - [email protected].

Your online success is Paramount.

Posted

Hi everyone,

 

i did some checking and i did find the cultprint in this case, it was the previous/next contribution which caused this problem....

Posted

and in includes/languages/english/product_info.php you can change the 'Product not found' to what you want - maybe a link to your home page or somert.

Your online success is Paramount.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...