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)
-   -   Adding manufacturer and description to products_t.tpl (https://forum.x-cart.com/showthread.php?t=36223)

retrtrtrytrutru 12-17-2007 12:45 AM

Adding manufacturer and description to products_t.tpl
 
Hi everyone,

I have been working on this for several days now and tried everything I could find in this forum but no luck. What I'm trying to accomplish seems pretty simple to me but I am a complete noob when it comes to php and smarty so I need some help.

I am working on /customer/main/products_t.tpl

At the moment this file outputs product name, a thumbnail image and a more info link. I want to add more information and let my customers directly buy the products on this page so they don't have to first click more info and then order the product.

To sum up the things I want to accomplish:

1. To the product name I want to add the Manufacturer name. I have followed this page but it's not working, there is no name displayed whatever I do.
2. I want to include the product description that is now displayed on /customer/main/product.tpl. The smarty code for this should be either {$product.fulldescr} or {$product.descr} but of course if I just copy this to products_t.tpl it doesn't work (why would things ever be easy ;)).
3. Add the quantity box and add to cart option from product.tpl so the customer can directly buy the product, eliminating one extra step.

Can anyone help me out? Thanks a lot in advance!

retrtrtrytrutru 12-18-2007 11:36 PM

Re: Adding manufacturer and description to products_t.tpl
 
No one? Or is it just too difficult for a n00b like me? ;) In that case I will just contact Qualiteam and let them build it for me but I'd much rather learn it myself...

pcparts 12-19-2007 12:11 AM

Re: Adding manufacturer and description to products_t.tpl
 
This is to get the manufacturer on your products_t.tpl tempate
{if $products[product].manufacturerid ne 0}
<br />
<div align="center">
<img src="image.php?id={$products[product].manufacturerid}&type=M">
</a></div>
{/if}
<br />
Just above {<a href="product.php?productid}
Not sure about the other 2 sorry.

Greg

retrtrtrytrutru 12-20-2007 12:36 AM

Re: Adding manufacturer and description to products_t.tpl
 
Thanks Greg, that gives me the manufacturer logo :) But of course, when I want to use this logo in my custom header (dialog_c.tpl) it doesn't work anymore. I don't quite understand why but at least I'm 1 step further. Do you have any other codes for the manufacturer name? This is how my page looks like at the moment and what I would like to accomplish:

http://209.62.119.201/skin1/img/goal.jpg

Any tips more than welcome! :)

Scotty85 04-12-2008 05:16 PM

Re: Adding manufacturer and description to products_t.tpl
 
Is there a simple way to make that same logo into a manufacturer's search link? I'm looking for it to search in the same manner that this code does on the product.tpl page.

Quote:


{if $product.manufacturer ne ""}
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="left" style="padding:5px;" valign="top" width="10"><a href="manufacturers.php?manufacturerid={$product.m anufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td>
</tr>
</table>
{/if}



Scotty85 04-12-2008 05:29 PM

Re: Adding manufacturer and description to products_t.tpl
 
By using this, it puts me on the manufacturer's list page.

PHP Code:

{*Manufacturer Logo*}
{if 
$products[product].manufacturerid ne 0}
<
br />
<
div align="center">
<
a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$products[product].manufacturerid}&type=M">
</
a></div>
{/if}
{*
Manufacturer Logo*} 



Almost, but not quite what I'm looking for. Any ideas?

Scotty85 04-12-2008 05:36 PM

Re: Adding manufacturer and description to products_t.tpl
 
GOT IT!!

This works in 4.1.9. UPDATED-=> Also works in 4.1.10

PHP Code:

{*Manufacturer Logo*}
{if 
$products[product].manufacturerid ne 0}
<
br />
<
div align="center">
<
a href="manufacturers.php?manufacturerid={$products[product].manufacturerid}"><img src="image.php?id={$products[product].manufacturerid}&type=M">
</
a></div>
{/if}
{*
Manufacturer Logo*} 



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

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