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)
-   -   How can I add an image as an extra field in 4.x? Or can I? (https://forum.x-cart.com/showthread.php?t=15048)

bluecat 07-07-2005 12:49 AM

How can I add an image as an extra field in 4.x? Or can I?
 
I'm trying to add a manufacturer logo (gif image) to each product I sell, but cannot figure out how. I want the image (approximately 100 x 30) to rest on top of the Title of the product a person is viewing. Can anyone tell me how to do this? Thank you.

balinor 07-08-2005 09:03 AM

How about hard-coding it into the description?

bluecat 07-09-2005 04:16 AM

How would I do that exactly? I have about 40 different manufacturers with logos. 8O

balinor 07-09-2005 04:30 AM

Just call the image in your description using standard html.

bluecat 07-09-2005 04:59 PM

Yeah, but what I mean is, I have about 2000 items now and don't want to go through each one individually if possible.

TelaFirma 07-10-2005 04:54 AM

Maybe I am being thick here, but isn't that exacly what "Manufacturers" is for in 4.x?

You can add an image there for each manufacturer then just insert the proper variables in the product.tpl file where you want to see the logo.

bluecat 07-11-2005 02:22 AM

Thanks for the help too TelaFirma, very appreciated. How exactly would I do it as to not go through each item one by one? Also, what would be a sample code to use? Thanks.

TelaFirma 07-11-2005 04:28 AM

You would need to set the images within Admin and then I would update all the products using an import.

HWT 07-26-2005 07:44 AM

I did this by putting

Code:

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

wherever you need the manufacturer's logo to display in product.tpl. If you would like the logo to link to the page that views all of the manufacturer's products, use

Code:

<a href="manufacturers.php?manufacturerid={$manufacturerid.manufacturerid}">
[img]mlogo.php?manufacturerid={$manufacturerid.manufacturerid}[/img]</a>


Make sure you put the manufacturer's logo's in the admin side for this to display correctly. Otherwise, default_image.gif will show up.

An example of it in action:

http://www.heritagetoys.com/product.php?productid=16840&cat=0&page=1

bluecat 08-01-2005 03:36 AM

Thank you very much!

bluecat 08-07-2005 02:52 AM

Quote:

Make sure you put the manufacturer's logo's in the admin side for this to display correctly. Otherwise, default_image.gif will show up.


I apologize for the ignorance, can you explain how to put it on the admin side? (because of multiple manufacturers). Thank you.

HWT 08-07-2005 03:05 AM

No problem at all. When you log in to your admin account, under the management menu on the left hand side, you will find "Manufacturers about 3rd down. Here you can create new manufacturers, change their display order, make them acitve/inactive. If you click on the name of a manufacturer, you can add a logo, description, and URL.

I've found with X-cart that the question "Where the #$%% do I find that setting?!?" to come up a lot. #-o :)

you can surf around www.heritagetoys.com to see how it works w/multiple manufacuturers.

bluecat 09-04-2005 09:07 PM

Thank you. The way you have your site set up with it is exactly what I needed too. :)

bluecat 09-05-2005 01:12 PM

Well, if I could ask one last question on this...

I have it displayed in product.tpl exactly how I want it. However, it still brings up the default image even though an image is added to the manufacturer. Is there something I'm missing?

Thank you

HWT 09-05-2005 02:33 PM

Check to make sure that you have not named a manufacturer in 2 different ways (example - Acme and Acme, inc.) and then associated all of your products with the manufacturer name that doesn't have a logo. Sounds silly, but that happened to me during a product import once. If its not that, then ???.

weckie 10-01-2005 03:23 PM

you have to add this
 
You have to add this to your product.php otherwise it won't work.
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);{
}



right above
Code:

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

by default the manufacturer image is not called as a variable. I did it on my site and it works great.

good luck

pctechtoys 10-05-2005 05:53 AM

I like this and I would like to use this but the directions on exactly where to put this I am just not finding. Could someone detail exactly where to put these codes for the morons like me.

Thank you,

balinor 10-05-2005 06:01 AM

In product.php as stated above. Are you not finding the code or not finding the file?

pctechtoys 10-06-2005 01:42 PM

Ok I found it. I did it exactly the way the said it and **POOF** nothing.

HWT 10-13-2005 08:36 AM

Haven't looked at this thread in awhile. Sorry about steering you wrong w/forgeting the .php part. :oops:

Just to clarify things a little.

Use the code weckie posted in product.php if you need the manufacturer to show up in product.tpl, products.php if it in products.tpl, and in include/search.php if you need it in the search.

This is the original thread I found all of this originally:

http://forum.x-cart.com/viewtopic.php?t=13883&highlight=manufacturer


All times are GMT -8. The time now is 07:11 PM.

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