| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Link to Main Category from Product Page | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I would like to place a link on each product page which would take the customer to the main category of that particular product. Similar to the breadcrumbs, but only to the product's main category, regardless of any subcategory or additional category it might be in. I'm hoping this is possible ... any help would be very much appreciated. Many thanks,
__________________
theUKdude X-Cart Gold - 4.1.9 Apache 2.2.10 MySQL 5.0.67 PHP 5.2.9 |
|||||||
#2
|
|||||||
|
|||||||
![]() skin1/customer/main/product.tpl
Button... Code:
Code:
__________________
xcartmods.co.uk |
|||||||
#3
|
|||||||
|
|||||||
![]() ooooo, this is so close to what I need!
Is there no way to specify the actual 'Main Category' the product is listed in? I ask because I have categories set out this way: > Brands >> Brand 1 >> Brand 2 >> Brand 3 > Category A > Category B > Category C Now the 'main category' for each product is either Brand 1, Brand 2 or Brand 3, let's say Product X's main category is Brand 2 ... and Product X is also in multiple 'additional' categories, such as Category A and Category C. When the customer views Product X by navigating through Category C, I would like a link on that product which would take the customer back to Product X's main category ... in this case Brand 2 ... so they can view all other products in that main category i.e. of the same brand. You follow me? I may be over complicating that example ... so I apologise, hehe. So is there a variable like $main_category.id maybe? There must be a way of grabbing each products main category variable? Thanks for your help though ... it's brought me closer!
__________________
theUKdude X-Cart Gold - 4.1.9 Apache 2.2.10 MySQL 5.0.67 PHP 5.2.9 |
|||||||
#4
|
|||||||
|
|||||||
![]() Yes, as I said, just change 'parentid' to 'categoryid'
![]()
__________________
xcartmods.co.uk |
|||||||
#5
|
|||||||
|
|||||||
![]() Thanks PhilJ,
I've tried this though, and it links back to the current category instead of the main category, as the variable suggests. So if the 'Main Category' of Product X is 'Brand 2' but the customer navigates to Product X via the additional category 'Category C', the link will return them to Category C instead of Brand 2. Is there a variable for the Main Category? There must be, surely? Thanks for your help Phil
__________________
theUKdude X-Cart Gold - 4.1.9 Apache 2.2.10 MySQL 5.0.67 PHP 5.2.9 |
|||||||
#6
|
|||||||
|
|||||||
![]() <a href="{$location[1][1]}">{$location[1][0]}</a>
__________________
Autobulbs Direct Ltd X-Cart Version: 4.2.2 eWay Designs - Custom X-Cart Templates / CMS Websites / Bespoke web applications |
|||||||
|
|||
X-Cart forums © 2001-2020
|