X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   get manufacture in products.php (https://forum.x-cart.com/showthread.php?t=10007)

dalmuti 10-29-2004 11:41 AM

Perfect! Got it done. Appreciate the help!

Dalmuti

august 11-11-2004 12:06 AM

Quote:

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

+ $manufacturer = func_query_first("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid='$product_info[manufacturerid]'");
+ $smarty->assign("manufacturer", $manufacturer);

Could anybody post the variant that instead of saying
Manufacturer:Timex
It will show the brandlogo, something like
Timex.gif (brand logo)
else
Timex (text)

To me the customer recognize faster the logo than the name
.

Also, how can I change the manufacturer.php so it will put the brandlogos and names in several columns, instead of one column name.
With an output like this: http://www.makeitfast.com/default.php?manufacturers_id=11

vortexonline 02-07-2005 10:34 AM

Manufacturer logo?
 
How about a manufacturer logo?
How can I place the manufacturer's logo above the product tile?

I am kind of envious of newegg.com

I like how the manufacturer logo appears with the products.

Thanks in advance.

pmstudios 02-07-2005 11:39 AM

Re: Manufacturer logo?
 
Quote:

Originally Posted by vortexonline
How about a manufacturer logo?
How can I place the manufacturer's logo above the product tile?

I am kind of envious of newegg.com

I like how the manufacturer logo appears with the products.

Thanks in advance.



Basically the same exact method, but instead use {$manufacturer.image}

Make sure you have image included in the SELECT query too.

mpj 02-07-2005 04:09 PM

Quote:

Make sure you have image included in the SELECT query too.

Sorry, how do you go about doing this ?

Here is the MySQL table fields:

Full Texts manufacturerid manufacturer url image image_type descr orderby provider avail





Thanks for a great mod !

pmstudios 02-07-2005 07:21 PM

Quote:

Originally Posted by mpj
Sorry, how do you go about doing this ?


Modify the code added in product.php so the query looks like this:
Code:

$manufacturer = func_query_first("SELECT manufacturer,image FROM $sql_tbl[manufacturers] WHERE manufacturerid='$product_info[manufacturerid]'");

Quote:

Originally Posted by mpj
Thanks for a great mod !


And you're welcome :)

mpj 02-08-2005 08:24 AM

great work pmstudios!

I've just started out on PHP so please forgive my noobness

As for
Code:

{manufacturer.image}
this would output the blob in raw GIF89 code.


Here's what I've done for displaying manufacturer's image:

in products.tpl

to display image:
Code:

[img]mlogo.php?manufacturerid={$manufacturerid.manufacturerid}[/img]

to display the manufacturer name and a link that display other products by the manufacturer:
Code:

Manuacturer: {$manufacturer.manufacturer}


in product.php
Code:

$manufacturer = func_query_first("SELECT manufacturer,image,image_type,manufacturerid FROM $sql_tbl[manufacturers] WHERE manufacturerid='$product_info[manufacturerid]'");
$smarty->assign("manufacturer", $manufacturer);


$manufacturerid = func_query_first("SELECT manufacturerid FROM $sql_tbl[products] WHERE manufacturerid='$product_info[manufacturerid]'");
$smarty->assign("manufacturerid", $manufacturerid);



Thanks again pmstudios for an excellent code!

RQJay 05-10-2005 09:34 PM

I am sorry to ask, but i am having no luck on getting this to work for me, I have to be missing somthing....

In my Product.php file I added this code :
Code:

# Manufacturers Logo In Products
$smarty->assign("product",$product_info);

$manufacturer = func_query_first("SELECT manufacturer,image FROM $sql_tbl[manufacturers] WHERE manufacturerid='$product_info[manufacturerid]'");
#end logo in Products


And added this to my Product.Tpl file :
Code:

[img]mlogo.php?manufacturerid={$manufacturerid.manufacturerid}[/img]

Pretty much as directed. But still no luck. My product template does display the Xcart image place holder but not the manufacturers Logo.

Any help is greatly appreciated.
Jason

august 05-11-2005 11:02 PM

Hey MPJ, it is in products.tpl or product.tpl
In the other post they are talking about product.tpl

Hey Vortex, can you post your code, is exactly what I want to do, put the logo at the top, and the text under the image product.

RQJay 05-14-2005 09:22 PM

Bump-o-


All times are GMT -8. The time now is 09:52 AM.

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