Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding manufacturer and description to products_t.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-17-2007, 12:45 AM
 
retrtrtrytrutru retrtrtrytrutru is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 101
 

Default 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!
__________________
www.qualitylamps.eu
X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9

www.vervangjelamp.nl
X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2

Sorry for the weird user name, I registered it by mistake
Reply With Quote
  #2  
Old 12-18-2007, 11:36 PM
 
retrtrtrytrutru retrtrtrytrutru is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 101
 

Default 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...
__________________
www.qualitylamps.eu
X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9

www.vervangjelamp.nl
X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2

Sorry for the weird user name, I registered it by mistake
Reply With Quote
  #3  
Old 12-19-2007, 12:11 AM
 
pcparts pcparts is offline
 

Advanced Member
  
Join Date: Jul 2006
Location: Aussie
Posts: 85
 

Default 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
__________________
Greg
X-CART Gold 4.1.10
Reply With Quote
  #4  
Old 12-20-2007, 12:36 AM
 
retrtrtrytrutru retrtrtrytrutru is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 101
 

Default 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!
__________________
www.qualitylamps.eu
X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9

www.vervangjelamp.nl
X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2

Sorry for the weird user name, I registered it by mistake
Reply With Quote
  #5  
Old 04-12-2008, 05:16 PM
 
Scotty85 Scotty85 is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 94
 

Default 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}

__________________
Xcart Version 4.1.9
Upgraded to 4.1.10 (clean install with mods added back)
Reply With Quote
  #6  
Old 04-12-2008, 05:29 PM
 
Scotty85 Scotty85 is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 94
 

Default 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?
__________________
Xcart Version 4.1.9
Upgraded to 4.1.10 (clean install with mods added back)
Reply With Quote
  #7  
Old 04-12-2008, 05:36 PM
 
Scotty85 Scotty85 is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 94
 

Default 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*} 
__________________
Xcart Version 4.1.9
Upgraded to 4.1.10 (clean install with mods added back)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020