X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add Manufacturer in Product Detail Page (https://forum.x-cart.com/showthread.php?t=44591)

zeta1600 01-04-2009 07:43 PM

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?"

JWait 01-05-2009 04:44 AM

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?

zeta1600 01-05-2009 06:03 AM

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.

JWait 01-06-2009 04:18 AM

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.

gb2world 01-06-2009 12:30 PM

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.

Jon 01-06-2009 04:48 PM

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>

mudebate 01-27-2009 12:46 PM

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>

JWait 01-28-2009 05:30 AM

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

mudebate 01-28-2009 08:14 AM

Re: Add Manufacturer in Product Detail Page
 
Nice, thanks!

lash 11-03-2009 08:52 PM

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?


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.