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

Add Manufacturer in Product Detail Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-04-2009, 07:43 PM
 
zeta1600 zeta1600 is offline
 

Advanced Member
  
Join Date: Mar 2006
Posts: 81
 

Default Add Manufacturer in Product Detail Page

Still perplexed why the manufacturer is not added to the product detail as a default. If a customer looks at a computer Model Mini 9, surely one would think that the Dell name would be plastered throughout the page... But, that's just me.

Anyway, has anyone played with 4.2? Got a couple of questions.
1) Can you show us how to add the manufacturer on the product detail page? How about adding a link just like the Manufacturer Menu listing?

2) If the above is not possible, can anyone show us how to add a clickable link on an added product "Extra Field?"
__________________
Thanks.

X-Cart 4.1.9 Gold upgraded to 4.1.10
Considering 4.2

Local Computer:
Mac OS 10.5.6
Brower Firefox 3.0.5

Server:
OS Linux
Apache 2.0.63
PHP 5.2.5
MySQL 5.0.51a-community
Reply With Quote
  #2  
Old 01-05-2009, 04:44 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Add Manufacturer in Product Detail Page

Quote:
Originally Posted by zeta1600
Still perplexed why the manufacturer is not added to the product detail as a default.

What if you are the manufacturer, and all you sell are your own products? X-cart code is bloated enough without checking first to see if there is a manufacturer, and then determining which manufacturer is associated with the product. You should be able to add it with some custom template editiing, but it should definitely not be a default.

Quote:
Originally Posted by zeta1600
Anyway, has anyone played with 4.2? Got a couple of questions.
1) Can you show us how to add the manufacturer on the product detail page? How about adding a link just like the Manufacturer Menu listing?

2) If the above is not possible, can anyone show us how to add a clickable link on an added product "Extra Field?"

I have played with 4.2 a little, but have not tried to do what you ask. It should be fairly straight forward to just add the extra field and put the link in it, if that is what you want to do.

Have you looked at the manufacturers module to see if you can call some of the variables in there to achieve what you want?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 01-05-2009, 06:03 AM
 
zeta1600 zeta1600 is offline
 

Advanced Member
  
Join Date: Mar 2006
Posts: 81
 

Default Re: Add Manufacturer in Product Detail Page

Jwait...

Thanks for your response. As you said, there should be a way to do these. I have done both of these on older versions with the help from others. But, since I'm not a programmer, unless I have clear instructions, it's hard for me to figure it out.

So... if you are willing to help, I'd be glad to get your help...

Thank very much in advance, I greatly appreciate it. If I can get these two things done, I can take the site live.
__________________
Thanks.

X-Cart 4.1.9 Gold upgraded to 4.1.10
Considering 4.2

Local Computer:
Mac OS 10.5.6
Brower Firefox 3.0.5

Server:
OS Linux
Apache 2.0.63
PHP 5.2.5
MySQL 5.0.51a-community
Reply With Quote
  #4  
Old 01-06-2009, 04:18 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Add Manufacturer in Product Detail Page

I'm not a programmer either, but it seems that you could try using some of the variables in the "manufacturers" templates and add them to the product.tpl just to see what shows up.

Somewhere in the template just add "1{$manufacturer.url} 2{$manufacturer} 3 {$manufacturerid} 4{$manufacturer.id} 5{$manufacturer.manufacturerid} etc" using as many variable as you can think of and see what shows up. Then choose the variable with the number you need to show and try using that.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #5  
Old 01-06-2009, 12:30 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Add Manufacturer in Product Detail Page

You don't need to use trial and error if you use the smarty debug console to see the available assigned variables. You can use this tip.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #6  
Old 01-06-2009, 04:48 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Add Manufacturer in Product Detail Page

Probably it would be something like this (Disclaimer: This is typed off the top of my head and not tested but should put you in the right direction):

In product.php find:

Code:
$smarty->assign("product",$product_info);

BEFORE add:

Code:
if (intval($product_info['manufacturerid']) > 0) $product_info['manufacturer'] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid='" . $product_info[manufacturerid] . "'");

Then in your skin1/customer/main/product.tpl you can use

Code:
<a href="manufacturers.php?manufacturerid={$product.manufacturerid}">{$product.manufacturer}</a>
Reply With Quote
  #7  
Old 01-27-2009, 12:46 PM
 
mudebate mudebate is offline
 

Advanced Member
  
Join Date: Jan 2009
Posts: 62
 

Default Re: Add Manufacturer in Product Detail Page

Hi,

I did this by slapping the following code into the product.tpl file where I wanted the link to appear:

Quote:
<a href="manufacturers.php?manufacturerid={$product.m anufacturerid}"><b>{$product.manufacturer}</b></a>
__________________
mudebate


X-cart 4.11 - One page checkout, category meta tags, manufacturer meta tags, a few others


X-cart 4.2, tabbed products menu



Reply With Quote

The following user thanks mudebate for this useful post:
Tony Pearce (02-07-2011)
  #8  
Old 01-28-2009, 05:30 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Add Manufacturer in Product Detail Page

There was a problem with your code.. a space in $product.m anufacturerid. Anyway, I put it in a "if" statement just in case the manufacturer is undefined in some products.
Code:
{if $product.manufacturer ne ""} Other products from <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a> {/if}

It seems to work just fine. Thanks
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following 2 users thank JWait for this useful post:
fmoses (10-20-2010), Tony Pearce (02-07-2011)
  #9  
Old 01-28-2009, 08:14 AM
 
mudebate mudebate is offline
 

Advanced Member
  
Join Date: Jan 2009
Posts: 62
 

Default Re: Add Manufacturer in Product Detail Page

Nice, thanks!
__________________
mudebate


X-cart 4.11 - One page checkout, category meta tags, manufacturer meta tags, a few others


X-cart 4.2, tabbed products menu



Reply With Quote
  #10  
Old 11-03-2009, 08:52 PM
 
lash lash is offline
 

Senior Member
  
Join Date: Oct 2006
Posts: 138
 

Default Re: Add Manufacturer in Product Detail Page

I get this to show up but the manufacturer links does not work. Could this be some problem with the CDSEO rewrite that I am using? Anyone has any ideas, Jon perhaps?
__________________
4.1.9
www.lash.se
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 09:41 AM.

   

 
X-Cart forums © 2001-2020