Page MenuHomeIn-Portal Phabricator

modern-store
No OneTemporary

File Metadata

Created
Sun, Apr 20, 8:37 AM

modern-store

Index: branches/1.0.x/elements/side_boxes/compare.elm.tpl
===================================================================
--- branches/1.0.x/elements/side_boxes/compare.elm.tpl (revision 14921)
+++ branches/1.0.x/elements/side_boxes/compare.elm.tpl (revision 14922)
@@ -1,43 +1,51 @@
<inp2:m_if check="m_Get" name="ajax" equals_to="yes">
<inp2:m_NoDebug/>
</inp2:m_if>
<inp2:m_Include template="elements/content_boxes.elm" strip_nl="2"/>
<inp2:m_Include template="elements/product_elements.elm" strip_nl="2"/>
<inp2:p_InitList list_name="compare_products" types="compare" parent_cat_id="any" per_page="3"/>
<div class="block no-border-bottom" id="compare-products-sidebox"<inp2:m_ifnot check="p_TotalRecords" list_name="compare_products"> style="display: none;"</inp2:m_ifnot>>
<h2>
<em>Comparing Products (<inp2:p_TotalRecords list_name="compare_products"/>)</em>
<span class="bullet"></span>
</h2>
<div class="good-item border-radius-bottom comparing-items">
<inp2:p_ListProducts list_name="compare_products" render_as="compare_product_element" no_table="1"/>
<p class="form buttons">
<input type="button" value="Compare" id="compare-products-btn" class="green-button" />&nbsp;&nbsp;&nbsp;
<input type="button" value="Clear" id="cancel-compare-btn" class="grey-button" />
</p>
</div>
</div>
<script type="text/javascript">
$(document).ready(
function () {
$('.addtocart', '#compare-products-sidebox').click(add_to_cart_handler);
$('#compare-products-btn').click(
function () {
redirect('<inp2:p_CompareLink template="products/compare" js_escape="1"/>');
}
);
$('#cancel-compare-btn').click(
function () {
compare_product(0, 'OnCancelCompare');
}
);
+
+ $('.button-delete', '#compare-products-sidebox').click(
+ function ($e) {
+ compare_product($(this).attr('product_id'), false);
+
+ return false;
+ }
+ );
}
);
</script>
\ No newline at end of file
Index: branches/1.0.x/elements/product_elements.elm.tpl
===================================================================
--- branches/1.0.x/elements/product_elements.elm.tpl (revision 14921)
+++ branches/1.0.x/elements/product_elements.elm.tpl (revision 14922)
@@ -1,60 +1,60 @@
<inp2:m_DefineElement name="product_list_element">
<li>
<div class="item">
<inp2:m_if check="Field" name="IsNew">
<div class="ribbon new"></div>
<inp2:m_elseif check="Field" name="IsPop" />
<div class="ribbon top"></div>
<inp2:m_elseif check="Field" name="Featured" db="1" />
<div class="ribbon sale"></div>
</inp2:m_if>
<div class="img">
<a href="<inp2:ProductLink template='__default__'/>"><inp2:Image render_as="image_element" Primary="1" Thumbnail="1" DefaultImage="img/no_picture.gif" MaxWidth="69" MaxHeight="69"/></a>
</div>
<div class="descr">
<h3><a href="<inp2:ProductLink template='__default__'/>"><inp2:Field field="Name" html_escape="1"/></a></h3>
<p><inp2:Field field="Description" html_escape="1" cut_first="200"/></p>
<div class="optional">
<span class="stars">
<inp2:VotesIndicator small_style="small-star"/>
</span>
<span class="reviews">
<a href="<inp2:ProductLink template='__default__'/>">Reviews</a> (<a href="<inp2:ProductLink template='__default__'/>"><inp2:Field name="CachedReviewsQty"/></a>)&nbsp;&nbsp;&nbsp;
</span>
<span class="comp">
<label><input type="checkbox" class="compare-checkbox" value="<inp2:Field name='ProductId'/>"<inp2:m_if check="InCompare"> checked</inp2:m_if>/><em>Compare</em></label>
</span>
</div>
</div>
<div class="price-block">
<p><s class="under"><inp2:Field name="MSRP" currency="selected" decimal_tag="span"/></s></p>
<p class="redprice"><em class="price"><inp2:Field name="Price" currency="selected" decimal_tag="span"/></em></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>
</div>
</div>
</li>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="sidebox_product_element">
<dl class="<inp2:m_if check='m_Param' name='is_last'>last</inp2:m_if>">
<dt><a href="<inp2:ProductLink template='__default__'/>"><inp2:Field field="Name" html_escape="1" cut_first="45"/></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>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="compare_product_element">
<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="button-delete"><a href="#"><img src="<inp2:m_TemplatesBase/>img/icon-delete.png" width="13" height="13" alt="" /></a></p>
+ <p class="button-delete" product_id="<inp2:Field name='ProductId'/>"><a href="#"><img src="<inp2:m_TemplatesBase/>img/icon-delete.png" width="13" height="13" alt="" /></a></p>
</dd>
</dl>
</inp2:m_DefineElement>
\ No newline at end of file

Event Timeline