| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to redirect to product page directly? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() If a category only has 1 product, how to let the category page redirect to the product page directly?
tks.
__________________
X-Cart Version: 4.7.12 GOLD www.cheapglasses123.com prescription glasses online at discounted prices. prescriptionglassesusa.com www.loupesusa.com X-Cart Version: 4.7.11 GOLD PLUS |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Quote:
Try to insert this to the /light_responsive/customer/home.tpl right after the opening <body> tag. Code:
__________________
Best regards, Igor Pudovkin X-Cart hosting team |
|||||||||
#3
|
|||||||
|
|||||||
![]() i think it is not good use js to redirect the category page to product page.
at www.loupesusa.com, category of Feather LED Headlight, the url is http://www.loupesusa.com/feather-led-headlight/, when i clip the category, www.loupesusa.com/feather-led-headlight/ will be display first, then jump to product page of http://www.loupesusa.com/feather-super-light-led-headlight.html. very bad for seo how about like this: if a category has only 1 product, just let the product page url as category page url. i think it is better for seo. category of Feather LED Headlight only has 1 product, then let http://www.loupesusa.com/feather-led-headlight/ be this category's url directly. not need using http://www.loupesusa.com/feather-led-headlight as its url. how to meet this demands, pls?
__________________
x-cart gold 4.7.12 http://www.prescriptionglasses123.com/ http://www.glassespeople.com http://www.loupesusa.com http://www.eyeglassesclub.com |
|||||||
#4
|
|||||||
|
|||||||
![]() Quote:
how to use php code to meet the same function? not use js.
__________________
https://www.cheapglasses.net/ sells cheap eyeglasses online v5.2 https://www.rx-safety-glasses.com/ https://www.vsgoggles.com/ https://www.glassestech.com https://www.bestpriceglasses.com |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
You can try to use the header('Location: function * http://php.net/manual/en/function.header.php
__________________
Best regards, Igor Pudovkin X-Cart hosting team |
|||||||||
#6
|
|||||||
|
|||||||
![]() {if $main eq 'catalog' and $cat_products|@count eq 1}
{php} header("{$cat_products[0].page_url}"); {/php} {/if} not working
__________________
https://www.cheapglasses.net/ sells cheap eyeglasses online v5.2 https://www.rx-safety-glasses.com/ https://www.vsgoggles.com/ https://www.glassestech.com https://www.bestpriceglasses.com |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Quote:
2. You should use the header() PHP function in PHP scripts, not in template files. 3. I believe you should hire someone to do custom modifications for you.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|