Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Calling up category as a link?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-03-2005, 07:12 AM
 
Tristan Tristan is offline
 

Member
  
Join Date: May 2005
Posts: 12
 

Default Calling up category as a link?

Hello

How can i call up the category of the product you are viewing as a link?
I am trying to add a link (view all items in this category) in my related products tpl.

I've tried variations on
Code:
<a href="home.php?cat=xxxxxxx">
but always end up on the homepage.

Any help or pointers would be greatly appreciated.
Thanks
__________________
Version 4.0.13

www.urbanspirit.co.uk
Reply With Quote
  #2  
Old 08-03-2005, 08:39 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

That is indeed the correct way to link it......
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-03-2005, 09:22 AM
 
Tristan Tristan is offline
 

Member
  
Join Date: May 2005
Posts: 12
 

Default

Sorry i'm not very good at getting my point across or PHP coding.

I tried this code from trial and error but it brings up the link to the very 1st category i inputed into database and not the category of the product that i'm currently viewing.

__________________
Version 4.0.13

www.urbanspirit.co.uk
Reply With Quote
  #4  
Old 08-03-2005, 09:49 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default Re: Calling up category as a link?

In your first post you say:

Quote:
I am trying to add a link (view all items in this category) in my related products tpl.

Well, the issue here really is that the query to get the related products does not look up the primary Category ID and add it to the respective product in the $recommends array (or the $product_links array - there are two different modules that will generate the links for you like that).

So to get this to work like you want, you would need to hack the recommends.php in the root dir and also the /modules/Upselling_Products/related_products.php file to query the xcart_products_categories table and add that to the array.
Reply With Quote
  #5  
Old 08-03-2005, 10:07 AM
 
Tristan Tristan is offline
 

Member
  
Join Date: May 2005
Posts: 12
 

Default

Thank you for the answer.

Now that you've pointed out that related products does not look up the primary category id i feel a bit of a dufus. But hey if you don't ask you don't get.

Hopefully i can do this now.
Thanks again
__________________
Version 4.0.13

www.urbanspirit.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:38 AM.

   

 
X-Cart forums © 2001-2020