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

More Effective Manufacturer view on Product Detail Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 12-31-2009, 08:00 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: More Effective Manufacturer view on Product Detail Page

Thanks Jwait,

Will give it a try. Just to confirm, you are saying it is manufacturerinfo.tpl and not manufacturerinfo.php ?

Quote:
Originally Posted by JWait
Is the manufacturerinfo.tpl where it is supposed to be? It should be at(x-cart root)/skin1/modules/Manufacturers/manufacturerinfo.tpl
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #52  
Old 12-31-2009, 08:30 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

Well, your error says "Warning: Smarty error: unable to read resource: "modules/Manufacturers/manufacturerinfo.tpl" in /home/custom/public_html/Smarty-2.6.19/Smarty.class.php on line 1092".

What it is saying is that Smarty (the thing that puts all of the templates together) can't read the manufacturerinfo.tpl that is supposed to be at modules/Manufacturers/manufacturerinfo.tpl as called for at line 1092 in the php code (probably manufacturerinfo.php). The most common reason Smarty can't read it is that it isn't there (possibly somewhere else or named incorrectly).
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following user thanks JWait for this useful post:
Dan.roh (12-31-2009)
  #53  
Old 01-10-2010, 02:42 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: More Effective Manufacturer view on Product Detail Page

Got mine working now, thanks! I am not displaying it yet as I have a few issues.

- Mine does not display like the sample http://forum.x-cart.com/attachment.php?attachmentid=287&d=1174280652

Instead of just the heading of product, thumb and more info link it displays a decription of the product as well which I don't want as it causes the boxes to be different sizes in lenth. Also there does not appear to be manufacturer decription. I have manufacturer banners that I have placed in the place of decription so I was hoping it will display the banner instead of decription, it is not so any ideas?

- I would also like this mod to display in my tabs instead, can anyone help?



Quote:
Originally Posted by JWait
Well, your error says "Warning: Smarty error: unable to read resource: "modules/Manufacturers/manufacturerinfo.tpl" in /home/custom/public_html/Smarty-2.6.19/Smarty.class.php on line 1092".

What it is saying is that Smarty (the thing that puts all of the templates together) can't read the manufacturerinfo.tpl that is supposed to be at modules/Manufacturers/manufacturerinfo.tpl as called for at line 1092 in the php code (probably manufacturerinfo.php). The most common reason Smarty can't read it is that it isn't there (possibly somewhere else or named incorrectly).
Attached Thumbnails
Click image for larger version

Name:	My sample.jpg
Views:	74
Size:	58.7 KB
ID:	1803  
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #54  
Old 01-10-2010, 07:32 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: More Effective Manufacturer view on Product Detail Page

It will be different sizes, because of the css style etc, Visually it will need further css edits etc to tidy it up, you can also play around with it. May also need other edits. Looks like this one is fairly limited though.

IE: Take out product description etc, word length, size of thumbs etc are also factors, and getting the style to look like what users are using.

I'm currently working on 4.3.0 and playing around with it.

BTW:
You would also I gather if all your thumbs are same size, this would make a huge difference on appearance. Then just do some edits on css, like I said then all boxes would display same size (Depending how you set it up)
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #55  
Old 01-10-2010, 09:39 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: More Effective Manufacturer view on Product Detail Page

You need to edit that template to:
1. Truncate product title or set height for the container holding the title so they all have same height
2. Make all your thumbs same size or set height for the container holding the thumb so they all have same height
3. Delete the reference for product description
4. Is the manufacturer banner inserted as html code in manufacturer description? Looking at some of the code above I don't see manufacturer descr included in the info but you can try using eval when calling the manufacturer description - {eval var=$descr}
5. To display in your tabs you have to include that template in the tabs
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #56  
Old 01-10-2010, 09:46 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: More Effective Manufacturer view on Product Detail Page

Thanks,

All sound so easy if you are a code master, I am not! Lucky for me all my thumbs are all the same size, did this from the start - so 1 less worry. Yes all banners are html, but some are flash

As for code, I still have alot to learn


Quote:
Originally Posted by cflsystems
You need to edit that template to:
1. Truncate product title or set height for the container holding the title so they all have same height
2. Make all your thumbs same size or set height for the container holding the thumb so they all have same height
3. Delete the reference for product description
4. Is the manufacturer banner inserted as html code in manufacturer description? Looking at some of the code above I don't see manufacturer descr included in the info but you can try using eval when calling the manufacturer description - {eval var=$descr}
5. To display in your tabs you have to include that template in the tabs
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #57  
Old 01-10-2010, 07:58 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: More Effective Manufacturer view on Product Detail Page

Sorry Dan but yes it takes html, css and smarty knowledge to edit the templates. It does sound easy, not always is easy. If you post here what you are trying to change pretty sure lots of ppl including me will help you out
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #58  
Old 01-11-2010, 04:45 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: More Effective Manufacturer view on Product Detail Page

To help some on the design css,html below will make some better adjustments to overall appearance: I am currently Testing on 4.3.0 and still at this stage cannot get Manufacturer category description to work (Not yet anyway)

