Index: branches/1.0.x/elements/html_head.elm.tpl =================================================================== diff -u -N -r14792 -r14907 --- branches/1.0.x/elements/html_head.elm.tpl (.../html_head.elm.tpl) (revision 14792) +++ branches/1.0.x/elements/html_head.elm.tpl (.../html_head.elm.tpl) (revision 14907) @@ -14,7 +14,7 @@ - + Index: branches/1.0.x/elements/side_boxes/subscribe.elm.tpl =================================================================== diff -u -N -r14733 -r14907 --- branches/1.0.x/elements/side_boxes/subscribe.elm.tpl (.../subscribe.elm.tpl) (revision 14733) +++ branches/1.0.x/elements/side_boxes/subscribe.elm.tpl (.../subscribe.elm.tpl) (revision 14907) @@ -2,20 +2,20 @@

Get Promotions & Discounts:

-
+
- +
- + - + Index: branches/1.0.x/inc/js/jquery.scripts.js =================================================================== diff -u -N -r14890 -r14907 --- branches/1.0.x/inc/js/jquery.scripts.js (.../jquery.scripts.js) (revision 14890) +++ branches/1.0.x/inc/js/jquery.scripts.js (.../jquery.scripts.js) (revision 14907) @@ -86,6 +86,36 @@ return $sorted_object; } +function compare_product($product_id, $compare_event, $callback) { + if ( $compare_event === undefined || $compare_event === true ) { + $compare_event = 'OnAddToCompare'; + } + else if ( $compare_event === false ) { + $compare_event = 'OnRemoveFromCompare'; + } + + var $url = FormManager.getURL('p', 'elements/side_boxes/compare.elm', $compare_event); + + $.get( + $url, + {'p_id': $product_id}, + function ($data) { + $('#compare-products-sidebox').replaceWith($data); + + if ( $callback !== undefined && $.isFunction($callback) ) { + $callback($data); + } + } + ); + + return false; +} + +function redirect($url) +{ + window.location.href = $url; +} + /* === DBlocks class === */ function DBlocks() { var $me = this; @@ -171,63 +201,62 @@ ) } -/* === Startup === */ -$(document).ready( - function() { - watch_anchor(); +function add_to_cart_handler() { + var $me = $(this), + $qty = $me.attr('qty_id') !== undefined ? parseInt($('#' + $me.attr('qty_id')).val()) : 1; - $('#change-password').click( - function($e) { - $('#password-show').hide(); - $('#password-block').fadeIn(); - return false; - } - ); + if ( $me.hasClass('addedtocart') ) { + // disabled button + return false; + } + if ( isNaN($qty) ) { + $qty = 1; + } - $('.addtocart, .button-addtocart').click( - function () { - var $me = $(this), - $qty = $me.attr('qty_id') !== undefined ? parseInt($('#' + $me.attr('qty_id')).val()) : 1; + var $bubble = $('.basketStatus'), + $timer_id = $bubble.data('hide_timer'); + clearTimeout($timer_id); - if ( $me.hasClass('addedtocart') ) { - // disabled button - return false; + $.get( + $me.attr('href') + '&qty=' + $qty, + function ($bubble_content) { + $('.basketContent', $bubble).html( $bubble_content.replace(/#QTY#/g, $qty) ); + $bubble + .stop(true, true) + .fadeIn( + 'slow', + function () { + var $timer = setTimeout(function(){ $bubble.fadeOut('slow'); }, 2000); + $bubble.data('hide_timer', $timer); } + ); - if ( isNaN($qty) ) { - $qty = 1; - } + if ( $me.hasClass('addtocart') ) { + $me.removeClass('addtocart').addClass('addedtocart').html('Added to Cart'); + } + } + ); - var $bubble = $('.basketStatus'), - $timer_id = $bubble.data('hide_timer'); + return false; +} - clearTimeout($timer_id); +/* === Startup === */ +$(document).ready( + function() { + watch_anchor(); - $.get( - $me.attr('href') + '&qty=' + $qty, - function ($bubble_content) { - $('.basketContent', $bubble).html( $bubble_content.replace(/#QTY#/g, $qty) ); - $bubble - .stop(true, true) - .fadeIn( - 'slow', - function () { - var $timer = setTimeout(function(){ $bubble.fadeOut('slow'); }, 2000); - $bubble.data('hide_timer', $timer); - } - ); + $('#change-password').click( + function($e) { + $('#password-show').hide(); + $('#password-block').fadeIn(); - if ( $me.hasClass('addtocart') ) { - $me.removeClass('addtocart').addClass('addedtocart').html('Added to Cart'); - } - } - ); - return false; } ); + + $('.addtocart, .button-addtocart').click(add_to_cart_handler); } ); \ No newline at end of file Index: branches/1.0.x/products/compare.tpl =================================================================== diff -u -N --- branches/1.0.x/products/compare.tpl (revision 0) +++ branches/1.0.x/products/compare.tpl (revision 14907) @@ -0,0 +1,159 @@ + + + + + +
+

Comparing Products (4)

+
+ +
+
+
+
Nikon D5000 Digital Camera
+
+

+

$759.95

+

Add to Cart

+
+
+
+

+

Reviews (12)

+
+
+
Model:
+
XT2324
+
Manufacturer:
+
Apple
+
SKU:
+
23423424
+
Size:
+
22''
+
+
+
+
+
+
Nikon D5000 Digital Camera
+
+

+

$759.95

+

Add to Cart

+
+
+
+

+

Reviews (12)

+
+
+
Model:
+
XT2324
+
Manufacturer:
+
Apple
+
SKU:
+
23423424
+
Size:
+
22''
+
+
+
+
+
+
Nikon D5000 Digital Camera
+
+

+

$759.95

+

Add to Cart

+
+
+
+

+

Reviews (12)

+
+
+
Model:
+
XT2324
+
Manufacturer:
+
Apple
+
SKU:
+
23423424
+
Size:
+
22''
+
+
+ +
+ +
+

Description

+
+
+
+

Vestibulum eu ipsum est. Morbi risus magna, aliquam eu consequat in, ultricies quis lorem. Maecenas rutrum pulvinar lectus, vel aliquam lorem porttitor nec. Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

Mauris ut felis Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

+
+
+
+
+

Vestibulum eu ipsum est. Morbi risus magna, aliquam eu consequat in, ultricies quis lorem. Maecenas rutrum pulvinar lectus, vel aliquam lorem porttitor nec. Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

Mauris ut felis Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

+
+
+
+
+

Vestibulum eu ipsum est. Morbi risus magna, aliquam eu consequat in, ultricies quis lorem. Maecenas rutrum pulvinar lectus, vel aliquam lorem porttitor nec. Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

Mauris ut felis Phasellus non orci sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec massa massa. Proin ac leo mauris.

+
+
+
+
+

Features

+
+ +
+

Details

+
+ +
+

Specifications

+
+ +
+

Overall Rating

+
+ +
+

Reviews

+
+ +
+
+
+
+
+
+ + + + + + + + + \ No newline at end of file Index: branches/1.0.x/elements/content_boxes/products.elm.tpl =================================================================== diff -u -N -r14900 -r14907 --- branches/1.0.x/elements/content_boxes/products.elm.tpl (.../products.elm.tpl) (revision 14900) +++ branches/1.0.x/elements/content_boxes/products.elm.tpl (.../products.elm.tpl) (revision 14907) @@ -23,6 +23,22 @@
+ + No Products Index: branches/1.0.x/inc/js/form_manager.js =================================================================== diff -u -N -r14806 -r14907 --- branches/1.0.x/inc/js/form_manager.js (.../form_manager.js) (revision 14806) +++ branches/1.0.x/inc/js/form_manager.js (.../form_manager.js) (revision 14907) @@ -363,6 +363,10 @@ }; FormManager.form_param = function ($prefix, $param, $value) { + if ( this.forms[$prefix] === undefined ) { + return ''; + } + if ($value === undefined) { return this.forms[$prefix][$param]; } Index: branches/1.0.x/elements/side_boxes/compare.elm.tpl =================================================================== diff -u -N -r14770 -r14907 --- branches/1.0.x/elements/side_boxes/compare.elm.tpl (.../compare.elm.tpl) (revision 14770) +++ branches/1.0.x/elements/side_boxes/compare.elm.tpl (.../compare.elm.tpl) (revision 14907) @@ -1,32 +1,60 @@ - + + + -
-

Comparing Products (3)

+ + + + + +
style="display: none;"> +

+ Comparing Products () + +

-
-
Nikon D5000 Digital Camera
-
-

-

-
-
-
-
Nikon D5000 Digital Camera
-
-

-

-
-
-
-
Nikon D5000 Digital Camera
-
-

-

-
-
+ +
+
+
+

+ + + +

+ +

+ +

+
+
+
+ + +

-     - +     +

-
\ No newline at end of file +
+ + \ No newline at end of file Index: branches/1.0.x/elements/product_elements.elm.tpl =================================================================== diff -u -N -r14793 -r14907 --- branches/1.0.x/elements/product_elements.elm.tpl (.../product_elements.elm.tpl) (revision 14793) +++ branches/1.0.x/elements/product_elements.elm.tpl (.../product_elements.elm.tpl) (revision 14907) @@ -23,7 +23,7 @@ Reviews ()    - +