Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

automatically visiting first product in category


facelessface

Recommended Posts

You can see the site i'm working on using the link below:

 

http://www.cazalsunglasses.com/product_inf...?products_id=61

 

What I want is for the user to be redirected to the first product in category (i.e. product_info.php) when they click a category in the left hand side.

 

E.g. if they click on 'cazal' top left.. Instead of taking them to a product list (which has been removed for this shop and replaced with the slider at the bottom) - it should take them to the first product in the category (in the case of cazal it should be the link given above).

 

Anyone have an idea of how to go about this?

 

Cheers

 

Mike

my sites:

----------

www.preciousmetal-online.co.uk

www.liparazzi.com

www.yaoh.co.uk

Link to comment
Share on other sites

You can see the site i'm working on using the link below:

 

http://www.cazalsunglasses.com/product_inf...?products_id=61

 

What I want is for the user to be redirected to the first product in category (i.e. product_info.php) when they click a category in the left hand side.

 

E.g. if they click on 'cazal' top left.. Instead of taking them to a product list (which has been removed for this shop and replaced with the slider at the bottom) - it should take them to the first product in the category (in the case of cazal it should be the link given above).

 

Anyone have an idea of how to go about this?

 

Cheers

 

Mike

 

I'm not sure of what coding would need to be done to make this happen, but i'm pretty sure it would involve the catalog/product_info.php file. Probably you would need to come up with an sql query that gives you the info for only the first product rather than all the products in the category. Sorry I dont know how to code well enough to help you any further, but hopefully somebody else on the forums can help you out. Good luck!

 

~Zach

Link to comment
Share on other sites

Still looking for a solution.. Basically i want it to redirect to the correct product_info.php upon clicking a category.. Instead of displaying a list of products in that category

 

Anyone have any advice?

my sites:

----------

www.preciousmetal-online.co.uk

www.liparazzi.com

www.yaoh.co.uk

Link to comment
Share on other sites

Still looking for a solution to this..

 

Anyone have a clue?

 

i guess i need to use the tep_redirect function.. but i don't know how to construct the query for the current category ...

my sites:

----------

www.preciousmetal-online.co.uk

www.liparazzi.com

www.yaoh.co.uk

Link to comment
Share on other sites

  • 3 months later...

i posted the same question HERE and only got this response thus far:

1) define "first" and modify your query appropriately in the MIDDLE section of the index.php file.

 

2 do not call the product listing file but use the ID generated by the query in step 1 to redirect to the product info page

Link to comment
Share on other sites

You need to make it clearer...What dictates that the first product in that category is displayed? The date added? The id number? The description? The product name?

 

Great site by the way!

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Well it looks like facelessface got it to work. I agree that he does have a very nice site (& orginal).

 

As for me I guess I would like to have it by the date added. My layout will be some what the same as facelessface's in that when you view a product you will also have on that page a thumbnail of every other product in that category.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...