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

Show clickable manufacturer in description of product

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-17-2007, 06:44 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Question Show clickable manufacturer in description of product

I have added the following code in product.tpl:

Code:
<a href="manufacturers.php?manufacturerid={$v.manufacturerid}"><u>{$product.manufacturer}</u></a>

This shows the manufacturer name of the product shown and it's clickable but the url goes to manufacturers.php?manufacturerid= without the manufacturer's id behind it; is there a way to get this done?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #2  
Old 01-17-2007, 06:52 AM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Show clickable manufacturer in description of product

Try this:

HTML Code:
<a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><u>{$product.manufacturer}</u></a>
Reply With Quote
  #3  
Old 01-17-2007, 06:57 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Thumbs up Re: Show clickable manufacturer in description of product

You're the man Bill! Working great

Thanks,
Pieter
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #4  
Old 01-17-2007, 07:03 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Show clickable manufacturer in description of product

Do you also know how to get clickable search keywords? (see also: http://forum.x-cart.com/showthread.php?t=26481)

I know how to display them on the product page (by adding {$product.keywords}) but I want them to be clickable so that the search function is used with the clicked word.

Imagine something looking like this:

Related search terms: blue, medium, cotton

when you click on let's say 'blue' the search engine is used displaying all products found with 'blue' as search keyword. I hope this makes sense?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #5  
Old 01-17-2007, 09:52 AM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Show clickable manufacturer in description of product

I'm not sure, I will work something out and post it for you later today.
Reply With Quote
  #6  
Old 01-17-2007, 02:52 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Thumbs up Re: Show clickable manufacturer in description of product

That would be great!
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #7  
Old 01-17-2007, 05:19 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Show clickable manufacturer in description of product

First you will need to configure your search to work with URL queries. You can try this mod (I have never used this mod, so it may or may not work).

http://forum.x-cart.com/showthread.php?t=18488

Then you will have to separate your keywords with just a space (so they be separated and placed into an array).

Open product.php.

After this:

PHP Code:
if (!empty($active_modules["Special_Offers"])) {
    include 
$xcart_dir."/modules/Special_Offers/product_offers.php";


Add these lines

PHP Code:
$keywords preg_split("/\W+/"$product_info['keywords']);
$smarty->assign('keywords'$keywords); 

Then add this to your product.tpl wherever you want the links:

HTML Code:
<p> {foreach from=$keywords item=keyword} <a href="search.php?search={$keyword}">{$keyword}</a><br /> {/foreach} </p>

Let me know if the search by URL mod doesn't work for 4.1.x
Reply With Quote
  #8  
Old 01-17-2007, 11:38 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Thumbs up Re: Show clickable manufacturer in description of product

You're not the man you're the master! Works great
Thanks a million.
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #9  
Old 01-18-2007, 05:36 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Show clickable manufacturer in description of product

Final question; is it also possible to get the search keywords that are in the 'international description' of the product?

i.e. to make it multilanguage (english keywords shown when English is selected as language; french keywords shown when French language is selected by visitor).

Now it is showing the search keywords from the 'Product details' in the backoffice.
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #10  
Old 02-09-2007, 01:42 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Show clickable manufacturer in description of product

Is there anybody outthere who can help me with this?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
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 11:36 AM.

   

 
X-Cart forums © 2001-2020