View Single Post
  #2  
Old 03-05-2015, 01:38 AM
 
xgarb xgarb is online now
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Re: XCart 5 design change

OK.. to explain what I'm trying to do in more detail...

Currently in x5 when you are looking at the product listing there's three options for displaying the products. Grid, List and Table.

So I found in
skins > default > en > items_list > product > center
the three directories for grid, list and table.

I want to change the layout for list, so in...
skins > default > en > items_list > product > center > list > body.tpl
I can see this code...
Code:
<table class="{getProductCellClass(product)}"> <tr> <td class="product-photo"> <div class="product-photo" style="width: {getIconWidth()}px;"> <list name="photo" type="inherited" product="{product}" /> <div IF="product.hasImage()"> <list name="quicklook" type="inherited" product="{product}" /> </div> </div> </td> <td class="product-info"> <div class="product-info"> <list name="info" type="inherited" product="{product}" /> <div IF="!product.hasImage()"> <list name="quicklook" type="inherited" product="{product}" /> </div> </div> </td> </tr> </table>

which I can edit to make the list view of products change. However... I want to change the layout to three columns. I can do this...

Code:
<div class="product-item product-item-holder"> <div class="row"> <div class="no-margin col-xs-12 col-sm-4 image-holder"> <div class="image"> <list name="photo" type="inherited" product="{product}" /> <div IF="product.hasImage()"> <list name="quicklook" type="inherited" product="{product}" /> </div> </div> </div> <div class="no-margin col-xs-12 col-sm-5 body-holder"> <div class="body"> <div class="title"> <a href="single-product.html"><a class="fn url" href="{buildURL(#product#,##,_ARRAY_(#product_id#^product.product_id,#category_id#^categoryId))}">{product.name:h}</a> </div> <div class="sku">{if:product.sku}{product.sku}{else:}&nbsp;{end:}</div> <div class="desc"><span IF="product.getBriefDescription()">{product.getBriefDescription():h}</span> </div> </div> </div> <div class="no-margin col-xs-12 col-sm-3 price-area"> <div class="right-clmn"> <div class="price-current"> <widget class="\XLite\View\Price" product="{product}" displayOnlyPrice="true" /> </div> <div IF="isDisplayAdd2CartButton()" class="add-to-cart-button"> {if:!product.inventory.isOutOfStock()} {if:isGotoProduct(product)} <widget class="\XLite\View\Button\Link" label="Add to cart" style="le-button" location="{product.url}" /> {else:} <widget class="\XLite\View\Button\Submit" label="Add to cart" style="le-button" /> {end:} {end:} </div> </div> </div> </div>
but this is taking the code from the parts directory (skins > default > en > items_list > product > parts) and placing it in my template which isn't really how it's supposed to be done.

So.. I need to find the code that <list name="info" type="inherited" product="{product}" /> invokes so I can have a three column product item template for the product list.
__________________
Core version: 5.5.xx
Reply With Quote