![]() |
One product in a category |
Post Reply ![]() |
Author | |
bp_travis ![]() Newbie ![]() Joined: 27-June-2008 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() Posted: 19-November-2010 at 3:01pm |
When a category only has one product in it, is there a way to direct PC to go right to the product detail page without first showing the product in a listing and then the detail page?
Thanks |
|
![]() |
|
Brett ![]() Groupie ![]() ![]() Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
![]() ![]() ![]() ![]() ![]() |
On viewcategories.asp between lines 985 and 986 (may be different lines on your file, not sure if mine is modified), add these lines of code:
if pcv_intProductCount=1 then response.Redirect(pcStrPrdLink) end if This should be between count=count + 1 and loop, which is the main product loop of the viewcategories.asp page, right before this line: <%' If page style is M, show the Add to Cart button when Try that out and let me know if it works please. At the end of the first iteration of the main product loop, it checks the product count and if it is only one then it immediately redirects to that product page. *edit* Tested on my site and appears to work fine. Here's a copy of the original 4.1sp1 viewcategories.asp with the modification already made: viewcategories-oneproduct.zip Edited by Brett - 19-November-2010 at 7:53pm |
|
![]() |
|
bp_travis ![]() Newbie ![]() Joined: 27-June-2008 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
Tried it out and it works great! Thanks
|
|
![]() |
|
Brett ![]() Groupie ![]() ![]() Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
![]() ![]() ![]() ![]() ![]() |
No problem. Glad to hear it worked for you.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |