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)
-   -   Border around products. (https://forum.x-cart.com/showthread.php?t=46143)

RichieRich 04-06-2009 09:52 AM

Re: Border around products.
 
I have sent private message to website, as it is closed and under developement.

alec.thomas 04-07-2009 03:26 PM

Re: Border around products.
 
Try putting this code into main.css

Code:


.products products-table width-100 .product-cell {
 border-right-width: thin;
 border-left-width: thin;
 border-right-style: solid;
 border-left-style: solid;
 border-right-color: #CCCCCC;
 border-left-color: #CCCCCC;
}


if that works, you'll be able to change css to whatever you want to style it. Your template is different from mine and your featured products table doesn't have an id so its a little difficult to control it with css.

ARW VISIONS 04-07-2009 05:45 PM

Re: Border around products.
 
Quote:

Originally Posted by RichieRich
really appreciate your help and knowledge, what I am after is for the featured products in columns to have a border in between the images, but not on the outside if this makes sense?

For exampe: O | O | O ... where the O is product and the | is seperater


This is difficult because the columns are populated using a foreach loop, which will place the separator at the end of the row as such. O | O | O |

There maybe a way to count the array index and leave it out for every third product.

Will see if I can figure it out while I backup my drives.

Victor D 04-08-2009 01:22 AM

Re: Border around products.
 
fast borders mod (developed for our templates in 15 minutes)

1. add in the end of your main.css
Code:

  .products-table{border-left:1px solid #d7e8ff;border-top:1px solid #d7e8ff}
 .products-table td.product-cell {border-right:1px solid #d7e8ff}
 .products-table .last-row .product-cell{border-bottom:#d7e8ff solid 1px}

2. open customer/main/products_t.tpl and replace
Code:

      <tr>

        {foreach from=$row item=product}
          {if $product}

            <td class="product-cell product-cell-buynow">

                {if $config.Appearance.buynow_button_enabled eq "Y"}
                  {include file="customer/main/buy_now.tpl"}
                {else}
                  &nbsp;
                {/if}

            </td>

          {/if}
        {/foreach}
      </tr>

with
Code:

<tr class="last-row">
        {foreach from=$row item=product}
          {if $product}

            <td class="product-cell product-cell-buynow">

                {if $config.Appearance.buynow_button_enabled eq "Y"}
                  {include file="customer/main/buy_now.tpl"}
                {else}
                  &nbsp;
                {/if}

            </td>

          {/if}
        {/foreach}
      </tr>

(actually just add class to the tr element in the first line of code above)

RichieRich 04-08-2009 01:30 AM

Re: Border around products.
 
Victor, thank you this seems to have a full border around the products which looks great, but not what I am looking for.

I think Ashley has worked out the method, to either use every third array, or not on the end of the table

Victor D 04-08-2009 01:42 AM

Re: Border around products.
 
I can't get what kind of borders you need but I can also give common recipe:

just add name to foreach f.e.
foreach name=prods

then youll be able treat it like this:
Code:

class="item {if $smarty.foreach.prods.first}left-item{else}{if $smarty.foreach.prods.last}right-item{/if}{/if}"

after adding this to css:
Code:

.item{border:#000 1px solid}
.left-item{border-left:0px none}
.right-item{border-right:0px none}

you will get no borders for left and right element

RichieRich 04-08-2009 01:45 AM

Re: Border around products.
 
ok that sounds perfect, will give it a try, thanks

mrerotic 06-21-2009 11:08 AM

Re: Border around products.
 
RichieRich - how did you achieve this? I'm really interested. Is there anyway you can send me your url so I can take a look at it too?

Thanks.

mrerotic 06-24-2009 11:43 PM

Re: Border around products.
 
Richie can you or will you provide this?

xtech 01-03-2012 09:58 AM

Re: Border around products.
 
I want to individual product border in category,featured product and manufacturer page.I want to get this for 4.4.2 Pro.

How to achieve that?


All times are GMT -8. The time now is 01:30 AM.

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