Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F848195
modern-store
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Apr 20, 2:09 AM
Size
5 KB
Mime Type
text/x-diff
Expires
Tue, Apr 22, 2:09 AM (22 h, 51 m)
Engine
blob
Format
Raw Data
Handle
602939
Attached To
rTMST Themes.Modern-Store
modern-store
View Options
Index: branches/1.0.x/products/compare.tpl
===================================================================
--- branches/1.0.x/products/compare.tpl (revision 14911)
+++ branches/1.0.x/products/compare.tpl (revision 14912)
@@ -1,162 +1,164 @@
<!--##
<NAME>Compare Products</NAME>
<DESC>Product comparison page</DESC>
<SECTION>Pages||Compare Products</SECTION>
##-->
<inp2:m_DefineElement name="page_title"><inp2:st_PageInfo type="htmlhead_title" html_escape="1"/></inp2:m_DefineElement>
<!--## MAIN CONTENT ##-->
<inp2:m_DefineElement name="content">
<inp2:p_InitList list_name="compare_products" types="compare" parent_cat_id="any" per_page="3"/>
<div class="block no-border-bottom">
<h2><em>Comparing Products (<abbr id="product-count"><inp2:p_TotalRecords list_name="compare_products"/></abbr>)</em><span></span></h2>
<div class="compare border-radius">
<inp2:m_DefineElement name="product_compare_header">
<div class="good-item" product_id="<inp2:Field name='ProductId'/>" position="<inp2:m_Param name='num'/>">
<div class="button-delete"><a href="#"><img src="<inp2:m_TemplatesBase/>img/icon-delete.png" width="13" height="13" alt="" /></a></div>
<dl>
<dt><a href="<inp2:ProductLink template='__default__'/>"><inp2:Field name="Name"/></a></dt>
<dd>
<p class="img">
<a href="<inp2:ProductLink template='__default__'/>">
<inp2:Image render_as="image_element" Primary="1" Thumbnail="1" DefaultImage="img/no_picture.gif" MaxWidth="136" MaxHeight="136"/>
</a>
</p>
<p class="price"><inp2:Field name="Price" currency="selected" decimal_tag="span"/></p>
<p><a href="<inp2:AddToCartLink template='elements/ajax/cart_bubble' product_template='__default__'/>" class="addtocart" rel="nofollow"><span>Add to Cart</span></a></p>
</dd>
</dl>
<div class="rating">
<p>
<inp2:VotesIndicator small_style="small-star"/>
</p>
<p><a href="<inp2:ProductLink template='__default__' anchor='reviews'/>">Reviews</a> (<a href="<inp2:ProductLink template='__default__' anchor='reviews'/>"><inp2:Field name="CachedReviewsQty"/></a>)</p>
</div>
<dl class="har">
<dt>Model:</dt>
<dd>XT2324</dd>
<inp2:m_if check="p_Field" name="ManufacturerId" db="db">
<dt>Manufacturer:</dt>
<dd><inp2:Field name="ManufacturerId"/></dd>
</inp2:m_if>
<dt>SKU:</dt>
<dd><inp2:Field name="SKU"/></dd>
<dt>Size:</dt>
<dd>22''</dd>
</dl>
</div>
</inp2:m_DefineElement>
<inp2:p_PrintList render_as="product_compare_header" list_name="compare_products"/>
- <div class="good-item last-child">
- <p class="buttons-block"><a href="<inp2:m_Link template='index'/>" class="compare-button"><span><img src="<inp2:m_TemplatesBase/>img/bg-button-compare-add.png" width="24" height="24" alt="" /><br />Select Product<br />to Compare</span></a></p>
- </div>
+ <inp2:m_if check="p_TotalRecords" list_name="compare_products" equals_to="0|1|2">
+ <div class="good-item last-child">
+ <p class="buttons-block"><a href="<inp2:m_Link template='index'/>" class="compare-button"><span><img src="<inp2:m_TemplatesBase/>img/bg-button-compare-add.png" width="24" height="24" alt="" /><br />Select Product<br />to Compare</span></a></p>
+ </div>
+ </inp2:m_if>
<div class="clear"></div>
<div id="compare-menu" style="width: 678px;">
<h3><a href="#">Description</a></h3>
<div>
<inp2:m_DefineElement name="product_compare_description">
<div class="good-item-cell">
<div class="description">
<p><inp2:Field name="Description"/></p>
</div>
</div>
</inp2:m_DefineElement>
<inp2:p_PrintList render_as="product_compare_description" list_name="compare_products"/>
<div class="clear"></div>
</div>
<h3><a href="#">Features</a></h3>
<div>
<inp2:m_DefineElement name="product_compare_features">
<div class="good-item-cell">
<div class="description">
<p><inp2:Field name="cust_Features"/></p>
</div>
</div>
</inp2:m_DefineElement>
<inp2:p_PrintList render_as="product_compare_features" list_name="compare_products"/>
<div class="clear"></div>
</div>
<h3><a href="#">Details</a></h3>
<div></div>
<h3><a href="#">Specifications</a></h3>
<div></div>
<h3><a href="#">Overall Rating</a></h3>
<div></div>
<h3><a href="#">Reviews</a></h3>
<div></div>
</div>
<div class="clear"></div>
</div>
</div>
</inp2:m_DefineElement>
<!--## /MAIN CONTENT ##-->
<inp2:m_DefineElement name="add_to_head">
<script type= "text/javascript">
$(document).ready(
function() {
var icons = {header: 'ui-icon-circle-arrow-e', headerSelected: 'ui-icon-circle-arrow-s'};
$( '#compare-menu' ).accordion({
icons: icons,
autoHeight: false,
navigation: true
});
$('.button-delete').click(
function ($e) {
var $me = $(this),
$header = $me.parent(),
$position = $header.attr('position');
compare_product($header.attr('product_id'), false);
$header.remove();
$('h3', '#compare-menu').next('div').each(
function () {
$('.good-item-cell:nth-child(' + $position + ')', this).remove();
}
);
$('#product-count').html( parseInt($('#product-count').text()) - 1 );
// renumber positions, since they were shifted
var $index = 1;
$('.button-delete').parent().each(
function () {
$(this).attr('position', $index++);
}
);
return false;
}
);
}
);
</script>
</inp2:m_DefineElement>
<!--## DESIGN TEMPLATE ##-->
<inp2:m_include template="designs/default_design.des" pass_params="1"/>
<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file
Event Timeline
Log In to Comment