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?

JWait 11-04-2009 03:47 AM

Re: Add Manufacturer in Product Detail Page
 
I don't know much about CDSEO, but if it can work with the regular manufacturer page then it should work with this. It is only a link.

lash 11-04-2009 04:03 AM

Re: Add Manufacturer in Product Detail Page
 
My manufacturers.php does not work. I think Jon removed/blocked it when installing CDSEO. Before it led to all manufacturers, but after CDSEO it's not listing anyting, instead I get a 404. Unfortunately I have this one in my bread crumb. It's blocked in the drop down list but not in bread crumb where it gives a 404. And the above piece of code uses manufacturers.php

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

I reckon that has something to do with it.

JWait 11-04-2009 05:57 AM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by lash
My manufacturers.php does not work. I think Jon removed/blocked it when installing CDSEO.


This doesn't make sense. If your manufacturers doesn't work there is no point in enabling the module at all. I have my doubts about Jon "removing or blocking" it, as it is an integral module in x-cart and would make CDSEO pretty useless without it functioning.

lash 11-04-2009 06:10 AM

Re: Add Manufacturer in Product Detail Page
 
They work, just not the link manufacturers.php. I have the CDSEO so it says manufacturer instead of the .php. It rewrites all my manufacturers/brands, just not the manufacturers.php which gets a 404. It's not clickable in my search.tpl. I think Jon made sure of that. But I have it in my breadcrumb which I am trying to locate now. If a customer would click on the manufacturer in the breadcrumb thinking they would get back to the manufacturer page for that particular manufacturer they will get a 404. It would also be in the above code. It seems I would need some tweeking to make it work. Like I said, I get a 404 for the above code, stating it cannot find the manufacturers.php.

I have this in my search.tpl

{* WCM - Modified for CDSEO Compatibility *}
<form name="formManufacturer">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-top:7px">
<select name="listManufacturer" onchange="window.location=this.options[selectedIndex].value" style="height:20px; width:132px">
<option value="">{$lng.botton_brands}</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$http_location}/{$cdseo_manu}/{$manufacturers_menu[mid].cdseo_url}/"{if $manufacturers_menu[mid].manufacturerid eq $manufacturer.manufacturerid} selected{/if}>{$manufacturers_menu[mid].manufacturer|truncate:20:"...":true}</option>
{/section}
</select>

Perhaps I could try to add the below, or part of it to:
<option value="{$http_location}/{$cdseo_manu}/{$manufacturers_menu[mid].cdseo_url}/"{if $manufacturers_menu[mid].manufacturerid eq $manufacturer.manufacturerid} selected{/if}>

to this:
a href="manufacturers.php?manufacturerid={$product.m anufacturerid}">{$product.manufacturer}</a

Any suggestions?

inteliboy1 11-29-2010 10:14 PM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by JWait
Code:

{if $product.manufacturer ne ""}
Other products from <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a>
{/if}




This works perfectly in v4.4, in product_details.tpl

ScrapOrchard 02-06-2011 06:09 PM

Re: Add Manufacturer in Product Detail Page
 
I am looking for something similar.. I would like to include the provider company name after the product title (i.e. product name by provider company name).. is it possible? Could someone point me in the right direction as to how to figure out how to do this?

JWait 02-07-2011 07:03 AM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by ScrapOrchard
I am looking for something similar.. I would like to include the provider company name after the product title (i.e. product name by provider company name).. is it possible? Could someone point me in the right direction as to how to figure out how to do this?


What do you mean by "provider company name", is it not the "manufacturer"? The term "manufacturer" can be modified to display whatever you want to call it, including "provider company".

ScrapOrchard 02-12-2011 05:16 PM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by JWait
What do you mean by "provider company name", is it not the "manufacturer"? The term "manufacturer" can be modified to display whatever you want to call it, including "provider company".


Correct. We have a special mod that allows us to add 1 instance of a product (under a separate Provider account) and place it in two Manufacturer's stores.. it's kind of complicated.

So I would like to include what is entered into the Company Field of the Provider account; not the manufacturer.

dcorner 07-01-2012 06:34 PM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by JWait
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.



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?


Just another example of how user unfriendly x-cart really is and that you would need a programmer to get this done.

dcorner 01-18-2013 04:14 PM

Re: Add Manufacturer in Product Detail Page
 
gosh, here I am a year later finding my own post still trying to find a solution.....

One of these days I am going to write a post with all the reasons why x-cart has to be one of the most ridiculous eCommerce platforms out there: programmers delight but a complete nightmare from a business viewpoint...

digiscraps 09-12-2013 08:30 PM

Re: Add Manufacturer in Product Detail Page
 
Quote:

Originally Posted by JWait
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


I hate to dig up an old thread, but I can use this code perfectly on my product_details page but not on my products_t page. Any ideas? I want to call up the manufacturer name automatically under the item name.


All times are GMT -8. The time now is 05:57 PM.

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