| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Redirect to Product Page when only One product in category | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#31
|
|||||||||
|
|||||||||
![]() If using a recent version of CDSEO with canonical link support then the primary url would be indexed only regardless.
You could also change the code from: Code:
to: Code:
|
|||||||||
#32
|
|||||||
|
|||||||
![]() How would I use this code for a category without a subcategory, though there maybe 1 to 5 products?
__________________
______________ version 4.1.9 Gold |
|||||||
#33
|
|||||||
|
|||||||
![]() Quote:
You don't. The purpose of this mod is so that your customer can simply choose a category (or subcat) and be taken to the ONLY product in the category (or subcat). There is no other purpose for this mod. If you have a category with 1 to 5 products, you could make a subcat per product, assign the product as the only product in the subcat, and then use this code. Got it?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#34
|
|||||||||
|
|||||||||
![]() HI,
Will this work with 4.2.1? ![]() I want to test. but if anyone done let me know. Thanks, |
|||||||||
#35
|
|||||||
|
|||||||
![]() This DOES NOT work with 4.3 beta3
--- but if you edit this line, it will: Code:
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#36
|
|||||||
|
|||||||
![]() CONFIRMED to work with 4.3.0 PRO
INSERT the following to the top of /skin1/customer/main/subcategories.tpl Code:
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#37
|
|||||||||
|
|||||||||
![]() The above also works with the flyout module in 4.4
Placing it at the top of: /common_files/modules/Flyout_Menus/Icons/fancy_subcategories.tpl or /common_files/modules/Flyout_Menus/Icons/fancy_subcategories_exp.tpl |
|||||||||
#38
|
|||||||
|
|||||||
![]() Mod confirmed to work with 4.5.3 goldplus!
Not sure if the code needs to change for CDSEO Pro? INSERT the following to the top of /skin/common_files/customer/main/subcategories.tpl Code:
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#39
|
|||||||||
|
|||||||||
![]() Quote:
For SEO purposes it would be much better to do the redirect in PHP as this causes a 302 redirect and in PHP you could create a proper 301. |
|||||||||
#40
|
|||||||
|
|||||||
![]() But Jon...
The page doesn't redirect at all - only the category does *to the page). And it redirects to the page, which is indexed. The "category" in this case is NOT indexed, nor do we want it to be, if there is only a single product associated. Where this technique works well is for a store using flyout menus... COMPUTER HARDWARE KEYBOARDS (only 1 item - this takes us directly to product detail page) MOTHRBOARDS (3 items, this takes us to the category page) PORTABLE COMPUTERS (2 items, this takes us to the category page) PRINTERS (3 items, this takes us to the category page) So although Computer Hardware > Keyboards is a category, this code automatically sends the browsing customer to the one ond only product in the category. Jon - ARE YOU SUGGESTING that we solve the browsing experience for the customer with a 301? This will mean more work for the admin, since we have to identify each instance of this situation... Are you also suggesting stores with CDSEO Pro NOT use this technique? Thanks for the clarification. J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|