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)
-   -   More Effective Manufacturer view on Product Detail Page (https://forum.x-cart.com/showthread.php?t=29776)

Dan.roh 12-31-2009 08:00 AM

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


JWait 12-31-2009 08:30 AM

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).

Dan.roh 01-10-2010 02:42 AM

Re: More Effective Manufacturer view on Product Detail Page
 
1 Attachment(s)
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).


gizmo 01-10-2010 07:32 AM

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)

cflsystems 01-10-2010 09:39 AM

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

Dan.roh 01-10-2010 09:46 AM

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


cflsystems 01-10-2010 07:58 PM

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

gizmo 01-11-2010 04:45 AM

Re: More Effective Manufacturer view on Product Detail Page
 
2 Attachment(s)
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)

Dan.roh 01-13-2010 01:21 AM

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?

gizmo 01-13-2010 01:40 AM

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


All times are GMT -8. The time now is 04:37 AM.

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