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)
-   -   Modify Layout of Manufacturers Page (https://forum.x-cart.com/showthread.php?t=65582)

tartaglia 12-05-2012 03:36 PM

Modify Layout of Manufacturers Page
 
I want to modify the layout of the Manufacturers page. The default layout is an unordered list of just the manufacturer names. The relevant default code inside /common_files/modules/Manufacturers/customer_manufacturers_list.tpl is...

Code:


  <ul class="manufacturers-list list-item">
    {foreach from=$manufacturers item=v}
      <li><a href="manufacturers.php?manufacturerid={$v.manufacturerid|amp}">{$v.manufacturer|escape}</a></li>
    {/foreach}
  </ul>


I stole some code from the customer_manufacturer_products.tpl file in order to get the manufacturer logos to show. Code now looks like this...

Code:


  <ul class="manufacturers-list list-item">
    {foreach from=$manufacturers item=v}
      <li>
      <a href="manufacturers.php?manufacturerid={$v.manufacturerid|amp}">
      <img src="{if $v.image_url ne ''}{$v.image_url|amp}{else}{$xcart_web_dir}/image.php?id={$v.manufacturerid}&amp;type=M{/if}" alt="{$v.manufacturer|escape}"{if $v.image_x} width="{$v.image_x}"{/if}{if $v.image_y} height="{$v.image_y}"{/if} />
      {$v.manufacturer|escape}
      </a>
      </li>
    {/foreach}
  </ul>


What I REALLY want is to have these logos + text links for each manufacturer to be in a table format (rows and columns) so you don't have to scroll down so far to see them all. I would be willing to hardcode the number of columns fi the rows were dependant on the number of manufacturers defined.

Can anyone help with this formatting? Please.

tartaglia 12-05-2012 03:40 PM

Re: Modify Layout of Manufacturers Page
 
2 Attachment(s)
Here is a screen shot of where I am at versus where I would like to be.

totaltec 12-05-2012 07:52 PM

Re: Modify Layout of Manufacturers Page
 
Once again I will ask for a link if possible. This is a css issue of course, and working right on the page makes it much easier to suggest a solution, rather than guessing.

Try:
Code:

.manufacturers-list ul li {
float: left;
}

Also experiment with "display: inline-block;" instead of float.

totaltec 12-05-2012 09:27 PM

Re: Modify Layout of Manufacturers Page
 
I sent you a message.

ADDISON 12-05-2012 11:46 PM

Re: Modify Layout of Manufacturers Page
 
If I am right you could use list2matrix smarty function already in XC

totaltec 12-05-2012 11:58 PM

Re: Modify Layout of Manufacturers Page
 
We were able to do it with some simple CSS styles, but list 2 matrix would work fine as well.

I also like to use counters on a foreach loop, counting the iterations and spitting out a break line of some kind when it reaches the nth one.

anandat 12-06-2012 01:49 AM

Re: Modify Layout of Manufacturers Page
 
checkout this module http://www.websitecm.com/x-cart-mods/xcart-manufacturers-a-z.html

if you have many manufacturers then above mod will be very useful to you.


All times are GMT -8. The time now is 01:22 PM.

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