This is for 50x50 thumbs and without description
What Have I changed? (Border, container div, padding, image-x=)
<div style="border:1px solid #eee;padding:5px;margin:5px; text-align:center; height:160px;"> <div style="padding-bottom:8px;"><a href="product.php?productid={$manufacturerinfo.pro ductid}&amp;cat={$cat}&amp;manufacturerinfo"> <font class="ProductTitle">{$manufacturerinfo.product}</font></a></div>

Also
image_x=50 (So that it matches my personal 50x50 thumbs)

Code:
{* $Id: manufacturerinfo.tpl,v 1.8.2.1 2007/03/19 13:12:29 max Exp $ *} {if $product.manufacturer ne ""} {if $manufacturerinfos} {capture name=dialog } <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="left" style="padding:5px;" valign="top"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td> <td align="left" style="padding:5px;" valign="top" width="100%"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a><br /> {$manufacturerinfo.descr|truncate:250:"...":true} <br /> <br /> <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><u>See All Products</u></a></td> </tr> </table> <hr/> <table width="100%" cellpadding="0" cellspacing="0"> <tr > {foreach from=$manufacturerinfos item=manufacturerinfo } <td width="20%" valign="top"><div style="border:1px solid #eee;padding:5px;margin:5px; text-align:center; height:160px;"> <div style="padding-bottom:5px;"><a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> <font class="ProductTitle">{$manufacturerinfo.product}</font></a></div><br /> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> {include file="product_thumbnail.tpl" image_x=50 productid=$manufacturerinfo.productid product=$manufacturerinfo.product} </a><br /> <font class="ProductPrice"> Our Price:&nbsp; {include file="currency.tpl" value=$manufacturerinfo.price}</font><br /> {if $manufacturerinfo.list_price gt 0} <font class="MarketPrice"> Market Price:&nbsp;<s>{include file="currency.tpl" value=$manufacturerinfo.list_price}</s> </font> <br /> {/if} </div></td> {/foreach} </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'} {/if} {/if}

It Can be tidied up as it has a lot of <br/> and also all inline css but this is good to go. (will work on mine a lot more)
NOTE:
height:160px; (Controls size of product container, ajust this if you like)



----------------------------------------
Code if you want product Discription showing 20 letters

Code:
{* $Id: manufacturerinfo.tpl,v 1.8.2.1 2007/03/19 13:12:29 max Exp $ *} {if $product.manufacturer ne ""} {if $manufacturerinfos} {capture name=dialog } <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="left" style="padding:5px;" valign="top"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td> <td align="left" style="padding:5px;" valign="top" width="100%"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a><br /> {$manufacturerinfo.descr|truncate:250:"...":true} <br /> <br /> <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><u>See All Products</u></a></td> </tr> </table> <hr/> <table width="100%" cellpadding="0" cellspacing="0"> <tr > {foreach from=$manufacturerinfos item=manufacturerinfo } <td width="20%" valign="top"><div style="border:1px solid #eee;padding:5px;margin:5px; text-align:center; height:160px;"> <div style="padding-bottom:8px;"><a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> <font class="ProductTitle">{$manufacturerinfo.product}</font></a></div> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> {include file="product_thumbnail.tpl" image_x=50 productid=$manufacturerinfo.productid product=$manufacturerinfo.product} </a><br /> <font class="ProductPrice"> Our Price:&nbsp; {include file="currency.tpl" value=$manufacturerinfo.price}</font><br /> {if $manufacturerinfo.list_price gt 0} <font class="MarketPrice"> Market Price:&nbsp;<s>{include file="currency.tpl" value=$manufacturerinfo.list_price}</s> </font> <br /> {/if} <font size="1"> {$manufacturerinfo.descr|truncate:20:"...":true}</font><br /> </div></td> {/foreach} </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'} {/if} {/if}

And how it looks without description
In Normal Page:
http://forum.x-cart.com/attachment.php?attachmentid=1804&stc=1&d=126321732 3

Within Tabs

http://forum.x-cart.com/attachment.php?attachmentid=1805&stc=1&d=126321742 9

Tested with Firefox and Ie
Obviously this fits with my current development design (If your a wizz at css anythings possible with some playing around)
Attached Thumbnails
Click image for larger version

Name:	man_notabs_redesign.png
Views:	104
Size:	18.3 KB
ID:	1804  Click image for larger version

Name:	man_tabs_redesign.png
Views:	98
Size:	9.7 KB
ID:	1805  
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #59  
Old 01-13-2010, 01:21 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: More Effective Manufacturer view on Product Detail Page

Gizmo, this is great! But I will need a bit of code to regulate the lenth of my product title because this is what is causing it to still throw everything of line with each other. Maybe a line or something that can be set to display on the same spot regardless of how long your product title is. Any ideas?
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #60  
Old 01-13-2010, 01:40 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: More Effective Manufacturer view on Product Detail Page

For now if you have long titles just increase > height:160px; (Controls size of product container, adjust this if you like)....

Like I said this is provided "as is" by the original poster and others have tried adding other things along the way, and to me is still far from ideal, but that being said it does do certain things..
All I have done at this stage is modify appearance
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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:46 AM.

   

 
X-Cart forums © 2001-2020