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

Border around products in 3 column layout.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-10-2009, 06:03 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Border around products in 3 column layout.

Why is products_t.tpl all tables? adn why is each portion broken up in to separate foreach statements?

I just want to put a border around the entire product cell. was very very simple in 4.1.

how do I do this i 4.2?
__________________
xcart 5.1.2
Reply With Quote
  #2  
Old 04-10-2009, 06:28 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Border around products in 3 column layout.

well that was annoying I'll post the code if anyone is interested.
__________________
xcart 5.1.2
Reply With Quote
  #3  
Old 04-12-2009, 11:42 AM
  CC's Avatar 
CC CC is offline
 

eXpert
  
Join Date: Jun 2004
Posts: 349
 

Default Re: Border around products in 3 column layout.

Sure I would be interested in seeing this please.
I am having trouble getting my head around these new layout styles in 4.2, and as you found why are some template files still not tabless.
__________________
XC 4.2 inc (unofficial) patch release.
Reply With Quote
  #4  
Old 04-12-2009, 12:20 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Border around products in 3 column layout.

I just removed all of the redundant foreach loops.

Make sure you keep the old products_t.tpl

This is the

Code:
{* $Id: products_t.tpl,v 1.46 2008/12/10 08:29:52 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=$config.Appearance.products_per_row} {assign var="is_matrix_view" value=true} {if $products_matrix} <table cellspacing="1" class="products products-table width-100" summary="{$lng.lbl_products_list|escape}"> {foreach from=$products_matrix item=row name=products_matrix} <tr{if !$smarty.foreach.products_matrix.first} class="products-row"{/if}> {foreach from=$row item=product} {if $product} <td class="product-cell" style="width: {$cell_width}%;"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <a href="product.php?productid={$product.productid}&amp;cat={$cat}&amp;page={$navigation_page}" class="product-title">{$product.product|escape}</a> {if $config.Appearance.display_productcode_in_list eq "Y" && $product.productcode} <div class="sku">{$lng.lbl_sku}: {$product.productcode|escape}</div> {/if} </td> </tr> <tr> <td> <div class="image"> <a href="product.php?productid={$product.productid}&amp;cat={$cat}&amp;page={$navigation_page}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a> {if $active_modules.Special_Offers && $product.have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl"} {/if} </div> </td> </tr> <tr> <td> <a href="product.php?productid={$product.productid}&amp;cat={$cat}&amp;page={$navigation_page}" class="see-details">{$lng.lbl_see_details}</a> {if $active_modules.Feature_Comparison && $product.fclassid gt 0} <div align="center">{include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$product.productid}</div> {/if} </td> </tr> <tr> <td>{if $product.product_type ne "C"} {if $active_modules.Subscriptions ne "" && $product.catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {elseif $product.appearance.is_auction} <span class="price">{$lng.lbl_enter_your_price}</span><br /> {$lng.lbl_enter_your_price_note} {else} {if $product.appearance.has_price} <div class="price-row"> <span class="price">{$lng.lbl_our_price}:</span> <span class="price-value">{include file="currency.tpl" value=$product.taxed_price}</span> <span class="market-price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span> </div> {if $product.appearance.has_market_price && $product.appearance.market_price_discount gt 0} <div class="market-price"> {$lng.lbl_market_price}: <span class="market-price-value">{include file="currency.tpl" value=$product.list_price}</span> {if $product.appearance.market_price_discount gt 0} {if $config.General.alter_currency_symbol ne ""}, {/if} <p class="price-save">{$product.appearance.market_price_discount}% {$lng.lbl_save_price}</p> {/if} </div> {/if} {if $product.taxes} <div class="taxes">{include file="customer/main/taxed_price.tpl" taxes=$product.taxes is_subtax=true}</div> {/if} {/if} {if $active_modules.Special_Offers && $product.use_special_price} {include file="modules/Special_Offers/customer/product_special_price.tpl"} {/if} {/if} {else} &nbsp; {/if} </td> </tr> <tr> <td> {if $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl"} {else} &nbsp; {/if} </td> </tr> </table> </td> {/if} {/foreach} </tr> {/foreach} </table> {/if}
new code.
__________________
xcart 5.1.2
Reply With Quote
  #5  
Old 04-12-2009, 11:42 PM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Border around products in 3 column layout.

http://forum.x-cart.com/showpost.php?p=254658&postcount=14
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #6  
Old 04-13-2009, 01:25 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Border around products in 3 column layout.

not exactly what I want.

While it mimics the appearance of what I want, I simply want one border around the product cell.

This gives me partial borders around parts of the table and parts of the cells.

I sometimes like to add a little cellsapcing to make them separate, then use mouse over to give them different color borders and backgrounds.

Is there a functional reason why there needs to be tables and 5 foreach loops?
__________________
xcart 5.1.2
Reply With Quote
  #7  
Old 04-13-2009, 02:23 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Border around products in 3 column layout.

Yes, it makes all items looks like them have equal height and the layout is more accurate.
I can't post complete solution since the whole products_t.tpl significally differs from original but here's some clues
Code:
{foreach from=$row item=product name=cycle} {if $product} <td class="product-cell product-cell-buynow" style="border:1px solid #ccc;border-top:0px none;"> <img height="1" width="172" src="{$ImagesDir}/m21.gif" alt="" /> {if $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl"} {else} &nbsp; {/if} </td> {if not $smarty.foreach.cycle.last}<td><img src="{$ImagesDir}/spacer.gif" height="5" width="5" alt="" /></td>{/if} {/if} {/foreach} </tr> {if not $smarty.foreach.products_matrix.last}<tr><td colspan="{$config.Appearance.products_per_row*2-1}"><img src="{$ImagesDir}/spacer.gif" height="5" width="5" alt="" /></td></tr>{/if} {/foreach}
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #8  
Old 04-13-2009, 02:32 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Border around products in 3 column layout.

My solution works fine for what I need. thanks for your help tho.
__________________
xcart 5.1.2
Reply With Quote
  #9  
Old 03-06-2010, 09:30 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Border around products in 3 column layout.

Ash did you ever figure out how to do this in 4.3?

This stupid thing wants to put a border around every element inside of each product.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote

The following user thanks hoosierglass for this useful post:
gizmo (03-06-2010)
  #10  
Old 03-06-2010, 09:58 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

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

Default Re: Border around products in 3 column layout.

Quote:
Originally Posted by hoosierglass
Ash did you ever figure out how to do this in 4.3?

This stupid thing wants to put a border around every element inside of each product.


Theres another topic I posted about this in 4.3 ( I still cannot properly figure this out, well I can but very complicated coding indeed)..

I even tried Jquerry columns. I gave up and used alternative as it was holding up other things I needed doing, I will go back to it when I can get my head around it.

The other topic is here that may offer you more Help >
http://forum.x-cart.com/showthread.php?t=52468
__________________
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 > 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 05:04 AM.

   

 
X-Cart forums © 2001-2020